[Pkg-cryptsetup-devel] Bug#488271: Bug#488271: cryptsetup: use a loop to wait for the root device

Reinhard Tartler siretart at tauware.de
Tue Jul 1 15:46:15 UTC 2008


David Härdeman <david at hardeman.nu> writes:

> On Fri, Jun 27, 2008 at 02:31:50PM +0100, James Westby wrote:
>>  https://launchpad.net/bugs/164044
>>
>>a user said that he was unable to boot with the root device
>>being a slow USB device, as the udevsettle call was only
>>sufficient if the kernel was currently processing an event
>>which would cause the device to appear. If the event is so slow
>>that the udevsettle call is made prior to it's arrival
>>the boot will fail.
>>
>>The attached patch is used in Ubuntu to implement a sleeping
>>loop waiting for the device to appear, as is done for a
>>normal root device. Please consider applying the patch.
>
> initramfs-tools already has a rootdelay parameter which is executed
> before the cryptsetup initramfs script. What is the advantage of
> duplicating that functionality?

the rootdelay parameter makes the initramfs loop until the root device
appears. It does not help the cryptsetup hook in any way. If the control
flow reaches the point the patch adds the loop and the device holding
the crypted volume it will silently fail and pass control to the
initramfs, which itself fails after 5 minutes (by default). This usually
happens with slow devices like usb sticks, according to bug reports in
launchpad.

I agree that it would be nice if we could re-use the functionality from
initramfs-tools. However it is not written in a reusable way.

Do you see a better way solving the problem? 

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4





More information about the Pkg-cryptsetup-devel mailing list