Is it possible to remount 'rw' if the initial mounting was 'nochanges,norecovery'?
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.