Subject: Re: Partitioning
To: Nathan Gelbard <gelbard@engr.orst.edu>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-hp300
Date: 02/26/1997 01:21:17
On Wed, 26 Feb 1997 00:12:32 -0800
Nathan Gelbard <gelbard@ENGR.ORST.EDU> wrote:
^^^^^^^^^^^^^
Hey, cool to see another OSU'er! If you bump into Tad, tell him I
said hello! :-) (I'm planning on being in your neck of the woods
in early April, giving a talk at PEAK -- we ought to try to hook up
at the Monroe St. Beanery or Bombs, or something...)
> How does one go about modifying the partition sizes in NetBSD? In Linux,
> fdisk is beautyful. I found disklabel and diskpart, but doing a
Well, Linux's disk partitioning scheme is ... very different, and
unnecessarily limited, IMO. It uses DOS partition formats, which
don't really make sense on the hp300, for obvious reasons :-)
...in any case...
> disklabel -e rd0
>
> puts me into vi where I can play with the sizes (I think). But every time I
> exit, I get:
>
> disklabel: warning, unused partition c: size 255276 offset 0.
Ah ... Ok... take a look at your disklabel (while in the editor)... here's
the disklabel on my hp380's root disk, for example:
# /dev/rsd0c:
type: SCSI
disk: ST43400N
label: basalt_r
flags:
bytes/sector: 512
sectors/track: 99
tracks/cylinder: 21
sectors/cylinder: 2078
cylinders: 2737
total sectors: 5688447
rpm: 5400
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
7 partitions:
# size offset fstype [fsize bsize cpg]
a: 62340 2078 4.2BSD 1024 8192 16 # (Cyl. 1 - 30)
b: 199488 64418 swap # (Cyl. 31 - 126)
c: 5687486 0 boot # (Cyl. 0 - 2736)
d: 83120 263906 4.2BSD 1024 4096 16 # (Cyl. 127 - 166)
e: 207800 347026 4.2BSD 1024 8192 16 # (Cyl. 167 - 266)
f: 207800 554826 4.2BSD 1024 4096 16 # (Cyl. 267 - 366)
g: 4924860 762626 4.2BSD 1024 8192 16 # (Cyl. 367 - 2736)
Note the line that says "7 partitions:" ... that's what you're missing..
The number value should be equal to the highest partition letter in the
label, when a == 1. Otherwise, disklabel(8) will warn about the partitions
after the number indicated as being unused.
> Im very confused on whats going on here. I'm trying to make an HP-IB 120mb
> disk bootable with the 1.2 system. All I want to do is have boot, swap, and
> the main C partition (no a-h crapola).
Ok, this is a problem, too. BSD systems in general don't really like
that :-) Especially on hp300. The reasons for this:
- BSD always has assumed that swap is on the "b" partition of
the disk mounted as root.
- BSD has historically treated "c" as the "whole disk", also
known as the "raw partition". It's sort of "special".
- Since the earliest days of the hp300 port (pre-4.4BSD,
HP-BSD vintage, and maybe even the early hp200 Berkeley work),
the "c" partition has been reserved for "boot". This is
because the hp300 boot program is .. big. It spills past
the first 8k of the disk (the file system always starts
8k after the beginning of a partition to allow for the
boot program, disklabel, etc.), so you need to reserve
an entire cylinder for it. This can't really be avoided.
The "c" partition is marked as "boot" so that newfs(8)
will refuse to create a file system there.
So, you _must_ create at least a, b, and c partitions. "c" must be the
entire disk. "a" must be offset by the value of "sectors/cylinder".
Place the root file system on a (marked 4.2BSD), mark b as "swap",
mark c as "boot". You may make "a" large if you want, but I _highly_
recommend creating a /usr partition, and other paritions to suit your
installation. The 1.2 INSTALL file should have some size recommendations
in it.
Note that a 7958 doesn't really go that far anymore, but I'm pretty
sure you can still fit a whole installation on one... My hp319
test machine has a 7945 for root/swap and a 7958 for usr, and has
space left over after installing...
Ciao.
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939