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. :)
signature.asc
Description: OpenPGP digital signature