bcachefs icon indicating copy to clipboard operation
bcachefs copied to clipboard

Is it possible to remount 'rw' if the initial mounting was 'nochanges,norecovery'?

Open thememika opened this issue 1 year ago • 0 comments

Hello. I'm designing a Linux system and I decided to use bcachefs. I don't use an initrd, but I want to implement resuming from hibernation. To do that, I need to initially mount the FS at "/" not just "ro", but without making any writes at all. Currently I do it like this: ... rootfs=bcachefs ... rootflags=ro,nochanges,norecovery. The FS gets mounted without ANY writes, that's good. My special program gets ran as PID 1 by the kernel. It welcomes the user, and checks whether a "resume image" exists. If it does, it resumes it via /sys/power/resume. If no image is available, it remounts the root filesystem R/W and exec()s the actual /sbin/init.
But it's only a concept, and I am not able to implement it. I'm facing the problem that it's not possible to remount my FS read-write if it was initially mounted with the nochanges,norecovery opts. I get this:

[    8.937806] [    T1] bcachefs (mmcblk0p13): error going rw: -2241

Is it possible to overcome this and go R/W anyway? Thanks.

thememika avatar Sep 21 '24 21:09 thememika