Subject: changing root_device? Or load different kernel (ala /dev/reload)
To: None <firstname.lastname@example.org>
From: Jeremy C. Reed <email@example.com>
Date: 03/11/2002 15:54:29
My goal: I have a CD-based, ram-based netbsd. Currently, it boots with the
kernel configured with "root on cd0a".
I want to try having a ram-based root. I'd prefer to not use symlinks. And
my "root" memory disk will be over 15MB.
I don't think I can use MEMORY_DISK_IS_ROOT, because I'll be limited with
what I place on the root image. And I want to use a big bloated kernel.
(I also hear that some CDs can't boot with 2.88MB image size, only 1.44
1) Create a memory disk with mdconfig and newfs. Mount it and put in the
files I want. Unmount and then use syctl to change my root_device to this
md. I haven't got this to work. Can this 'sysctl -w "kern.root_device=md0"
I also can't even get mdconfig to work. I've tried several ideas that I
found via mailing list archives. Can someone point me to the documentation
or share examples on creating the devices (via mknod), using mdconfig and
then creating a filesystem on it?
(The i386 MAKEDEV doesn't make the raw mode devices for md.)
2) Or I could make a huge ramdisk image and then use mdsetimage to build a
huge kernel (with MEMORY_DISK_IS_ROOT). Is there any way to get my kernel
to use another kernel (ala /dev/reload)? Is there any mechanism for
telling the kernel to use a different kernel?
3) Modify boot(8) so that it knows how to use a cd and cd9660 filesystem.
So I can have it boot my big MEMORY_DISK_IS_ROOT kernel from cd. Has
anyone done this?
Any other ideas?
Jeremy C. Reed