*BSD News Article 58622


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!newsfeed.internetmci.com!news.msfc.nasa.gov!sol.ctr.columbia.edu!startide.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Booting from primary disk on secondary PCI IDE controller
Date: 31 Dec 1995 18:39:35 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 86
Message-ID: <4c6ld7$46p@sol.ctr.columbia.edu>
References: <4c1avr$73@daneel.sds.no> <4c30sb$p1l@uriah.heep.sax.de> <4c5u6j$3k0_001@gifu.sds.no>
NNTP-Posting-Host: startide.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]

Daring to challenge the will of the almighty Leviam00se, Tore Haraldsen
(toreh@bootes.sds.no) had the courage to say:

: In article <4c30sb$p1l@uriah.heep.sax.de>,
:    j@uriah.heep.sax.de (J Wunsch) wrote:
: >
: >Modify the code for the bootblocks in sys/i386/boot/biosboot/boot.c,
: >remake the bootblocks, and the disklabel -B -b boot1 -s boot2 fd0
: >in order to install the new blocks on your floppy.
: >
: What about the -a option to the kernel, can it be made to work?

: I do not have an up and runnning system, so it is a bit hard for me to look 
: into myself...

: -- tore

The -a option only works if you compile your kernel with:

config kernel swap generic

instead of:

config kernel root on wd0/sd0/whatever

This causes config(8) to use /sys/i386/i386/swapgeneric.c rather than
auto-generating a unique swapkernel.c file with explixit root fs
assignments.

Unfortunately, I don't think swapgeneric works in 2.1.0. Right before
2.0.5 came out, the swapon code in the kernel was changed in a way
which broke it. It used to be that swapgeneric would simply assign
swapdev to be the 'b' partition on whatever the boot device was and
then let the swapon code mount it further down the line. (This is a
bit of a simplification, but it's close enough for the sake of
discussion.) Later, swapon was changed to accept the _name_ of a
device rather than a major/minor number and to (in the future) allow
an arbitrary number of swap devices. (The table of devices was
supposed to be dynamically allocated, but it isn't yet.) The main
point of this excersize was to allow the install floppy to mount
a swap partition that wasn't going to exist until after you punched
the 'Commit' button.

Unfortunately, it was decided that swapgeneric didn't need to be
updated to handle these changes, so it languished. I hacked on it
a couple months ago to make it compile again, but it no longer
does any swap device assignments. (I tried to make it work like it
did previously, but I ended up making far too many changes before
I even got close, so I quit while I was behind.) It does let you
specify a root device, however, which is its one remaining saving
grace.

What I would dearly love to do, had I the time (ha!), is to modify
it so that:

a) it understands slices
b) it would work with CD-ROMs, thereby allowing you to boot with a
   CD as your rootfs (I wasn't able to work on this at all until
   recently, since I only just got a system with a CD-ROM drive in it)
b) it would understand NFS, thereby allowing you to boot diskless
   without having to use netboot (this would also allow you to use
   any of the sup[ported network cards rather than the limited number
   that netboot knows about)
d) allow you to set a swap device and the dump device in addition to
   a root device

Assuming I did it correctly, you could also add support for setting
all of the same things from userconfig without too much additional
trouble. I think. I say this because it would allow the settings to
be saved with dset just like all the other userconfig variables.

I think I'll make this my next project once I'm finished with all
the NIS stuff. It'll make swapgeneric incredibly useful and ruin
all the plans people have to get rid of it. :)

-Bill

--
=============================================================================
-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
=============================================================================
License error: The license for this .sig file has expired. You must obtain
a new license key before any more witty phrases will appear in this space.
=============================================================================