Subject: None
To: None <port-sparc@NetBSD.org, tech-install@NetBSD.org>
From: Volker A. Brandt <vab@bb-c.de>
List: tech-install
Date: 11/28/2005 17:33:20
Hello all!
I don't know if it is just me, if it is sparc-related or a generic
sysinst problem.
Anyway, here goes: I wanted to do a complete installation of NetBSD 2.1
(off of a release CD image). Target is an SS20 with two identical 9 GB
disks like so:
sd0 at scsibus0 target 1 lun 0: <FUJITSU, MAB3091S SUN9.0G, 1705> disk fixed
sd0: 8637 MB, 4926 cyl, 27 head, 133 sec, 512 bytes/sect x 17689267 sectors
sd0: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0: <FUJITSU, MAB3091S SUN9.0G, 1705> disk fixed
sd1: 8637 MB, 4926 cyl, 27 head, 133 sec, 512 bytes/sect x 17689267 sectors
sd1: sync (100.00ns offset 15), 8-bit (10.000MB/s) transfers, tagged queueing
Boot is via network from an Ultra5 running Solaris. The SS20 boots fine
as usual; after all it's called *Net*BSD :-)
So sysinst does it's thing:
NetBSD uses a BSD disklabel to carve up the NetBSD portion of the disk into
multiple BSD partitions. You must now set up your BSD disklabel.
You can use a simple editor to set the sizes of the NetBSD partitions, or
keep the existing partition sizes and contents.
You will then be given the opportunity to change any of the disklabel fields.
The NetBSD part of your disk is 8633 Megabytes. A full installation requires
at least 260 Megabytes without X and at least 295 Megabytes if the X sets are
included.
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Choose your installation x
x x
x>a: Set sizes of NetBSD partitions x
x b: Use existing partition sizes x
...etc etc...
Then we come to the disk slice layout:
You can now change the sizes for the system partitions. The default is to
allocate all the space to the root file system, however you may wish to have
separate /usr (additional system files), /var (log files etc) or /home
(users' home directories).
Free space will be added to the partition marked with a '+'.
MB Cylinders Sectors Filesystem
> 1195 (8504) 682 2449062 + /
129 74 265734 swap
0 0 0 tmp (mfs)
0 0 0 /usr
0 0 0 /var
0 0 0 /home
Add a user defined partition
Change input units (sectors/cylinders/MB)
Accept partition sizes. Free space 7308 MB, 5 free partitions.
Of course I don't like that. :-) So I make some changes, ending
up with the following layout:
You can now change the sizes for the system partitions. The default is to
allocate all the space to the root file system, however you may wish to have
separate /usr (additional system files), /var (log files etc) or /home
(users' home directories).
Free space will be added to the partition marked with a '+'.
MB Cylinders Sectors Filesystem
129 74 265734 /
513 293 1052163 swap
129 74 265734 tmp (mfs)
513 293 1052163 /usr
513 293 1052163 /var
> 6962 3971 14259861 /opt
Add a user defined partition
Change input units (sectors/cylinders/MB)
Accept partition sizes. Free space 0 MB, 2 free partitions.
So far, so good. I accept the partition sizes.
Then I get this:
We now have your BSD-disklabel partitions as:
This is your last chance to change them.
Start MB End MB Size MB FS type Newfs Mount Mount point
--------- --------- --------- ---------- ----- ----- -----------
a: 0 128 129 FFSv1 Yes Yes /
b: 129 642 513 swap
c: 0 8632 8633 Whole disk
>d: 1157 1670 513 FFSv1 Yes Yes /var
e: 1671 8632 6962 FFSv1 Yes Yes /opt
f: 0 0 0 unused
g: 643 1156 513 FFSv1 Yes Yes /usr
h: 0 0 0 unused
i: Change input units (sectors/cylinders/MB)
x: Partition sizes ok
Hmmm... it has swapped around the sequence a bit. But I am very
pedantic and want it, well, the way *I* want it. So I edit and edit
and edit... you get the idea.
So, after what seems like half an hour through a tip connection to
the console at 9600 bps, I have something I like:
We now have your BSD-disklabel partitions as:
This is your last chance to change them.
Start MB End MB Size MB FS type Newfs Mount Mount point
--------- --------- --------- ---------- ----- ----- -----------
a: 0 128 129 FFSv1 Yes Yes /
b: 129 642 513 swap
c: 0 8632 8633 Whole disk
d: 0 0 0 unused
e: 643 1154 511 FFSv2 Yes Yes /usr
f: 1155 1666 511 FFSv2 Yes Yes /var
>g: 1667 8632 6966 FFSv2 Yes Yes /opt
h: 0 0 0 unused
i: Change input units (sectors/cylinders/MB)
x: Partition sizes ok
Then it gets down to business and creates the file systems.
BUT:
Status: Command failed
Command: /sbin/newfs -O 2 -b 16384 -f 2048 /dev/rsd0e
Hit enter to continue
--------------------------------------------------------------------------------
newfs: maximum file system size on `/dev/rsd0e' is 1048572 sectors
And then I get dumped back into the main sysinst menu. WTF?
Time for some investigation. Drop into a shell and:
# disklabel -r sd0
# /dev/rsd0c:
type: unknown
disk: mojave_sd0
label:
flags:
bytes/sector: 512
sectors/track: 133
tracks/cylinder: 27
sectors/cylinder: 3591
cylinders: 4924
total sectors: 17682084
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 265734 0 4.2BSD 1024 8192 33224 # (Cyl. 0 - 73)
b: 1052163 265734 swap # (Cyl. 74 - 366)
c: 17682084 0 unused 0 0 # (Cyl. 0 - 4923)
e: 1048572 1317897 4.2BSD 2048 16384 0 # (Cyl. 367 - 658)
f: 1048572 2366469 4.2BSD 1024 8192 0 # (Cyl. 659 - 950)
g: 14267043 3415041 4.2BSD 1024 8192 46608 # (Cyl. 951 - 4923)
Looking good, try it manually:
# newfs -O 2 -b 16384 -f 2048 /dev/rsd0e
/dev/rsd0e: 512.0MB (1048572 sectors) block size 16384, fragment size 2048
using 4 cylinder groups of 128.00MB, 8192 blks, 15872 inodes.
super-block backups (for fsck -b #) at:
160, 262304, 524448, 786592,
Surprise, it works! But the next one doesn't:
# newfs -O 2 -b 8192 -f 1024 /dev/rsd0f
newfs: maximum file system size on `/dev/rsd0f' is 1048572 sectors
Leave out the block and fragment sizes, then it does work:
# newfs -O 2 /dev/rsd0f
/dev/rsd0f: 512.0MB (1048572 sectors) block size 8192, fragment size 1024
using 12 cylinder groups of 42.67MB, 5462 blks, 10272 inodes.
super-block backups (for fsck -b #) at:
144, 87536, 174928, 262320, 349712, 437104, 524496, 611888, 699280, 786672,
874064, 961456,
For completeness, check rsd0g:
# newfs -O 2 -b 8192 -f 1024 -c 46608 /dev/rsd0g
/dev/rsd0g: 6966.3MB (14267042 sectors) block size 8192, fragment size 1024
using 153 cylinder groups of 45.54MB, 5829 blks, 10944 inodes.
super-block backups (for fsck -b #) at:
144, 93408, 186672, 279936, 373200, 466464, 559728, 652992,
746256, 839520, 932784, 1026048, 1119312, 1212576, 1305840, 1399104,
1492368, 1585632, 1678896, 1772160, 1865424, 1958688, 2051952, 2145216,
... etc etc...
So that does work as well.
The end of the story is that I had to newfs the file systems manually
and skip the newfs in sysinst.
What's going on? Am I too stupid? Should I file a PR?
Thanks -- Volker
PS: Please CC as I cannot read the list during the week.
--
------------------------------------------------------------------------
Volker A. Brandt Consulting and Support for Sun Solaris
Brandt & Brandt Computer GmbH WWW: http://www.bb-c.de/~vab/
Meckenheim, Germany Email: vab@bb-c.de