Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] timezone configuration - why copying, not symlinking /etc/localtime ?
Date: Sun, 28 Mar 2021 09:25:53
Message-Id: 20210328102534.65b503e1@symphony.aura-online.co.uk
In Reply to: Re: [gentoo-dev] timezone configuration - why copying, not symlinking /etc/localtime ? by Joshua Kinard
1 On Sat, 27 Mar 2021 18:40:52 -0400
2 Joshua Kinard <kumba@g.o> wrote:
3
4 > On 3/27/2021 18:16, James Le Cuirot wrote:
5 > > On Sat, 27 Mar 2021 17:43:34 -0400
6 > > Joshua Kinard <kumba@g.o> wrote:
7 > >
8 > >> I kinda wish the Linux kernel had an ability to partially boot, init the
9 > >> networking subsystem, then fetch an initramfs image over TFTP like it can do
10 > >> with NFS Root. That would solve the problem on my MIPS system(s) (and make
11 > >> install netboots better). I've dug around, but this does not seem to be a
12 > >> capability currently in the kernel, unless I have over looked something.
13 > >>
14 > >> Otherwise in the future, I may just have to setup an initramfs into an NFS
15 > >> Root and teach the SGI's to somehow deal with it. Which all still seems
16 > >> unnecessarily complicated because some other distro thinks it knows what's
17 > >> best for everyone else (but I digress...).
18 > >
19 > > NBD may be a slightly simpler alternative and a bit more like an
20 > > initramfs. nbdkit can do all sorts of weird things. I thought it might
21 > > have a plugin for cpio archives, allowing you to use a regular
22 > > initramfs generated by Dracut or similar directly. It doesn't appear to
23 > > but plugins are quite easy to write. Alternatively you could just
24 > > extract the initramfs and use nbdkit-linuxdisk-plugin.
25 >
26 > Can NBD be used like I described? Never played with it before. The MIPS
27 > machine has functioning local disk drives, and currently, it boots fine by
28 > just pulling a kernel off my TFTP server and booting from the local drive,
29 > no initramfs needed because I compiled everything into it. If we ever force
30 > sep-usr to end, then I'll need a way to teach it to mount /usr before
31 > dropping into /bin/init (and nothing else).
32
33 Apologies, I went to experiment with this idea but I'd forgotten that
34 booting over NBD is not a built-in kernel feature and requires... an
35 initramfs. NFS looks like the only option with this general approach.
36
37 Rich is right though, the initramfs can be tiny. Dracut images are
38 heavy because they are very flexible and pack a lot of features but
39 none of that is required.
40
41 The kexec idea would be a nice bonus for you, if it works. Limiting
42 what kernel features you can enable must be frustrating.
43
44 It's also worth bearing in mind that you could just generate an image
45 with Dracut and extract it to a disk partition. That may seem a little
46 pointless if you're not using something like LVM or encryption but I
47 don't see the point in separate /usr either. ;) I'm guessing you don't
48 want to change your partition layout at this point though.
49
50 --
51 James Le Cuirot (chewi)
52 Gentoo Linux Developer

Replies