Is there any value to using initrd/initramfs for the initial ram file system? 
These seem to be the “standard” mechanism used by bootloaders for adding an 
initial ram based file system to a kernel. All bootloaders support initrd and 
initramfs.

The nice thing about initramfs (which replaced initrd) is that you can pass 
multiple initramfs files to the bootloader which will then overlay the 
filesystems on top of each other which allows a base file system image to 
remain the same and you just pass in a second initramfs to modify any specific 
files you want customised.

initramfs/initrd also separates the initramfs from the kernel meaning no need 
to recompile the rump kernel for changes to ramfs filesystem, just make a new 
initramfs or add an additional initramfs overlay with just the modified files.

As I understand it, Linux kernels link in a small initramfs as described here:

https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt

So in grub2.cfg for example:

menuentry ‘rumpkernel' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    multiboot rump-os.gz 
    initrd /boot/rumproot.gz /boot/my_initramfs.gz
    echo   'Loading rump kernel...'
}

The downside of course is that I can’t find any documentation suggesting that 
NetBSD supports initramfs/initrd, although given that it is the job of the 
bootloader to load the initramfs into ram along with the kernel during boot, 
presumably if you specify initramfs in your boot loader then it will be there 
in ram alongside the rump kernel.

as


Reply via email to