[pkg-cryptsetup-devel] Bug#914458: Bug#914458: cryptsetup-initramfs: Unable to open the LUKS system container at boot with the right password 6 times

Mikhail Morfikov mmorfikov at gmail.com
Fri Nov 23 21:23:40 GMT 2018


On 23/11/2018 22:02, Guilhem Moulin wrote:
> On Fri, 23 Nov 2018 at 21:41:42 +0100, Mikhail Morfikov wrote:
>> On 23/11/2018 20:37, Guilhem Moulin wrote:
>>> Did you also add a loop to wait for the block device holding the LUKS
>>> header?  Since the device is discovered asynchronously you need to wait
>>> for it in order to eliminate the race.
>>
>> What exactly should I add?
> 
> Something along the lines (you might want to add a timeout too) of
> 
> DEVICE=/path/to/block/device
> if [ ! -b "$DEVICE" ]; then
>     echo "Waiting for device..." >&2
>     until [ -b "$DEVICE" ]; do
>         sleep 1
>     done
> fi
> 
> mount -t ext4 -o ro "$DEVICE" /boot
> 
That actually worked! I took just one pass to detect the device. All errors I
had even before, now disappeared, and everything works as it should now. Thank
you for fixing this. :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-cryptsetup-devel/attachments/20181123/b5e894d9/attachment.sig>


More information about the pkg-cryptsetup-devel mailing list