Subject: Re: boot blocks - all platforms / kernel ramdisk load from file
To: David Laight <>
From: Christopher Tribo <>
List: tech-kern
Date: 02/24/2003 11:52:46
On Mon, 24 Feb 2003, David Laight wrote:

> > - El Torito CD-ROM in hard disk emulation mode loads kernel with MD 
> > ramdisk stuffed into kernel.
> > - /etc/rc mounts floppy drive to /etc && invokes the actual rc system 
> > contained on it
> > - /etc/fstab mounts cdrom file system
> > - /usr file system mounted ro as vnd0 from iso9660 fs via fstab. (requires 
> > hacking rc.d and/or extending mount?)
> Given the cost of CDR mediam why have config files on floppy?

	Just easier for development in my situation. I could put them on 
the CD, but it's pointless to argue about because that isn't the problem 
at hand. Mounting a floppy disk, making changes and hitting the reset 
switch is a lot less time consuming than:

-edit files
-vnconfig kernel ramdisk
-copy files into ramdisk
-unconfig ramdisk
-stuff ramdisk into kernel
-vnconfig boot.fs
-copy kernel over
-unconfig boot.fs
-make another ISO
-burn another CD
-throw away another CD
-repeat ad finitium

> > 	This hits several big hurdles:
> > 
> > -i386, El Torito hard disk emulation mode has near-zero documentation.
> That is because it is so stupid^H^H^H^H^H^Htrivial.  You put a floppy
> image in a file on the CD, the BIOS does translations to make that
> data look EXACTLY like the floppy drive.

	I understand how floppy disk emulation works. but what happens 
when you exceed the 2.88MB boundary that floppy disk emulation mode 
supports? That is the point of this thread. Hard disk emulation mode does 
not say if it uses any sort of translation or not. Do we just have our 
users boot the install CD and then insert disk 2 into the floppy disk 
drive that their machine may not have in the future? 

	Furthermore, at some point we're going to have to/want to move 
the ram disks out of the kernel itself and move to stage 2. (e.g. Linux 
booting: vmlinuz + initrd.img) Currently NetBSD has no forseable way to 
do this because our kernel doesn't support it. MacPPC is already largely 
without USB support in the install kernel because otherwise the kernel 
with ramdisk is too large for old versions of OpenFirmware to grok.

	This would also potentially help solve the inability to boot from 
RAID devices and/or RAIDframe/ccd on most platforms.

> You can't load access the CD itself until the kernel is loaded because
> everything before that is accessing the disks using bios calls.
> Nothing in netbsd knows how to issue bios reads of the cdrom (I suspect
> it may be drive E0 on some systems).

	Drive 80 according to the pheonix docs; it replaces the primary 
hard drive in the BIOS table and bumps everything else up one (in hard 
disk emulation mode)

I'm trying to port NetBSD to my cup of tea, but it keeps kernel panicking 
on refill. This is odd, because I ported it to my toaster and my bookcase 
easily enough and it survives bread- and book-replacement fine.

Any hints?

Jared Earle -