On Sat, 27 Mar 2021 18:40:52 -0400 Joshua Kinard <ku...@gentoo.org> wrote:
> On 3/27/2021 18:16, James Le Cuirot wrote: > > On Sat, 27 Mar 2021 17:43:34 -0400 > > Joshua Kinard <ku...@gentoo.org> wrote: > > > >> I kinda wish the Linux kernel had an ability to partially boot, init the > >> networking subsystem, then fetch an initramfs image over TFTP like it can > >> do > >> with NFS Root. That would solve the problem on my MIPS system(s) (and make > >> install netboots better). I've dug around, but this does not seem to be a > >> capability currently in the kernel, unless I have over looked something. > >> > >> Otherwise in the future, I may just have to setup an initramfs into an NFS > >> Root and teach the SGI's to somehow deal with it. Which all still seems > >> unnecessarily complicated because some other distro thinks it knows what's > >> best for everyone else (but I digress...). > > > > NBD may be a slightly simpler alternative and a bit more like an > > initramfs. nbdkit can do all sorts of weird things. I thought it might > > have a plugin for cpio archives, allowing you to use a regular > > initramfs generated by Dracut or similar directly. It doesn't appear to > > but plugins are quite easy to write. Alternatively you could just > > extract the initramfs and use nbdkit-linuxdisk-plugin. > > Can NBD be used like I described? Never played with it before. The MIPS > machine has functioning local disk drives, and currently, it boots fine by > just pulling a kernel off my TFTP server and booting from the local drive, > no initramfs needed because I compiled everything into it. If we ever force > sep-usr to end, then I'll need a way to teach it to mount /usr before > dropping into /bin/init (and nothing else). Apologies, I went to experiment with this idea but I'd forgotten that booting over NBD is not a built-in kernel feature and requires... an initramfs. NFS looks like the only option with this general approach. Rich is right though, the initramfs can be tiny. Dracut images are heavy because they are very flexible and pack a lot of features but none of that is required. The kexec idea would be a nice bonus for you, if it works. Limiting what kernel features you can enable must be frustrating. It's also worth bearing in mind that you could just generate an image with Dracut and extract it to a disk partition. That may seem a little pointless if you're not using something like LVM or encryption but I don't see the point in separate /usr either. ;) I'm guessing you don't want to change your partition layout at this point though. -- James Le Cuirot (chewi) Gentoo Linux Developer
pgpAb6gauIo0N.pgp
Description: OpenPGP digital signature