:: Re: [DNG] running with separate / a…
Forside
Slet denne besked
Besvar denne besked
Skribent: marc
Dato:  
Til: Dng
Nye-emner: [DNG] initramfs (was: running with separate / and /usr)
Emne: Re: [DNG] running with separate / and /usr
Hello all

There is this nice saying: "Those who do not understand
unix are doomed to re-invent it, poorly".

Sure, initially the / vs /usr split was needed to optimise
disk combinations of speed and size. But that is just the,
let say, "mutation" that kicked it off. The reason that it
has survived is because it has improved the "fitness" of the
system. A small root (/) is useful as it allows one to bring
up a simple smaller system, which then initialise or recover
the big and complex one in /usr.

And here is where the "re-invent it poorly" comes in: Linux
has shifted some of this work into the initrd or initramfs. My
view is that the initramfs is a mess:

  - it differs between distributions
  - it is brittle to update (a complex build tool is needed)
  - it is redundant (needs to copy loads of files around. Maybe
      not an issue on the 100TB system you have, but the smartwatch or
      smartbulb builder might see it differently)
  - configurations are duplicated, hardcoded or non-obvious.
  - it is opaque - not easy to look in to with ls.
  - its system recovery utilities are deficient
  - as are the interactive tools


In my ideal distribution initramfs and / would be the same,
while /usr would be the big complex system which allows
very custom configurations (eg cryptoloop over nbd).

A system with initramfs==/ permits some nice things:

  Some configuration might keep / as a ramdisk:
    That makes it faster and survive bad disk crashes
    or disk hotplugging, though persistence of /etc would
    be tricky. Perhaps a revision control system might help
    there (rolling back bad /etc changes could be neat ?), or just
    another mount point.


  Another config would not have a ramdisk at all:
    That requires a custom kernel (quite reasonable on certain classes of
    hardware) but with the benefit of a bootup that is quicker, simpler
    and more space efficient.


I know the idea of initramfs==/ is weird, quite some effort
and probably not for devuan just yet, but the systemd crowd
has not shown any restraint working linux/debian over.

Perhaps one day it will get bad enough (ls in golang,
cp in rust) that we might have to throw up our hands, build and
maintain our own / with a nice init, sane libc, compact
toolset (busybox, maybe ?) and just mount debian
under /usr, readonly and treat it almost like a container. At that
point a merged / and /usr in debian would actually be desirable,
as that makes it easier to substitute in our own root (/)

regards

marc