Grokking miniroot.kmod etc.

Hubert Feyrer <[email protected]>
Newsgroups gmane.os.netbsd.devel.installation
Message-ID <[email protected]>
Hi Andy,

I'm trying to understand how the new world order works WRT loading a 
ramdisk from the boot loader, in order to update g4u.

My understanding of the previous system is:
  * we make a ramdisk image (ramdisk.fs) e.g. from
    src/distrib/i386/ramdisks
  * we make a kernel that has options MEMORY_DISK_HOOKS and
    MEMORY_DISK_IS_ROOT (and possibly MEMORY_DISK_ROOT_SIZE)
  * we put the ramdisk image into the kernel with mdsetimage,
    and get a kernel that has the ramdisk
  * we then use the regular boot loader to load the kernel and
    use the ramdisk image as root filesystem

Now with the new world order, I see a number of bits that I can't fit 
together:
  * we build a ramdisk image from e.g. src/distrib/i386/ramdisks as
    before
  * There's src/sys/modules/miniroot which builds/installs e.g.
    /stand/i386/4.99.72/modules/miniroot/miniroot.kmod, but it seems
    unrelated to the ramdisk image. Is that correct? What's this
    needed for, at all?
  * for the kernel, I guess the MEMORY_DISK_HOOKS kernel option is still
    needed, but instead of MEMORY_DISK_IS_ROOT and esp.
    MEMORY_DISK_ROOT_SIZE, MEMORY_DISK_DYNAMIC is needed. Does that make
    sense?
  * Now, how to fit things together? Where does the ramdisk image come
    into play?
  * How to tell the bootloader to load the ramdisk after the kernel?
    My guess this is done via boot.cfg - is there an example?
    What is the /ramdisk.kmod mentioned in boot.cfg.4, is it the
    ramdiskbin.fs? Where exactly is this put?

Thanks!


  - Hubert
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.