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).

I wonder if there's a small C program out there that can call whatever the
kernel functions are to mount a disk partition that could be embedded into a
tiny initramfs, then pivot_root to $REAL_ROOT and run /bin/init?

-- 
Joshua Kinard
Gentoo/MIPS
ku...@gentoo.org
rsa6144/5C63F4E3F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

Reply via email to