bind mount /proc in chroot dureing image creation, to prevent some error

svn path=/nixos/trunk/; revision=28002
This commit is contained in:
Rob Vermaas 2011-07-29 14:55:42 +00:00
parent fc9f6d0395
commit d0ad799582

View File

@ -27,6 +27,8 @@ with pkgs.lib;
# The initrd expects these directories to exist.
mkdir /mnt/dev /mnt/proc /mnt/sys
mount -o bind /proc /mnt/proc
# Copy all paths in the closure to the filesystem.
storePaths=$(perl ${pkgs.pathsFromGraph} $ORIG_TMPDIR/closure)
@ -53,6 +55,7 @@ with pkgs.lib;
# Generate the GRUB menu.
chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
umount /mnt/proc
umount /mnt
''
);