|
|
Subscribe / Log in / New account

Debian still having trouble with merged /usr

Debian still having trouble with merged /usr

Posted Apr 7, 2022 0:20 UTC (Thu) by mathstuf (subscriber, #69389)
In reply to: Debian still having trouble with merged /usr by KJ7RRV
Parent article: Debian still having trouble with merged /usr

The problem that convinced me the most was that tools needed in early boot lived in the `/` prefix but ended up using a bundle of libraries or other things that were prefixed in `/usr` (which is why "mount /usr after $some_point" was hard to determine and, IMO, justifiably not a supported mode). Moving things to `/` just because some early-boot tool ended up using it seemed a bit drastic to me.


to post comments

Debian still having trouble with merged /usr

Posted Apr 7, 2022 6:03 UTC (Thu) by epa (subscriber, #39769) [Link] (9 responses)

I think the old idea of mounting / first and /usr later on became obsolete when initrd came in. Now it’s the initial ramdisk which is the “minimal filesystem” used for early setup and for mounting other things. The full filesystem is simply /.

Debian still having trouble with merged /usr

Posted Apr 7, 2022 9:22 UTC (Thu) by farnz (subscriber, #17727) [Link] (8 responses)

And of course, as referenced elsewhere in this thread, the reason to have a split between / and /usr is that you can't have a / partition that's big enough to store the whole system, so you put some of the binaries in /usr instead. This is all from the days before UNIX did dynamic linking, so it's fairly trivial to get the split right.

Since then, we've acquired snapshotting filesystems (LVM snapshots, ZFS, Btrfs), which make it easier to administer the system if you never want to take a snapshot of /, instead snapshotting mount points under /. This motivates a gradual move to having / just contain mount points, and in turn motivates merging /bin and /lib into /usr.

Debian still having trouble with merged /usr

Posted Apr 8, 2022 10:53 UTC (Fri) by smurf (subscriber, #17840) [Link] (1 responses)

Well, you can teach btrfs to default-mount a subvolume instead of the "real" root, so snapshotting your whole system does work if done correctly.

This option is not supported by most installers … but that's a different problem.

Debian still having trouble with merged /usr

Posted Apr 8, 2022 11:34 UTC (Fri) by farnz (subscriber, #17727) [Link]

Oh yes, it's entirely possible to snapshot /bin and /lib atomically while not snapshotting the rest of the root filesystem, it's just not as easy as having everything in a subdirectory that you snapshot instead.

Debian still having trouble with merged /usr

Posted Apr 8, 2022 16:38 UTC (Fri) by jhhaller (guest, #56103) [Link] (5 responses)

Sit down kids, Grandpa is going to tell a story about the olden days.

The first Unix system I used had a single RK05 removable hard drive (2.5 MB capacity), and a 9-track magnetic tape based on a PDP 11/40. It could fit Unix v6 on that drive with some room for user files. When we got Unix v7, it no longer fit on a single drive, and ended up having to use a dd backup of the hard drive root partition to the tape to extract some of the good bits. You haven't lived unless you have booted root from a tape drive. The stuff in /usr/bin absolutely would not fit, maybe one or two critical pieces. But, that was the big reason for / and /usr being separate. Even when moving to larger drives (RP06) 176 MB drive, having /usr separated into a separate device was helpful. There were some optimizations for having /bin, such as being faster to access executables earlier in the search path, but not noticeable for interactive jobs. Distributions didn't have packages, you got everything.

Few of these reasons still exist today, between larger devices and optional package installations. While that doesn't make converting existing systems easy, there is no reason to keep a relic of ancient times.

Debian still having trouble with merged /usr

Posted Apr 8, 2022 17:20 UTC (Fri) by farnz (subscriber, #17727) [Link] (4 responses)

And importantly, in the modern world, we have the initramfs, which is the root you boot from (replaces the tape or the boot RK05/RP06 in your story).

So the same split between a minimal FS to boot from and a big FS for the running system still exists - it's just that the minimal FS is now the initramfs, not your root partition on a real disk.

Debian still having trouble with merged /usr

Posted Apr 9, 2022 2:24 UTC (Sat) by pabs (subscriber, #43278) [Link] (3 responses)

The way that we generate the initramfs is pretty terrifying; use horrifying scripts to copy random files from the rootfs and hope they work properly. I would like to see some sort of package manager for generating the initramfs.

Debian still having trouble with merged /usr

Posted Apr 9, 2022 6:47 UTC (Sat) by zdzichu (subscriber, #17118) [Link] (1 responses)

There are some ideas floating… like https://www.youtube.com/watch?v=GATg_bqmASc (Building Initrd Images from RPMs
, Nest with Fedora 2021).

Debian still having trouble with merged /usr

Posted Apr 9, 2022 9:40 UTC (Sat) by bluca (subscriber, #118303) [Link]

Yes, there is ongoing work in Fedora to implement initrd at the distro level as immutable signed images, with extensions so that non default hardware modules can be supported seamlessly

Debian still having trouble with merged /usr

Posted Sep 9, 2022 22:42 UTC (Fri) by anatolik (guest, #73797) [Link]

There is a new project called Booster that tries to tackle the craziness with shell scripts in the iniramfs.

https://github.com/anatol/booster


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds