bind mount /proc in chroot dureing image creation, to prevent some error
svn path=/nixos/trunk/; revision=28002
This commit is contained in:
parent
fc9f6d0395
commit
d0ad799582
@ -27,6 +27,8 @@ with pkgs.lib;
|
|||||||
|
|
||||||
# The initrd expects these directories to exist.
|
# The initrd expects these directories to exist.
|
||||||
mkdir /mnt/dev /mnt/proc /mnt/sys
|
mkdir /mnt/dev /mnt/proc /mnt/sys
|
||||||
|
|
||||||
|
mount -o bind /proc /mnt/proc
|
||||||
|
|
||||||
# Copy all paths in the closure to the filesystem.
|
# Copy all paths in the closure to the filesystem.
|
||||||
storePaths=$(perl ${pkgs.pathsFromGraph} $ORIG_TMPDIR/closure)
|
storePaths=$(perl ${pkgs.pathsFromGraph} $ORIG_TMPDIR/closure)
|
||||||
@ -53,6 +55,7 @@ with pkgs.lib;
|
|||||||
# Generate the GRUB menu.
|
# Generate the GRUB menu.
|
||||||
chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
|
chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
|
||||||
|
|
||||||
|
umount /mnt/proc
|
||||||
umount /mnt
|
umount /mnt
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user