Gentoo Archives: gentoo-dev

From: Joshua Kinard <kumba@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] timezone configuration - why copying, not symlinking /etc/localtime ?
Date: Sat, 27 Mar 2021 22:40:59
Message-Id: e588eca7-90a5-cb08-34c4-3ac60854ce76@gentoo.org
In Reply to: Re: [gentoo-dev] timezone configuration - why copying, not symlinking /etc/localtime ? by James Le Cuirot
1 On 3/27/2021 18:16, James Le Cuirot wrote:
2 > On Sat, 27 Mar 2021 17:43:34 -0400
3 > Joshua Kinard <kumba@g.o> wrote:
4 >
5 >> I kinda wish the Linux kernel had an ability to partially boot, init the
6 >> networking subsystem, then fetch an initramfs image over TFTP like it can do
7 >> with NFS Root. That would solve the problem on my MIPS system(s) (and make
8 >> install netboots better). I've dug around, but this does not seem to be a
9 >> capability currently in the kernel, unless I have over looked something.
10 >>
11 >> Otherwise in the future, I may just have to setup an initramfs into an NFS
12 >> Root and teach the SGI's to somehow deal with it. Which all still seems
13 >> unnecessarily complicated because some other distro thinks it knows what's
14 >> best for everyone else (but I digress...).
15 >
16 > NBD may be a slightly simpler alternative and a bit more like an
17 > initramfs. nbdkit can do all sorts of weird things. I thought it might
18 > have a plugin for cpio archives, allowing you to use a regular
19 > initramfs generated by Dracut or similar directly. It doesn't appear to
20 > but plugins are quite easy to write. Alternatively you could just
21 > extract the initramfs and use nbdkit-linuxdisk-plugin.
22
23 Can NBD be used like I described? Never played with it before. The MIPS
24 machine has functioning local disk drives, and currently, it boots fine by
25 just pulling a kernel off my TFTP server and booting from the local drive,
26 no initramfs needed because I compiled everything into it. If we ever force
27 sep-usr to end, then I'll need a way to teach it to mount /usr before
28 dropping into /bin/init (and nothing else).
29
30 I wonder if there's a small C program out there that can call whatever the
31 kernel functions are to mount a disk partition that could be embedded into a
32 tiny initramfs, then pivot_root to $REAL_ROOT and run /bin/init?
33
34 --
35 Joshua Kinard
36 Gentoo/MIPS
37 kumba@g.o
38 rsa6144/5C63F4E3F5C6C943 2015-04-27
39 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
40
41 "The past tempts us, the present confuses us, the future frightens us. And
42 our lives slip away, moment by moment, lost in that vast, terrible in-between."
43
44 --Emperor Turhan, Centauri Republic

Replies