[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Root is in RO after boot



On 1/7/20 4:33 PM, David Wright wrote:
On Tue 07 Jan 2020 at 14:58:08 (+0200), George Shuklin wrote:
After recent minor package upgrade (I'm on sid) I found that the root
filesystem is in 'RO' mode. I changed 'ro' into 'rw' in grub.conf and
after reboot everything works fine. Any update which triggers
update-grub causes 'ro' back.
Assuming you mean grub.cfg, you shouldn't do that. Your initialisation
system will take care of switching from ro to rw at the correct time.

I know, I've shouldn't, but at least I got a system with working UI.
I want to fix this problem, but I can't find a place where 'rw' remount happens.

I tried to find what's broke, but failed.

I can't find who remounts root filesystem into rw mode. Is this some
systemd generators magic? Or is this happens inside initrd?
You need to look at your logs. I've only had root switch to ro upon
getting i/o errors, which is what the fstab entry for root specifies:

LABEL=swan07  /  ext4  errors=remount-ro  0  1

It's a safety feature to stop those errors from gradually corrupting
the filesystem further.

RO on errors is a separate thing.

As far as I understand (the fact I started the thread is a proof I don't), initrd mounts root as readonly, and something after pivot_root doing mount -o remount,rw for /.

Unfortunately, I absolutely coudn't find it.

There is a unit '-.mount' which claims to be root mount generated by systemd-fstab-generator, but I can't see any problems with it.

Moreover, funny or not, I've just tried to reproduce the problem (run update-grub, reboot), and problem had gone. Now root is mounted as 'ro', remounted with no issues.

So, I suppose, it gonna be a mystery. This problem (I reproduced it few times) was, and now it gone by itself.


Reply to: