0

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!

6
  • Not sure if it is related but running journalctl reveals “fsck failed with exit status 6.” error.
    – sunknudsen
    Commented Jan 20, 2023 at 19:00
  • By default systemd-fsck could still result in write because The default of fsck.repair= is "preen" because will 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 see RO being 1 when you turn on the hardware read-only feature). See if fsck.repair=no helps. (Probably not though, because it really just answer no to all questions.
    – Tom Yan
    Commented Jan 20, 2023 at 19:46
  • Thanks for helping out @TomYan. Would you recommend using fsck.repair=no rather than fsck.mode=skip? If so, why?
    – sunknudsen
    Commented Jan 20, 2023 at 19:48
  • Well, if it helps, it might allow you to at least know that something is wrong with the fs, but as I edited my last comment, it probably won't help, so you might need to skip it anyway. (Btw I missed "in lsblk output" when I wrote "see RO being 1".)
    – Tom Yan
    Commented Jan 20, 2023 at 19:50
  • 1
    Looks like fsck.repair=no works… will run a complete integration test and report back here if something comes up. Thanks for the feedback @TomYan.
    – sunknudsen
    Commented Jan 20, 2023 at 19:59

0

You must log in to answer this question.

Browse other questions tagged .