diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-12 18:01:19 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-12 18:01:19 +0000 |
commit | 2821289aeb809f50ac536577a88b3c8bda43a927 (patch) | |
tree | 624f48790db4d7ccadaf142cb306f76425cddd3c | |
parent | d82a7d328d0a0f633dc43c54de2eb35d3c8a8fc7 (diff) | |
download | nixpkgs-2821289aeb809f50ac536577a88b3c8bda43a927.tar nixpkgs-2821289aeb809f50ac536577a88b3c8bda43a927.tar.gz nixpkgs-2821289aeb809f50ac536577a88b3c8bda43a927.tar.bz2 nixpkgs-2821289aeb809f50ac536577a88b3c8bda43a927.tar.lz nixpkgs-2821289aeb809f50ac536577a88b3c8bda43a927.tar.xz nixpkgs-2821289aeb809f50ac536577a88b3c8bda43a927.tar.zst nixpkgs-2821289aeb809f50ac536577a88b3c8bda43a927.zip |
* 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
-rw-r--r-- | modules/system/boot/stage-1-init.sh | 2 | ||||
-rw-r--r-- | modules/virtualisation/amazon-image.nix | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/system/boot/stage-1-init.sh b/modules/system/boot/stage-1-init.sh index 7c98b35eba2..278c68fce99 100644 --- a/modules/system/boot/stage-1-init.sh +++ b/modules/system/boot/stage-1-init.sh @@ -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. diff --git a/modules/virtualisation/amazon-image.nix b/modules/virtualisation/amazon-image.nix index 65bf43c1478..55b1f5c0bd2 100644 --- a/modules/virtualisation/amazon-image.nix +++ b/modules/virtualisation/amazon-image.nix @@ -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 |