Subject: Re: procedure for bootstrapping hp300 machines
To: None <Herb.Peyerl@sidney.novatel.ca, mike@cs.utah.edu>
From: Mike Hibler <mike@cs.utah.edu>
List: port-hp300
Date: 06/16/1994 10:18:12
> From: Herb Peyerl <Herb.Peyerl@sidney.novatel.ca>
> Subject: Re: procedure for bootstrapping hp300 machines
> To: mike@cs (Mike Hibler)
> Date: Thu, 16 Jun 1994 07:47:23 -40962758 (MDT)
> 
> At Usenix in Boston; we had some discussion about this and it turns 
> out that I'm going to play with the ctboot stuff a bit to see how well
> that works... 
> 
We made and distributed bootable cartridge tapes, so it should all work.
I started to do a standalone SCSI tape driver but never finished...

> I think I'm going to try and make a fairly generic bootimage and people
> are just going to have to dd it onto their disk.  This is kind of a
> wacky idea but I'd like to have something better that would allow people
> to have the ability to re-label and re-newfs their disk... I guess if I
> made a small enough rootimage (on the order of 20mb) then everyone could
> partition their disks around it... (I guess that was kind of obvious).
> 
Duh!  I didn't think of it last night but I actually did a hacked up boot
procedure for 4.4 "heavy".  See /usr/share/doc/smm/01.setup in the Lite
release for a description of how that worked.  I required at least a 290mb
drive but you could arrange for it to work on a smaller one.

The main idea is to get make a boot+label+rootfs image that will fit on
any disk.  Then you can boot that up, resize the partitions and load the
remainder over the net from another machine.  Problems are:

1. The rootfs has to be a "good" size since you cannot re-size it.
   Not a big problem, just make a standard sized root partition (12mb or so).
   If you are determined enough, you can get around this (boot up, make
   a correctly sized rootfs in another partition, boot on that and copy your
   real partition back to the beginning of the disk if you care about where
   it is physically).

2. The swap partition.  Even though the initial bootstrapped kernel probably
   won't need any swap space it requires a partition and holds it open so
   you cannot resize it while running.

3. Space on some disks.  A 7945 just isn't big enough for any complete BSD.
   However, that is the end-user's problem :-)  They can mount most things
   across NFS.

> I wish I had an HPIB disk. (I thought I'd never hear myself say that).
> 
You shouldn't need an HP-IB disk (unless you just have a craving for a
small, slow, expensive disk!).  Don't worry about disk geometries when
building a generic filesystem.  Both HP-IB and SCSI are block-oriented
interfaces so any geometry info is used only to optimize filesystem layouts
and that is hard to get right anyway.

> Chris Hopps mentioned something at Usenix that I had never actually
> thought of before.. I should try to remember to zero my disk before I
> build the filesystem for the rootimage so that it'll compress nicely
> for distribution...
> 
An easier way: whenever we have made someone a disk image of BSD or Mach
for the 700s we go out on every filesystem of the distribution and (as root):

	dd if=/dev/zero of=bigfile bs=64k

and fill up the filesystem.  Then remove the file and most of the free
blocks will be zero.  You can also zero out your swap partition if that
is included in your image.  We can get a 420mb disk image down to around
100mb compressed that way.

> Also; someone sent me some prelim source to some netboot stuff for the
> hp300's that I hope to have time to play with...
> 
Is this the stuff that Mark Davies did?  He had diskless 4.4 machines 
running but he was using some Mt Xinu code (the standalone ethernet
driver, maybe some other stuff).  He was going to rewrite that.  Now that
Mt Xinu is gone, I wonder what the legal standing of their code is?

------------------------------------------------------------------------------