meta-readonly-rootfs-overlay
meta-readonly-rootfs-overlay copied to clipboard
boot: do not bind mount rofs.
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.
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?
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?