Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

boot: do not bind mount rofs. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eroullit
Copy link

@eroullit eroullit commented Aug 9, 2018

The read-only bind mount logic does not work properly and the system panic as the bind mount operation failed.

rorootfs-overlay: Could not mount PARTUUID=e7015e0b-c7e3-4f70-a483-f9bc2d7e8fda, bind mounting...
EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
chroot: can't execute '/sbin/init': No such file or directory
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00

I have removed the bind mount logic and the overlay is prepared properly where the read-only filesystem is mounted from root= and rootrw= is mounted read-write as overlayfs. When no rootrw= is given an ad-hoc tmpfs is created.

Signed-off-by: Emmanuel Roullit <[email protected]>
@cmhe
Copy link
Owner

cmhe commented Aug 13, 2018

Are you sure about this? From your log snipped: not bind mounting fails but mounting 'PARTUUID=...', then bind mounting succeeds but starting '/sbin/init' fails, which causes the panic.

So the idea is to implement mounting of 'PARTUUID=...' has to be done. Has your patch 20c34f3 resolved this?

@eroullit
Copy link
Author

I gave another go at this code section by only providing a rootrw= argument and panics with this message:

rorootfs-overlay: Could not mount , bind mounting...
switch_root: can't execute '/sbin/init': No such file or directory
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100

In any case, which are the use cases to bind mount the read-only filesystem?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants