DragonFly bugs List (threaded) for 2007-07
DragonFly BSD
DragonFly bugs List (threaded) for 2007-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue671] disklabel in raw and kernel mode disagree


From: "Simon 'corecode' Schubert" <sinknull@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 22 Jul 2007 08:33:13 -0000

Simon 'corecode' Schubert <corecode@fs.ei.tum.de> added the comment:

also happens with vn(4):

# truncate -s 4G disk.img           
# vnconfig -c -s labels vn0 disk.img
# fdisk -I /dev/vn0
******* Working on device /dev/vn0 *******
fdisk: invalid fdisk partition table found
Warning: ending cylinder wraps, using all 1's
# fdisk /dev/vn0
******* Working on device /dev/vn0 *******
parameters extracted from device are:
cylinders=4096 heads=64 sectors/track=32 (2048 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=4096 heads=64 sectors/track=32 (2048 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165,(DragonFly/FreeBSD/NetBSD/386BSD)
    start 32, size 8388576 (4095 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 255/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
# disklabel -r -w vn0s1 auto
# disklabel -r vn0s1
# /dev/vn0s1:
type: unknown
disk: amnesiac
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 256
sectors/cylinder: 16128
cylinders: 520
sectors/unit: 8388576
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

16 partitions:
#          size     offset    fstype   
  c:    8388576         32    unused    #    4095.984M
partition c: partition extends past end of unit
Warning, partition c doesn't start at 0!
Warning, An incorrect partition c may cause problems for standard system utilities
# disklabel vn0s1   
# /dev/vn0s1:
type: unknown
disk: amnesiac
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 256
sectors/cylinder: 16128
cylinders: 520
sectors/unit: 8388576
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

16 partitions:
#          size     offset    fstype   
  c:    8388576          0    unused    #    4095.984M


As you can see, -r shows the offset from beginning of the disk, without -r it
shows the offset from the start of the slice.

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue671>
_____________________________________________________




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