meta-readonly-rootfs-overlay icon indicating copy to clipboard operation
meta-readonly-rootfs-overlay copied to clipboard

boot: do not bind mount rofs.

Open eroullit opened this issue 6 years ago • 2 comments

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.

eroullit avatar Aug 09 '18 20:08 eroullit

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 https://github.com/cmhe/meta-readonly-rootfs-overlay/pull/6/commits/20c34f3fd3464c676854f9d65233a5bf901cd91e resolved this?

cmhe avatar Aug 13 '18 07:08 cmhe

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?

eroullit avatar Feb 24 '19 13:02 eroullit