Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thememika opened this issue Sep 21, 2024 · 0 comments

Comments

@thememika
Copy link

thememika commented Sep 21, 2024

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 thememika changed the title Is it possible to remount 'rw' if the initial mounting was 'nochange,norecovery'? Is it possible to remount 'rw' if the initial mounting was 'nochanges,norecovery'? Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant