Gentoo Archives: gentoo-dev

From: Joshua Kinard <kumba@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] separate /usr without initramfs
Date: Sun, 27 Oct 2019 19:52:46
Message-Id: 2c819f48-5517-38d6-9fd2-8a154a5dc1f0@gentoo.org
In Reply to: Re: [gentoo-dev] separate /usr without initramfs by James Le Cuirot
1 On 10/27/2019 06:06, James Le Cuirot wrote:
2 > On Sun, 27 Oct 2019 05:38:48 -0400
3 > Joshua Kinard <kumba@g.o> wrote:
4 >
5 >> Why do I not like an initramfs, though? Well, for one, it complicates the
6 >> kernel compiles (and it makes them bigger, something which is an issue on
7 >> the old SGI systems at times). Two, it's another layer that I have to
8 >> maintain. Three, it violates, in my mind, the simplicity of keeping the
9 >> kernel and userland separated (e.g., kernel does kernel-y things, userland
10 >> does userland-y things).
11 >
12 > You make it sound like the initramfs has to be built into the kernel
13 > image. It can be but it usually isn't. I suspect you know that though?
14 > Admittedly that does depend on support from your bootloader. While GRUB
15 > and U-Boot have supported this for years, I forget what oddball
16 > bootloaders your hardware may be using.
17
18 As mentioned (and later pointed out in the thread), I use LILO. Considering
19 upstream is dead now, how much longer that will persist is an open question.
20 I am a creature very wedded to habit, and LILO, for whatever its ills and
21 warts are, has always just worked for me, so I have stuck with it. Having
22 to edit a config file before each kernel update is the trivialest of tasks,
23 especially since I tend to only update the kernel once every few months.
24
25 The SGI systems all boot using netboot because I compile their kernels on my
26 dev box and then host them over TFTP. It's just a lot easier that way,
27 especially since ARCS (the SGI version of a BIOS) has had network booting
28 built in since pretty much 1990 (and earlier, I think). It's really the SGI
29 Indy (IP22) that refuses to netboot if the kernel's size is >11MB. All of
30 those kernels are monolithic, since the hardware in such systems is pretty
31 much fixed for all time. Granted, my Indy gave up the ghost some time ago
32 (probably the infamous RTC battery issue), so I am really just left with an
33 O2 (which refuses to netboot anything >41MB), Octane, and two IP27-class
34 systems, which don't have size limits (that I've found yet) for what they'll
35 boot.
36
37 For actual disk booting on those systems, well, there's really just the
38 super-old ArcLoad project. Written by the mastermind behind Octane's Linux
39 port, he aimed to make it very GRUB-like, so it has some of GRUB's
40 filesystem code in it for direct booting, or it can boot kernels stored in a
41 special area of the disk called the volume header (on disks w/ SGI's
42 partition layout). Except that imported GRUB code is beyond ancient (11+
43 years old?), so it probably won't load a kernel off of ext4 or even XFSv5
44 partitions now. Thus you really just have the volume header approach, and
45 that has its own limits.
46
47 That all said, it doesn't really matter if the initramfs is built into the
48 kernel or loaded somewhere into memory by the bootloader. It's still a
49 wholly-separate userland layer that needs its own libc and whatever small
50 amount of tools to help mount required partitions and/or flash CPU microcode
51 before the kernel tries invoking /sbin/init. That's just a terrible design.
52 I mean, you can put lipstick on a pig, but it's still a bloody pig.
53
54
55 >> Maybe I'm just a old codger who refuses to accept change. I'm fine with
56 >> that description. I like things to remain somewhat simple, and my view of
57 >> Linux, both kernel and userland, over the last few years is one of growing
58 >> dismay due to the constant introduction of subsystem layer atop subsystem
59 >> layer for very little gain. How much longer until we need a kernel to boot
60 >> the kernel to mount the userland that mounts the userland (yo dawg)?
61 >
62 > Isn't that what the BIOS and bootloader do? On the plus side, you can
63 > now boot straight from UEFI to kernel without a bootloader but on the
64 > other hand, UEFI is horrifically over-complex.
65
66 Yeah, UEFI is one of those Eldritch horrors spoken of in the Necronomicon.
67 It's really just there so gamerz bois can have their uber-fancy gaming
68 system fully specced out. Ironically, SGI's ARCS was capable of doing most
69 of what UEFI does 20 years ago, including pretty GFX and even playing music
70 when the system boots up (e.g., Indy's infamous "ass trumpet").
71
72 --
73 Joshua Kinard
74 Gentoo/MIPS
75 kumba@g.o
76 rsa6144/5C63F4E3F5C6C943 2015-04-27
77 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
78
79 "The past tempts us, the present confuses us, the future frightens us. And
80 our lives slip away, moment by moment, lost in that vast, terrible in-between."
81
82 --Emperor Turhan, Centauri Republic