Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jul 1998 20:56:56 +0200 (CEST)
From:      "D. Rock" <rock@cs.uni-sb.de>
To:        current@FreeBSD.ORG
Subject:   Bug in kernel disklabel code?
Message-ID:  <13740.64305.837054.908108@doom.ics>

next in thread | raw e-mail | index | archive | help
There seems to be bug in the disklabel kernel code.

I recently deleted an FreeBSD partition and created a DOS partition
instead (with DOS fdisk). Because this is the 2nd DOS partition on the 
same drive an extended partition was created with an DOS drive in
it. Because the extended partition is just "a disk drive by itself",
the first (logical) head wasn't overwritten (besides the partition
table). It seems the disklabel code finds a FreeBSD disklabel in it
and tries to use it, although the partition type isn't FreeBSD:
wd0s2: raw partition size != slice size
wd0s2: start 6602715, end 9735389, size 3132675
wd0s2c: start 6602715, end 9767519, size 3164805
wd0s2: truncating raw partition
wd0s2: rejecting partition in BSD label: it isn't entirely within the slice
wd0s2: start 6602715, end 9735389, size 3132675
wd0s2a: start 6602715, end 9767519, size 3164805

It is rejecting them, but what if the partition sizes were slightly
different (creating a DOS partition larger than the initial BSD
partition(*))? Shouldn't the disklabel code look first at the
partition ID?

(*) The DOS partition is "magically" smaller than the BSD partition
before. DOS fdisk didn't use the entire disk, but "forgot" the last 2
cylinders:
******* Working on device /dev/rwd0 *******
parameters extracted from in-core disklabel are:
cylinders=608 heads=255 sectors/track=63 (16065 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=608 heads=255 sectors/track=63 (16065 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 11,(DOS or Windows 95 with 32 bit FAT)
    start 63, size 6602652 (3223 Meg), flag 0
        beg: cyl 0/ sector 1/ head 1;
        end: cyl 410/ sector 63/ head 254
The data for partition 2 is:
sysid 5,(Extended DOS)
    start 6602715, size 3132675 (1529 Meg), flag 0
        beg: cyl 411/ sector 1/ head 0;
        end: cyl 605/ sector 63/ head 254
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>


Daniel

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13740.64305.837054.908108>