Author: eelco
Date: Thu Apr 12 18:01:19 2012
New Revision: 33766
URL: https://nixos.org/websvn/nix/?rev=33766&sc=1

Log:
* Ugly hack: force udev to exit to prevent random "Device or resource
  busy while trying to open /dev/xvda" errors from fsck.

Modified:
   nixos/trunk/modules/system/boot/stage-1-init.sh
   nixos/trunk/modules/virtualisation/amazon-image.nix

Modified: nixos/trunk/modules/system/boot/stage-1-init.sh
==============================================================================
--- nixos/trunk/modules/system/boot/stage-1-init.sh     Thu Apr 12 17:15:55 
2012        (r33765)
+++ nixos/trunk/modules/system/boot/stage-1-init.sh     Thu Apr 12 18:01:19 
2012        (r33766)
@@ -322,7 +322,7 @@
 
 
 # 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.

Modified: nixos/trunk/modules/virtualisation/amazon-image.nix
==============================================================================
--- nixos/trunk/modules/virtualisation/amazon-image.nix Thu Apr 12 17:15:55 
2012        (r33765)
+++ nixos/trunk/modules/virtualisation/amazon-image.nix Thu Apr 12 18:01:19 
2012        (r33766)
@@ -78,6 +78,14 @@
   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
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to