*BSD News Article 5820


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!mcsun!sunic!aun.uninett.no!ugle.unit.no!torsmyr
From: torsmyr@lise.unit.no (Jo Torsmyr)
Subject: Re: bootp server for 386BSD
Message-ID: <1992Sep30.164208.28888@ugle.unit.no>
Sender: news@ugle.unit.no (NetNews Administrator)
Organization: University of Trondheim
References: <7581@vtserf.cc.vt.edu>
Date: Wed, 30 Sep 92 16:42:08 GMT
Lines: 82


Hi!

After reading an article posted to this group by Julian Elischer, I
managed to understand how 386BSD is loaded at boot time, and how
the disklabel is found (by the second level bootstrap and the
kernel itself).

First a few words about my configuration:
	50MHz 486, UMC chipset
	AMI BIOS
	16MB RAM
	2 x ST1239A 201MB Seagate hard disks
	W8003 WD Ethernet card 

Until recently I had 386BSD 0.0 (the latest version) installed on
the primary disk alongside DOS and another UNIX. I used the
excellent boot loader which Wolfgang Solfrank posted to this list
in the spring. Now when I finally got the time to install
386BSD 0.1, I wanted it to coexists with DOS (and the other UNIX)
in a smilar manner.

The disks was (and is) partitioned like this:
Primary disk:	386BSD		130MB
		DOS primary	5MB
		DOS extended	30MB
		other UNIX	36MB
Secondary disk:	DOS extended	100MB
		other UNIX	101MB

The ST1239 disks uses geometry translation:
Physical:	1272 cyl x 9 heads x 36 sectors
Translated:	954 cyl x 12 heads x 36 sectors

So, this is how I installed 386BSD 0.1:

1. I made a copy of my master boot block (physical sector 0 on
the disk). Earlier I used a boot selection program to select which
OS to boot. Now I use os-bs which does the same but are easier to
install/reinstall...

2. I booted the fixit boot floppy and created a disktab entry for
the root partition, the swap partition and the usr partition.
I made the root partition (/dev/wd0a) start on cylinder 2 (translated,
i.e. physical sector 2 * 36 * 12 = 864), that is, oa#864. I also made
the swap and usr partitions start on (translated) cylinder boundaries.
Then I ran disklabel and newfs and followed the steps in question
4 of the FAQ (which I BTW found very useful).

Then I rebooted the PC from a DOS boot floppy. The 386BSD
disklabel program had installed it's own first level boot program in
physical sector 0, the disklabel in physical sector 1, and the
second level boot program in physical sectors 2-15.
I used a disk editor program to copy all these sectors (0-15) to the
next cylinder (i.e. cylinder 1), that is sector 432. I then copied
back my original master boot block (containing os-bs and the
partition table) to physical sector 0. Then I edited the partitioin
table and made the 386BSD partition start on translated cylinder 1.
In this way the second level bootstrap finds the disklabel (within
itself as before). But since the kernel uses physical sectors 

(or no geometry translation) to find the disklabel, I copied this
sector (containing the disklabel) to the SECOND sector of
PHYSICAL cylinder 1 (i.e. sector 325, 9 * 36 + 1). Now the kernel
finally found the disklabel (in sector 325), and I could proceed to
install the binaries and sources).

I'm not sure if this will work on all IDE disks using geometry
translation. An important point using this procedure is that the
386BSD partitioin must be the first one on the disk, if not the
disklabel sector which the kernel looks for may have to lie within
another partition...

Any comments on this are welcomed. There should be a more straightforward
way to install 386BSD on a disk containing other OSs.

-jo
Jo Torsmyr
University of Trondheim
Norway
email: torsmyr.lise.unit.no