Subject: Re: mfs root without using kernel's memory disk storage area?
To: None <netbsd-help@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 03/08/2002 13:06:03
On 8 Mar 2002, Laine Stump wrote:
> Luke Mewburn <lukem@wasabisystems.com> writes:
> > One possibly solution is to implement a "/boot" which is installed in
> > the 2.88MB "boot image" on the CD-ROM, and that "/boot" knows how to
> > find a NetBSD kernel on the ISO file system.  That NetBSD kernel can be
> > as big as you like (within reason, up to 32MB ?), and you can stuff
> > the memory disk into the tail end of that.
>
> And as long as you're going to do that, you might as well take
> advantage of the fact that you no longer need the kernel in the boot
> image, and use a 1.44MB boot image rather than 2.88. This would allow

Where can I find the docs?

How can I configure a /boot that knows how to use a kernel from the CD?

How can I configure my own boot file (like biosboot.sym) that knows how to
use cd9660 filesystem?

Looking at installboot(8) and boot(8) don't seem to give any clues on how
I can create this or automate this.

I tried this manually:
 > dev cd0a:
 > boot cd0a:netbsd
 booting cd0a:netbsd
 open cd0a:netbsd: Device not configured
 boot cd0a:netbsd: Device not configured
 >

I understand that installboot creates the /boot from biosboot.sym. But how
do I customize it (or biosboot.sym)?

Under FreeBSD, /boot is a directory and has files like loader.4th and
loader.rc under it. And loader.rc can have commands in it like:  echo,
autoboot, rm, etc.

Under NetBSD, do I need to code in sys/arch/i386/stand/biosboot/ ?

Where can I find documentation on making a /boot on ufs floppy image that
knows to boot from /netbsd on a cd9660 filesystem?

This is what I have now:

 dd if=/dev/zero of=myboot.fs count=5760
 vnconfig -t floppy288 -v -c /dev/vnd0d myboot.fs || exit
 disklabel -rw /dev/vnd0d floppy288 || exit
 newfs -B le -m 0 -o space -i 204800 -c 80 /dev/rvnd0a floppy288
 $DIRTREE/usr/mdec/installboot -v -f $DIRTREE/usr/mdec/biosboot.sym /dev/rvnd0a
 mount /dev/vnd0a $MOUNT
 gzip -c -9 $KERNEL > $MOUNT/netbsd
 chmod a+x $MOUNT/netbsd
 umount $MOUNT
 vnconfig -u vnd0d

As you can see, it is just a kernel. This works fine. But I would like to
try to not have a kernel here and just use the kernel from /dev/cd0a.
instead.

   Jeremy C. Reed
   http://bsd.reedmedia.net/

(Off-topic: it sure is time consuming to burn CDs! Especially when only
about one out of four works.)