Skip to content

Conversation

@RaitoBezarius
Copy link
Contributor

In A/B schemas, it is possible to have multiple rootfs.

Thus, it is necessary to let the B kernel preinitialize either the A rootfs or the B rootfs failing to mount the A rootfs.

Ideally, we should also try to switch to the B rootfs if we cannot start up the init on the A rootfs, but that's a FUTUREWORK.

In A/B schemas, it is possible to have multiple rootfs.

Thus, it is necessary to let the B kernel preinitialize either the A
rootfs or the B rootfs failing to mount the A rootfs.

Ideally, we should also try to switch to the B rootfs if we cannot start
up the init on the A rootfs, but that's a FUTUREWORK.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
@telent
Copy link
Owner

telent commented Apr 21, 2024

If I understood correctly what this does, supplying altroot=/dev/foo root=/dev/bar as a command line parameter will cause it to attempt to mount /dev/foo if mounting /dev/bar failed ?

@RaitoBezarius
Copy link
Contributor Author

If I understood correctly what this does, supplying altroot=/dev/foo root=/dev/bar as a command line parameter will cause it to attempt to mount /dev/foo if mounting /dev/bar failed ?

That's correct!

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
I have it all the time in front of my nose :'( otherwise.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
@RaitoBezarius
Copy link
Contributor Author

OK, this work, but the altroot is semi-useless to be honest because of how UBI works.

If the first UBI device is not attached (failure), the second UBI failure will be attached and root=ubi:rootfs will be sufficient.

The interesting commit is 59d6640 (#4)
because it makes the Zyxel able to operate with one single DTB in A/B situations.

Though, it's important to notice that kernel A and B will boot in priority on UBI A.

Ideally, the next step is to have an overlayfs to mount rootfs_data on the top of UBI A and make changes persist to that UBI rather than to UBI A and go to a failover mode like OpenWRT where, if, the overlayfs prevent the boot, we can always enter the device into a mode where the personalization is ignored.

It bring forth a bunch of questions on how to deploy Liminix systems in production "safely" tbh.

RaitoBezarius pushed a commit to RaitoBezarius/liminix that referenced this pull request Aug 23, 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

Successfully merging this pull request may close these issues.

2 participants