NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Something is wrong with fdisk/disklabel



Hi, I have a disk with 4 partitions NetBSD, FAT32, Solaris and Linux.

atom$ fdisk wd0
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 484521, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 488397168

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 488397168

Partition table:
0: NetBSD (sysid 169)
    bootmenu: NetBSD
    start 63, size 409609242 (200005 MB, Cyls 0-25496), Active
1: Primary DOS with 32 bit FAT - LBA (sysid 12)
    bootmenu: WinXP
    start 409609305, size 20482875 (10001 MB, Cyls 25497-26771)
2: Solaris boot partition (sysid 191)
    bootmenu: Solaris
    start 430092180, size 40965750 (20003 MB, Cyls 26772-29321)
3: Linux native (sysid 131)
    bootmenu: Linux
    start 471057930, size 17318070 (8456 MB, Cyls 29322-30399)
Bootselector enabled, timeout 10 seconds.
First active partition: 0

The NetBSD partition has the following slices:

wd0a /
wd0b swap
wd0e /var
wd0f /home (encrypted)
wd0g /opt

atom# disklabel wd0
# /dev/rwd0d:
type: unknown
disk: SAMSUNG HM251HI
label: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 484521
total sectors: 488397168
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:   4096512        63     4.2BSD   2048 16384     0  # (Cyl.      0*-   4064*)
 b:   4096512   4096575       swap                     # (Cyl.   4064*-   8128*)
 c: 409609242        63     unused      0     0        # (Cyl.      0*- 406358*)
 d: 488397168         0     unused      0     0        # (Cyl.      0 - 484520)
 e:   2048256   8193087     4.2BSD   1024  8192     0  # (Cyl.   8128*-  10160*)
 f: 102400704  10241343        ccd                     # (Cyl.  10160*- 111748*)
 g: 296967636 112642047     4.2BSD   2048 16384     0  # (Cyl. 111748*- 406358*)
 

As you can see NetBSD partition 0 ends on:
63 + 409609242 = 409609305.

However if I add up wd0g offset and size numbers I get:
112642047 + 296967636 = 409609683, which extends past NetBSD partition.

I have to say all partitions on disk 0-3 were created with NetBSD's fdisk, and 
all NetBSD slices a-g were created by sysinstall.

My question is how is it possible for wd0g exten past NetBSD partition? Is this 
sysintall bug?


Home | Main Index | Thread Index | Old Index