Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 1995 09:17:27 -0400 (EDT)
From:      A boy and his worm gear <wpaul@skynet.ctr.columbia.edu>
To:        babkin@hq.icb.chel.su (Serge A. Babkin)
Cc:        jkh@freebsd.org, hackers@freebsd.org
Subject:   Re: Why we don't have a 2-floppy boot set ?
Message-ID:  <199507211317.JAA04954@skynet.ctr.columbia.edu>
In-Reply-To: <199507210818.OAA17993@hq.icb.chel.su> from "Serge A. Babkin" at Jul 21, 95 02:18:55 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the world, Serge A. Babkin had to walk
into mine and say:
 
> Why we have no bootable 2-floppy set ? I think it's enough easy to
> solve the problem with lack of spce on the boot floppy. The only
> thing we need is to add a driver that will be attached the first
> (or after sc0) and the only thing it will do is to write:
 
> 	Insert the 2nd (root) floppy in the drive and press <Return>
 
> and then waits for <Return>. It will work before mounting of root
> and even before the fd0 probing so there should be no problem
> with all other code.
 
> In result of this we will have 1 floppy with the kernel (upto 1.4M)
> and 1 floppy with the root file system (upto 1.4M).

> P.S. I think I can write such pseudodriver if there is no reasons to
> not do it.
 
> 		Serge Babkin

There already is (or rather was, because it's currently broken) a way do
do exactly what you're describing without having to write any new code.
All you have to do is configure a kernel with:

config	vmunix 	swap generic

And then boot with the -a flag. What will happen is that the kernel
will get all the way through the device probes and then stop right
before it mounts the root filesystem and print a prompt that says:

root device:

You can then take out the first floppy while it's waiting, insert
a second floppy, and type 'fd0' (or even fd1, or wd0, sd0). The kernel
will then mount the device you specify as the rootdev and continue
on its way. The one problem with this right now is that it only
works for ufs filesystems; it would take a little bit of tweaking
to get it to handle booting from CD-ROMS or other fs types.

Unfortunately, /sys/i386/i386/swapgeneric.c doesn't work anymore
because of come changes that were made right before 2.0.5 was frozen
that broke it (swapon() was changed to allow the user to specify
any awap device he wanted, even those that didn't exist when the
system was first booted, in order to allow sysinstall to enable
swapping the moment it got your hard disk partitoned and labeled).
If you configure a generic kernel now, you'll get symbol conflicts
at link time because swapgeneric.c still has a local copy of
swdevt that conflicts with the one in vm_swap.c.

It wouldn't be hard to make it work again (I know 'cause I did it
on my own system recently just for kicks) but if I went near it I'm
sure I'd get my head bitten off since there seems to be a push on to nuke 
swapgeneric.c and merge it into userconfig (the idea being that you can 
boot with the -c flag, specify yout root device & such and then have that
information saved with dset). This would save you the trouble of having
to make a new kernel just to change the default rootdev, plus it
would also let you construct a 2-floppy boot/root install. (Personally,
I would rather see both a hacked userconfig _and_ swapgeneric (they're
not entirely the same thing) but the decision isn't up to me. 
Fortunately, I have the sources so if I don't like it, I can always
change it. :)

Anyway, my point is that there's already a couple of ways to do what
you want (and what I want too, actually) in a fairly general fashion
using existing facilities, so writing a third special-purpose facility
probably isn't such a great idea.

-Bill 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~T~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Bill Paul            (212) 854-6020 | System Manager
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Møøse Illuminati: ignore it and be confused, or join it and be confusing!
~~~~~~ "Welcome to All Things BSDish! If it's not BSDish, it's crap!" ~~~~~~~



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