Comment 0 for bug 2049271

Revision history for this message
Adam Vodopjan (grozzly) wrote :

On a fresh jammy server minimal install I have such fstab entries:

    /dev/sda1 / ext4 defaults 0 1
    /dev/sdb1 /disk1 ext4 nofail 0 2

If the second disk is attached, it boots as supposed with and without overlayroot=tmpfs in the kernel cmdline. In case the disk is unplugged and the kernel cmdline contains overlayroot=tmpfs (without extra :recurse=0), the boot stumbles on such message:

    You are in emergency mode. After logging in, type "journalctl -xb" to ..
    Press Enter for maintenance
    (or press Control-D to continue):

So I press Enter and inspect fstab generated by overlayroot:

    > grep disk1 /etc/fstab
    /dev/sdb1 /media/root-ro/disk1 ext4 ro,nofail,x-systemd.device-timeout=10 0 2
    /media/root-ro/disk1 /disk1 overlay lowerdir=/media/root-ro/disk1,upperdir=/media/root-rw/overlay/disk1,workdir=/media/root-rw/overlay-workdir/disk1 0 2

Evidently, nofail is not applied to the overlay mount, which makes it non optional.

When trying to replicate, it is important to NOT use FAT formatted sdb1 since overlayroot does bypass FAT.