Subject: Re: bootable non-install CD
To: None <port-i386@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: port-i386
Date: 06/28/2003 17:45:21
On Sat, 28 Jun 2003, Steve Bellovin wrote:
> Specifically, I want to put a file system on a CD, plus a boot block 
> that will load the kernel from that CD, and run it, multi-user.  I want 
> X, I want /usr/pkg, I want amd -- I want a running NetBSD system that I 
> can use on a machine that has nothing but Windows on its hard drives.

This is i386, so you need to put the kernel inside a bootable floppy
disk image, and put the floppy disk image inside a file in the CD's file
system.  Getting it right will probably be tricky.

> The instructions at http://www.netbsd.org/Documentation/bootcd.html
> say to use boot-big, but that always dumps me into sysinst, which
> isn't what I want.

I am not aware of any canned solution, but you should be able to re-use
some of the infrastructure that creates boot-big.  You'll need to modify
it to: not bother with the crunchgen and memory disk stuff; and use your
preferred kernel.

> There are other interesting challenges, such as what to do about applications
> that absolutely demand a writable file system.  I may play around with
> mount_union (or mount_null or mount_overlay, as soon as I understand
> the differences between the three....) to overlay / (or at least /usr)
> with an mfs file system very early in the boot process.  But I need
> to get CD booting working first.

mount_union is probably the one that you want.  I think it will refuse
to mount on top of "/".

> I tried mkisofs with biosboot.sym, but it complained that it was the
> wrong size.  Could I use vnd to mount a .iso file and then use
> installboot on it?

I believe that the mkisofs "-b" option wants the name (relative to the
CD file system) of a file that's exactly 2880 kB in size.  During boot,
the BIOS will pretend that the file is a 2.8MB floppy disk mounted in
drive "A".

--apb (Alan Barrett)