Subject: Re: Installboot, disklabel, and newfs on i386/NetBSD 1.3.2
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Marinier, M. Claude, G. <claude.marinier@dreo.dnd.ca>
List: netbsd-help
Date: 11/27/1998 11:32:48
Thanks Patrick. The explanation you give is clear and accurate (as far as
I can tell :-) but not murky. It is a high level explanation and I need
more details. So, here are more questions.

I am trying to build another system without using the install floppy and
rebuilding the system. I want to prepare a new disk (disklabel, newfs, and
installboot) and then copy the system to the new disk one partition at a
time (dump|restore).

The Maxtor 88400D8 seems to want me to exclude the first track (63
sectors). When I tried to start at the beginning of the disk, newfs gave
me a 'read only' error. After building the system as described above, I
reconfigured the PC so the Maxtor was wd0 and it would not boot (could not
find a bootable disk). What does the install disk do that I am not doing?

Note that other disks (e.g. Quantum LPS540A) do not seem to have this
requirement. I can start at 0 and newfs works well.

newfs prefers that I exclude the first cylinder rather that the first
track. When I exclude only the first track (size 199/15/0, offset 0/1/0),
it says that "64 sector(s) in last cylinder unallocated". This does not
add up (there are 63 sectors per track) and newfs echoes that it is
building the file system "in 200 cylinders".

The install script on the floppy defined the 'c' partition with a size of
16277/15/0 and an offset of 0/1/0. This is why I thought that I should
exclude the first track only. It defined 'a' with a size of 200/0/0 (I had
specified 200) and an offset of 0/1/0 and it defined 'b' with a size of
249/15/0 (I had specified 250) with an offset 200/0/0.

Please confirm that the primary boot code is installed in the disk label
area. Is this area counted by disklabel?

Is there an existing document I can read about all this magic?

Thank you.

On Tue, 24 Nov 1998, Patrick Welche wrote:
> Marinier, M. Claude, G. wrote:
> > 
> > I have not yot found a clear explanation of the relationship between
> > installboot, disklabel, and newfs. If installboot installs to a partition,
> > then newfs must be able to leave those sectors alone. Is this the case?
> > While using disklabel, I have seen 'a' partitions which begin after the
> > first sector. Should I be doing the same when I start with a fresh disk?
> 
> Now for a murky explanation: the idea is you label your disk using disklabel.
> For each partition that you have defined in your label you run newfs which
> takes the information in the label to create a filesystem in it. Then if you
> want to make an ffs partition bootable, you run installboot on it.

--------------------
Claude Marinier, Information Technology Group    claude.marinier@dreo.dnd.ca 
Defence Research Establishment Ottawa (DREO)    (613) 998-4901  FAX 998-2675
3701 Carling Avenue, Ottawa, Ontario  K1A 0Z4         http://www.dreo.dnd.ca