Subject: Re: [Q] DS3100 installation? (trying something new)
To: None <nisimura@is.aist-nara.ac.jp>
From: None <Havard.Eidnes@runit.sintef.no>
List: port-pmax
Date: 10/17/1997 15:20:21
> You failed to create correct NetBSD/pmax diskimage because you
> used /dev/sd1a.  As Bill Studenmund pointed out, use 'd' instead.
>
> NetBSD/i386 uses partition 'd' to refer to entire disk.  Not 'c',
> nor 'a' no matter how you adjust the BSD disklabel parameter.

I think this is false.  On the i386 there is nothing special about
partition 'd' except that it's permitted to use the partition even
though it's marked as "unused".  So, if the 'a' partition was indeed
set up to cover the entire disk, i.e. start at sector 0, it would be
just fine to use it.

On the i386, sector 0 contains the master boot record, with the DOS
partition table starting from byte 446.  In sector 1 you'll find the
BSD disklabel.  The file system code will (if I'm not terribly
mistaken) leave the first part of the partition untouched, to allow
room for the boot code.

So, both partition 'a' and 'c' could be made to cover the entire
disk depending on the contents of the disk label.  However, without
a proper i386 on-disk disk label, you'd have to use partition 'd'
from the "dummy" in-core disk label.

To demonstrate:

maaltrost# disklabel wd0
...
6 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    60480        0    4.2BSD     1024  8192     0   # (Cyl.    0 - 59)
  b:   262080    60480      swap                        # (Cyl.   60 - 319)
  c:  2504880        0    unused        0     0         # (Cyl.    0 - 2484)
  d:  2504880        0    unused        0     0         # (Cyl.    0 - 2484)
  e:   201600   322560    4.2BSD     1024  8192     0   # (Cyl.  320 - 519)
  f:  1980720   524160    4.2BSD     1024  8192     0   # (Cyl.  520 - 2484)
maaltrost# cd /tmp
maaltrost# dd if=/dev/rwd0a count=32 of=a
32+0 records in
32+0 records out
16384 bytes transferred in 1 secs (16384 bytes/sec)
maaltrost# dd if=/dev/rwd0d count=32 of=d
32+0 records in
32+0 records out
16384 bytes transferred in 1 secs (16384 bytes/sec)
maaltrost# cmp a d
maaltrost# fdisk /dev/rwd0a
******* Working on device /dev/rwd0a *******
parameters extracted from in-core disklabel are:
cylinders=2485 heads=16 sectors/track=63 (1008 sectors/cylinder)

Figures below won't work with BIOS for partitions not in cylinder 1
parameters to be used for BIOS calculations are:
cylinders=2485 heads=16 sectors/track=63 (1008 sectors/cylinder)

Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 0 is:
<UNUSED>
The data for partition 1 is:
<UNUSED>
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
sysid 165 (NetBSD or 386BSD)
    start 0, size 50000 (24 MB), flag 80
        beg: cylinder    0, head   0, sector  1
        end: cylinder 1023, head 255, sector 63
maaltrost# uname -a
NetBSD maaltrost.runit.sintef.no 1.2.1 NetBSD 1.2.1 (MAALTROST) #2: Wed Sep 17 22:11:07 MET DST 1997     jarle@maaltrost.runit.sintef.no:/usr/src/sys/arch/i386/compile/MAALTROST i386
maaltrost# 

Regards,

- Havard