Subject: Re: "mbrlabel" weirdness - bug or feature?
To: Alec Muffett <alecm@crypticide.com>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: port-i386
Date: 02/18/2005 11:20:15
In message <0f3af5e6dd6469d004a35dcfcdc175da@crypticide.com>, Alec Muffett writ
es:
>
>
>Um, yes, and to do that requires me to understand how to *achieve*
>that, specifically it requires me to understand the apparent disjoint
>between the cylinder numbers reported by fdisk from the perspective of
>the BIOS, and the cylinder numbers from the perspective of NetBSD.
Disk geometry questions are second only to X configuration in confusing
me when setting up NetBSD systems. Now that X 4.4.0 does a better job
auto-probing, I may have to reverse the order....
>
>What I think I am learning from this thread is that NetBSD is not very
>happy with talking to NetBSD (any?) partitions that exist outside the
>scope of its main partition.
No, that's not true. Most of my NetBSD machines have a partition label
pointing to the Windows fdisk slice. Here's one example:
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 484406, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 488281250
BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 488281250
Partition table:
0: Dell PowerEdge Server utilities (sysid 222)
start 63, size 128457 (63 MB, Cyls 0-8)
1: OS/2 HPFS or NTFS or QNX2 or Advanced UNIX (sysid 7)
bootmenu: Windows
start 128520, size 40965750 (20003 MB, Cyls 8-2558)
2: CP/M or Concurrent CP/M or Concurrent DOS or CTOS (sysid 219)
start 482496210, size 5767335 (2816 MB, Cyls 30034-30393)
3: NetBSD (sysid 169)
bootmenu: NetBSD
start 41094270, size 441401940 (215528 MB, Cyls 2558-30034), Active
# disklabel wd0
# /dev/rwd0d:
type: unknown
disk: Maxtor 7Y250M0
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 484406
total sectors: 488281250
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 438255216 41094270 4.2BSD 1024 8192 46664 # (Cyl. 40768*- 475545*)
b: 3146724 479349486 swap # (Cyl. 475545*- 478666*)
c: 441401940 41094270 unused 0 0 # (Cyl. 40768*- 478666*)
d: 488281250 0 unused 0 0 # (Cyl. 0 - 484406*)
e: 128457 63 unknown # (Cyl. 0*- 127*)
f: 40965750 128520 NTFS # (Cyl. 127*- 40768*)
g: 5767335 482496210 unknown # (Cyl. 478666*- 484388*)
#
--Prof. Steven M. Bellovin, http://www.cs.columbia.edu/~smb