Subject: Re: bootable kernel with embedded filesystem
To: Hubert Feyrer <hubert@feyrer.de>
From: Brook Milligan <brook@biology.nmsu.edu>
List: current-users
Date: 07/10/2006 17:20:29
Hubert Feyrer writes:
 > Was that INSTALL_LAPTOP the one from 
 > src/sys/arch/i386/compile/INSTALL_LAPTOP (i.e. w/o the ramdisk) or from 
 > src/distrib/i386/instkernel (i.e. the one that has the ramdisk embedded)?
 > I could imagine the former one to explode when it tries to mount "root on 
 > md" when there's nothing at md, but the latter should work.

This was all with kernels containing the ramdisk image.  The kernel
never actually got to the point of mounting the ramdisk, though.  In
fact, a subsequent try with kernels lacking a ramdisk image yielded
exactly the same results.

 > BTW, knowing what the last few lines before the explosion are would be 
 > useful. Can you boot the bootcd-com.iso and see what the last few lines 
 > are before crashing? Maybe you can run this in qemu (-nographic for 
 > cut&paste) and get the same error... it's easier to debug.

I've now tried the following kernels, all compiled from 2006-07-07
00:00:00 UTC, and they give essentially the same results.  The last
two lines of the kernel messages (as best I could read before they
disappeared) involve the following devices:

     kernel		kernel messages involving ...
     ==============	=============================
     INSTALL		wskbd0, isapnp0
     INSTALL_LAPTOP	sysbeep0, isapnp0
     INSTALL_SMALL	wdc0, atabus0
     INSTALL_TINY	wdc0, atabus0
     RESCUE_TINY	wdc0, atabus0

 > You can always try making a GENERIC kernel with a ramdisk too,
 > or transmogrifying the INSTALL_LAPTOP into a GENERIC kernel while keeping 
 > the ramdisk, and see where it fails.

A GENERIC_LAPTOP kernel with 2 modifications actually boots fine.  The
modifications are:

	- add the memory disk statements from INSTALL_LAPTOP
	- reduce the number of users from 32 to 2

Unfortunately, there are no files in /kern once that kernel boots, so
I cannot recover the full set of kernel messages.  I guess that is
controlled by some other kernel options that I missed.  Pointers?

Also, some of the other parts of the release build failed, I presume
because the new INSTALL_LAPTOP kernel (which is really GENERIC_LAPTOP
mostly) is too big.  Eventually, I want a cd with a -current install
kernel.  Should I just pare down my modified generic kernel until
everything works?  There must be a better way.

It seems to me that there is something fundamentally different between
the GENERIC_LAPTOP AND INSTALL_LAPTOP kernels that is currently
causing problems for me.  Any suggestions or pointers are welcome.

Thanks alot.

Cheers,
Brook