Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 1996 19:29:27 -0400 (EDT)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        jgreco@brasil.moneng.mei.com (Joe Greco)
Cc:        hackers@freebsd.org
Subject:   Re: Making Bootable Disks
Message-ID:  <199608202329.TAA19759@skynet.ctr.columbia.edu>
In-Reply-To: <199608201429.JAA20513@brasil.moneng.mei.com> from "Joe Greco" at Aug 20, 96 09:29:21 am

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Joe Greco had 
to walk into mine and say:

> > As Dennis wrote:
> > > 
> > > Is it outlined/described anywhere how to make a bootable system floppy? 
> > 
> > disklabel -Brw fd0
> > newfs ... /dev/rfd0a  (look into /etc/disktab for the options)
> > mount /dev/fd0a /mnt
> > cp /kernel /mnt
> > umount /mnt
> 
> With all due respect Joerg, that's nice but not very useful :-)  The kernel
> alone will take 2/3 the floppy.

If you're willing to blow the money on a second floppy, you can make
a two floppy set (boot and root disks).

Create two disks with UFS filesystems on them, put the kernel on one
and /sbin/init and whatever else you can manage onto the other one
(crunchgen would be useful if you can't fit all the tools you want).

Compile the kernel with:

config 	vmunix 	swap generic

instead of

config	vmunix	root on wd0 (or whatever you normally use).

(Yes, I know it's shown as 'config kernel ...' in the standard
config files. I don't care about any damn trademarks: god intented
the kernel image to be called vmunix and that's what I'm bleeding
well going to call it. So there.)

To use this, put the kernel floppy in the drive, start the system, and
use the -a option at the boot prompt:

Boot: -a

The kernel will load, go all the way through the autoconfig phase
and then present you with a prompt that says:

root device?

When this prompt comes up, remove the kernel floppy, put in the root
floppy, then type 'fd0' as the root device:

root device? fd0

The kernel will then mount the root floppy as the root fs. Some people
have suggested using a normal kernel and just quickly swapping the
floppies before the autoconfig phase completes (you have several seconds
between the time the kernel loads and when it actually goes to mount
the root fs) but this strikes me as too kludgy for words. Using swapgeneric
is cleaner and a little more flexible (you can say wd0 or sd0 if you
want, for example).

The downside to this is that programs that need to do an nlist() on 
/vmunix (or /kernel, or whatever) won't work since the kernel image won't 
exist on the root floppy filesystem. Consequently, this solution may not 
be useful for much other than as an emergency filesystem repair utility.

I've been waiting for someone to do something with swapgeneric (other
than say it's 'going away') so that it can regain some of its original
functionality (it doesn't really have much to do with swapping anymore,
though it could, and probably should) and perhaps add support for
booting from alternate root filesystems on CD-ROMs or NFS servers. But 
apparently nobody's interested in it anymore, and I just don't have the 
time to do it myself.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "If you're ever in trouble, go to the CTR. Ask for Bill. He will help you."
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608202329.TAA19759>