From d0ad79958256512b96309f993b945cbf6e5e47e1 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 29 Jul 2011 14:55:42 +0000 Subject: [PATCH] bind mount /proc in chroot dureing image creation, to prevent some error svn path=/nixos/trunk/; revision=28002 --- modules/virtualisation/amazon-image.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/virtualisation/amazon-image.nix b/modules/virtualisation/amazon-image.nix index ca35480240e..109746b0f94 100644 --- a/modules/virtualisation/amazon-image.nix +++ b/modules/virtualisation/amazon-image.nix @@ -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 '' );