Stage 1 improvements:
* Load scsi_wait_scan after all other kernel modules to ensure that all SCSI device nodes have been created. * Increase the timeout for the appearance of the root device to 20 seconds. * Do a "udevadm settle" just after the root device has appeared to make sure that udev isn't accessing the device anymore (hopefully). On EC2 (Xen), I've seen fsck on the root fail randomly with "device in use" errors. svn path=/nixos/trunk/; revision=33650
This commit is contained in:
parent
1e8e83408b
commit
4f4c529979
|
@ -119,11 +119,6 @@ in
|
||||||
boot.kernelPackages = pkgs.linuxPackages_2_6_35;
|
boot.kernelPackages = pkgs.linuxPackages_2_6_35;
|
||||||
boot.kernelParams = [ "console=tty" ];
|
boot.kernelParams = [ "console=tty" ];
|
||||||
|
|
||||||
boot.initrd.kernelModules =
|
|
||||||
[ # Wait for SCSI devices to appear.
|
|
||||||
"scsi_wait_scan"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.postBootCommands =
|
boot.postBootCommands =
|
||||||
''
|
''
|
||||||
mkdir -p /mnt
|
mkdir -p /mnt
|
||||||
|
|
|
@ -106,11 +106,6 @@ in
|
||||||
[ "mvsdio" "mmc_block" "reiserfs" "ext3" "ums-cypress" "rtc_mv"
|
[ "mvsdio" "mmc_block" "reiserfs" "ext3" "ums-cypress" "rtc_mv"
|
||||||
"ext4" ];
|
"ext4" ];
|
||||||
|
|
||||||
boot.initrd.kernelModules =
|
|
||||||
[
|
|
||||||
"scsi_wait_scan"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.postBootCommands =
|
boot.postBootCommands =
|
||||||
''
|
''
|
||||||
mkdir -p /mnt
|
mkdir -p /mnt
|
||||||
|
|
|
@ -46,11 +46,6 @@
|
||||||
"hid_apple"
|
"hid_apple"
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.kernelModules =
|
|
||||||
[ # Wait for SCSI devices to appear.
|
|
||||||
"scsi_wait_scan"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Include lots of firmware.
|
# Include lots of firmware.
|
||||||
require =
|
require =
|
||||||
[ ../hardware/network/intel-4965agn.nix
|
[ ../hardware/network/intel-4965agn.nix
|
||||||
|
|
|
@ -160,6 +160,9 @@ let kernel = config.boot.kernelPackages.kernel; in
|
||||||
|
|
||||||
# Misc. stuff.
|
# Misc. stuff.
|
||||||
"pcips2" "serio" "atkbd" "xtkbd"
|
"pcips2" "serio" "atkbd" "xtkbd"
|
||||||
|
|
||||||
|
# To wait for SCSI devices to appear.
|
||||||
|
"scsi_wait_scan"
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.kernelModules =
|
boot.initrd.kernelModules =
|
||||||
|
|
|
@ -139,6 +139,8 @@ mkdir -p /dev/.mdadm
|
||||||
udevd --daemon
|
udevd --daemon
|
||||||
udevadm trigger --action=add
|
udevadm trigger --action=add
|
||||||
udevadm settle || true
|
udevadm settle || true
|
||||||
|
modprobe scsi_wait_scan || true
|
||||||
|
udevadm settle || true
|
||||||
|
|
||||||
|
|
||||||
# XXX: Use case usb->lvm will still fail, usb->luks->lvm is covered
|
# XXX: Use case usb->lvm will still fail, usb->luks->lvm is covered
|
||||||
|
@ -298,7 +300,7 @@ for ((n = 0; n < ${#mountPoints[*]}; n++)); do
|
||||||
# that we don't properly recognise.
|
# that we don't properly recognise.
|
||||||
if test -z "$pseudoDevice" -a ! -e $device; then
|
if test -z "$pseudoDevice" -a ! -e $device; then
|
||||||
echo -n "waiting for device $device to appear..."
|
echo -n "waiting for device $device to appear..."
|
||||||
for ((try = 0; try < 10; try++)); do
|
for ((try = 0; try < 20; try++)); do
|
||||||
sleep 1
|
sleep 1
|
||||||
if test -e $device; then break; fi
|
if test -e $device; then break; fi
|
||||||
echo -n "."
|
echo -n "."
|
||||||
|
@ -306,6 +308,10 @@ for ((n = 0; n < ${#mountPoints[*]}; n++)); do
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Wait once more for the udev queue to empty, just in case it's
|
||||||
|
# doing something with $device right now.
|
||||||
|
udevadm settle || true
|
||||||
|
|
||||||
echo "mounting $device on $mountPoint..."
|
echo "mounting $device on $mountPoint..."
|
||||||
|
|
||||||
mountFS "$device" "$mountPoint" "$options" "$fsType"
|
mountFS "$device" "$mountPoint" "$options" "$fsType"
|
||||||
|
|
Loading…
Reference in a new issue