On 8/5/19 6:28 PM, Jack wrote:
However, I keep wondering if an overlay file system might not be of some use here. Start with /bin, containing only what's necessary to boot before /usr is available.

I wonder how much of what would need to be in the pre-/usr /bin directory can be provided by busybox. (Assuming that busybox is compiled with everything living in / (root).

Once /usr is mounted, overlay mount /usr/bin on /bin (or would it be the other way around?)

An overlay mount (mount -o bind /usr/bin /bin) would be an additional mount. Which in and of itself is not a bad thing. But the sym-link from /bin -> /usr/bin would avoid the additional mount. Admittedly, you might need one additional (bind) mount somewhere to be able to access the underlay while /usr is mounted.

Unless....

...

Even bigger hack.

What if the underlay (/ (root)) file system had the following structure:

/bin     -> /usr/bin
/usr/bin -> /.bin

That would mean that the pre-/usr /bin contents would still be accessible via /.bin even after /usr is mounted. And /bin would still point to /usr/bin as currently being discussed with /usr merge.



--
Grant. . . .
unix || die

Reply via email to