*BSD News Article 11873


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA2253 ; Mon, 01 Mar 93 10:51:11 EST
Xref: sserve comp.os.386bsd.misc:35 comp.unix.bsd:11542
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!uknet!edcastle!spider!raft.spider.co.uk!mark
From: mark@spider.co.uk (Mark Valentine)
Newsgroups: comp.os.386bsd.misc,comp.unix.bsd
Subject: How to Install 386BSD on Second Disk (The Hard Way...)
Message-ID: <1993Feb26.001944.3324@spider.co.uk>
Date: 26 Feb 93 00:19:44 GMT
Sender: news@spider.co.uk (USENET News System)
Organization: Spider Systems Limited, Edinburgh, UK
Lines: 94
Nntp-Posting-Host: hobbes.spider.co.uk

I think I finally managed to build myself a couple of floppies which will
allow me to scratch install 386BSD 0.1 on my second disk (shared with
Linux currently) without having to (once again) scrub the contents of my
primary disk to use as a bootstrap.  (I also have separate / and /usr
partitions, etc, just to be awkward.)  Since it took me a good while to
go through several stages of trial and error, I thought I'd share my
experiences here for the benefit of other folks who might want to try and
do the same.  It may also help highlight some areas in the current 386BSD
release which may benefit from slight changes to make things like this
easier in future releases.

(I have one small IDE disk and one large SCSI disk, but much of the following
is relevant to other two disk configurations.)

I needed to bring up 386BSD initially on my primary disk (bindist, srcdist
and a few patches - I just installed patchkit 0.2.1) in order to build some
of the pieces required.  With a little more generalisation, it might be
useful to build a couple of useful binaries and archive them.

What I ended up with is a boot disk which combines much of the functionality
of Tiny 386BSD and the Fix-It floppy - I moved the baseutils cpio archive
onto a second floppy to make room.

So...

First thing to do is find yourself a way of booting from the second disk.
I use BOOTEASY 1.2, a wonderfully simple utility to install from a DOS
boot floppy if need be.  It requires no configuration since it just tells
you what kind of bootable partitions you have and presents a menu - it
knows about 386BSD A5 partitions.  You can boot from the second disk without
user intervention.  (Sorry, don't know where this little gem is archived, I
got it from a friend.)

Next you need a way of creating your 386BSD partition on the second disk.
I use MS-DOS 5.0 fdisk to create partitions because it's easier to drive
when I can't be bothered doing sums.  A Linux (TAMU or H.Lu) boot floppy
with fdisk serves the purpose of changing the partition type to A5.

Disk labeling was a bit of a problem for me.  Was I asleep at the time, or
does the patchkit 0.2 fixit.fs still include an unpatched disklabel?  I scrubbed
my master partition table a good few times before I created a boot floopy with
a working disklabel (hence the need for a source tree to bootstrap with, though
this is trivial to fix).

Boot blocks...  Julian's boot blocks (sdboot/bootsd) from ref are a godsend
here, and I hacked a version of bootsd which defaults to booting hd(1,a)386bsd
for unattended reboots.  (It would be nice for this to be an installation
option, patching the binary before running disklabel.  Having such binaries
available would remove my second reason for needing a source tree.)

I constructed my installation floppy from the Tiny 386BSD one, stealing bits
from the Fix-It floppy.  As mentioned previously, I moved baseutils.cpio.Z to
a second floppy to make room; I use a raw portable cpio archive (uncompressed)
on the floppy for convenience.  A working disklabel was the most critical
addition to my installation disk, and I also keep an ASCII version of my
label on it.  /usr/mdec contains my modified version of Julian's SCSI boot
blocks (I have sdboot, bootsd "just in case", and boothd1a...).  I use the
invocation "disklabel -R -r as0 label.as0 /usr/mdec/sdboot /usr/mdec/boothd1a".

I added special devices (both block and character) for all of my partitions to
my installation floppy (they also want to be in /etc/baselist.Z!), and mknod is
there "just in case".  newfs is already there, and I added fsck "just in case".
Also "just in case", I added tip, dd, and elvis (remember to create /var/tmp).

A few things I moved to my baseutils floppy to make more room: I can live
without MANIFEST, INSTALL.NOTES.Z, and REGISTRATION on this floppy.  (Delete
them from baselist too.)  The install binary was zapped as soon as I'd read
it :-).  (Oh, and I compressed COPYRIGHT to fit my README on so's I don't
have to remember everything again.)  If you have a 5.25" floppy drive, you
can live without luxuries like tip.

One last little "ouch" I fixed was to move mount (and umount) from /usr/distbin
to /sbin (again, editing baselist appropriately); it wasn't doing much good for
me in /usr/distbin when I finally booted from my multi-partitioned hard disk...

With this tailor made installation floppy, I can newfs all my partitions,
mount them all under /mnt, and copy the baselist files to the appropriate
file systems with "zcat /etc/baselist.Z | cpio -o | (cd /mnt; cpio -iadmv)".
I then use echo to create /mnt/etc/fstab, umount everything and (pretty
please?) boot from hard disk...

Not quite there yet...  Make / writeable with mount -u, cpio -icadmv from my
second "baseutils" floppy (scrub the v if you're happier that way), and move
/etc/base.profile to /.profile; then mount all those partitions (now you're
glad you moved mount), and run update! (Edit /.profile with those extra mounts
if you need to.)  Maybe reboot once more just to make sure.

>From here on in it's just as described in INSTALL.NOTES.Z...

		Mark.
-- 
Mark Valentine, Spider Systems <mark@spider.co.uk>            /\oo/\
"Tigers will do ANYTHING for a tuna fish sandwich."
"We're kind of stupid that way."