Subject: Re: Bootable CD?
To: None <port-sparc@NetBSD.ORG>
From: Nick Sayer <nsayer@quack.kfu.com>
List: port-sparc
Date: 10/09/1996 22:14:09
Jeremy Cooper writes:

> On Wed, 9 Oct 1996, Nick Sayer wrote:

> > I want to make a bootable CD for NB-sparc similar to the ones for
> > SunOS 4.x. That is, partition 0 is an ISO filesystem, partitions 1-n
> > are filesystems containing a kernel that loads up a memory filesystem
> > containing tools sufficient to load the miniroot from the ISO slice
> > and boot it (format, dd, mknod, anything else of interest).
> >
> > [ ... ]
> > 
> > 2. When booting the OBP loads /boot, using the list of blocks set
> > up by installboot. So I can make a tiny FS, do an installboot, copy
> > a kernel and whatever else in. Fine. Does the NetBSD /boot know how
> > to read in the kernel from a CDROM based partition instead of a
> > regular disk?

> /boot uses the library routines in /sys/lib/libsa to interpret the
> filesystem handed to it by OBP.  Currently it only understands NFS and
> UFS because there are no ISO9660 routines in the standalone library.

Well, that's ok, since the partitions that are going to actually be
used to boot are going to be UFS. Partition a is the ISO one, but
when you say 'boot cdrom' on a sun4c it boots partition c, not a.

> I suspect that adding the 9660 system to the boot process will require
> creating those routines and modifying /sys/arch/sparc/stand:
> 	conf.c		Add 'file_system_9660' fs_ops structure.
> 	promdev.c	Remove insistance that if the boot device is a
> 			'block' device, the filesystem must be UFS.

> It's quite a project, so unless you're really in a coding mood, I'd say
> the answer is no.

Well, I'd agree if it were actually necessary to boot from the ISO fs,
but it isn't.

The questions are

1. How to build a CDROM partition table

2. How to build a kernel to either have a built-in MFS or initialize
a blank MFS with a file or something along those lines. That is,
the thing you get when you boot the CDROM should allow you to
partition a totally blank disk enough that you can size root and
swap and load miniroot -- the rest can be done after miniroot is
loaded. But since a CDROM is read only, it's not terribly suitable
to be the root of a filesystem (what if a needed device wasn't present
in /dev, for instance?).

3. Is there anything in NetBSD's /boot that would foul up if it realized
it were reading a UFS from a CDROM instead of a regular disk?

-- 
Nick Sayer <nsayer@quack.kfu.com>  | 
N6QQQ @ N0ARY.#NORCAL.CA.USA.NOAM  |      AMD
+1 408 249 9630, log in as 'guest' |      Inside
URL: http://www.kfu.com/~nsayer/   |