I enabled tmpfs overlayroot running following.
$ sudo sed -i 's/overlayroot=""/overlayroot="tmpfs"/g' /etc/overlayroot.conf
After rebooting, Ubuntu boots as read-only and everything works as expected and nothing is written to disk (confirmed using disk checksum).
Then, when I set disk to hardware read-only (a feature of datAshur PRO² USB flash drives), Ubuntu boots to emergency mode.
UPDATE: using fsck.mode=skip
solves the issue but why do I have to skip filesystem check?
Why? What am I missing? Thanks for helping out!
journalctl
reveals “fsck failed with exit status 6.” error.The default
of fsck.repair=is "preen"
becausewill automatically repair problems that can be safely fixed
. Even if there's nothing to repair, the program (or the real fs-specific fsck program it calls) would probably "open" the partition it checks in read-write mode, which could still fail if it somehow detects that the device is read-only (e.g. if you seeRO
being1
when you turn on the hardware read-only feature). See iffsck.repair=no
helps. (Probably not though, because it really justanswer no to all questions
.fsck.repair=no
rather thanfsck.mode=skip
? If so, why?lsblk
output" when I wrote "seeRO
being1
".)fsck.repair=no
works… will run a complete integration test and report back here if something comes up. Thanks for the feedback @TomYan.