Subject: Re: changing root_device? Or load different kernel (ala /dev/reload)
To: Jeremy C. Reed <firstname.lastname@example.org>
From: Andrew Gillham <email@example.com>
Date: 03/11/2002 16:47:25
On Mon, Mar 11, 2002 at 03:54:29PM -0800, Jeremy C. Reed wrote:
> 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
> image size.)
You could use small ramdisk for / and then mount_mfs more space? Populate
the space by untarring a file from the CD, and using mount_null to overlay
/bin /sbin, etc.
root on md0a
mount -t mfs -o -s=<size> swap /mfs
mount -r -t cd9660 /dev/cd0a /mnt
tar xzpf /mnt/ramdisk.tgz
mount -t null /mfs/etc /etc
mount -t null /mfs/bin /bin
mount -t null /mfs/sbin /sbin
mount -t null /mfs/var /var
mount -t null /mfs/usr /usr