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

Guilhem Moulin guilhem at debian.org
Fri Nov 23 21:02:18 GMT 2018


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

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


More information about the pkg-cryptsetup-devel mailing list