From 852e5136380838bc47c1d6da9afa8f3a3a4a5cf9 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 6 Apr 2012 12:23:12 +0000
Subject: [PATCH] * Handle booting from /dev/xvda.

svn path=/nixos/trunk/; revision=33645
---
 modules/system/boot/stage-1-init.sh     | 1 +
 modules/virtualisation/amazon-image.nix | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/system/boot/stage-1-init.sh b/modules/system/boot/stage-1-init.sh
index 8456e3dae15..4d6b9a9cbc1 100644
--- a/modules/system/boot/stage-1-init.sh
+++ b/modules/system/boot/stage-1-init.sh
@@ -255,6 +255,7 @@ mountFS() {
 
 
 # Try to find and mount the root device.
+sleep 3
 mkdir /mnt-root
 
 mountPoints=(@mountPoints@)
diff --git a/modules/virtualisation/amazon-image.nix b/modules/virtualisation/amazon-image.nix
index a86cb1c64fd..329bf44e5a9 100644
--- a/modules/virtualisation/amazon-image.nix
+++ b/modules/virtualisation/amazon-image.nix
@@ -92,7 +92,7 @@ with pkgs.lib;
       diskNr=0
       diskForAufs=
       for device in /dev/xvd*; do
-          if [ "$device" = /dev/xvda1 ]; then continue; fi
+          if [ "$device" = /dev/xvda -o "$device" = /dev/xvda1 ]; then continue; fi
           fsType=$(blkid -o value -s TYPE "$device" || true)
           if [ "$fsType" = swap ]; then
               echo "activating swap device $device..."