3
0
Fork 0
forked from mirrors/nixpkgs

* Ugly hack: force udev to exit to prevent random "Device or resource

busy while trying to open /dev/xvda" errors from fsck.

svn path=/nixos/trunk/; revision=33766
This commit is contained in:
Eelco Dolstra 2012-04-12 18:01:19 +00:00
parent d82a7d328d
commit 2821289aeb
2 changed files with 9 additions and 1 deletions

View file

@ -322,7 +322,7 @@ done
# Stop udevd.
udevadm control --exit
udevadm control --exit || true
# Kill any remaining processes, just to be sure we're not taking any
# with us into stage 2.

View file

@ -78,6 +78,14 @@ with pkgs.lib;
boot.loader.grub.timeout = 0;
boot.loader.grub.extraPerEntryConfig = "root (hd0)";
boot.initrd.postDeviceCommands =
''
# Force udev to exit to prevent random "Device or resource busy
# while trying to open /dev/xvda" errors from fsck.
udevadm control --exit || true
kill -9 -- -1
'';
# Mount all formatted ephemeral disks and activate all swap devices.
# We cannot do this with the fileSystems and swapDevices options
# because the set of devices is dependent on the instance type