From owner-freebsd-hackers Fri Jul 21 06:27:52 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id GAA29468 for hackers-outgoing; Fri, 21 Jul 1995 06:27:52 -0700 Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id GAA29429 ; Fri, 21 Jul 1995 06:27:47 -0700 Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.11/8.6.9) id JAA04954; Fri, 21 Jul 1995 09:17:30 -0400 From: A boy and his worm gear Message-Id: <199507211317.JAA04954@skynet.ctr.columbia.edu> Subject: Re: Why we don't have a 2-floppy boot set ? To: babkin@hq.icb.chel.su (Serge A. Babkin) Date: Fri, 21 Jul 1995 09:17:27 -0400 (EDT) Cc: jkh@freebsd.org, hackers@freebsd.org In-Reply-To: <199507210818.OAA17993@hq.icb.chel.su> from "Serge A. Babkin" at Jul 21, 95 02:18:55 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 3769 Sender: hackers-owner@freebsd.org Precedence: bulk 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 > and then waits for . 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!" ~~~~~~~