Date: Thu, 16 Jul 1998 09:31:58 +1000 From: Bruce Evans <bde@zeta.org.au> To: current@FreeBSD.ORG, rock@cs.uni-sb.de Subject: Re: Bug in kernel disklabel code? Message-ID: <199807152331.JAA25461@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>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: The "machine-independent" part of the disklabel code doesn't want to know about partition tables. It is supposed to see only logical drives and look for labels in them. This is wrong for extended partitions in the primary partition table, at least when extended partition is valid. There is no problem for nested extended partitions because slices for them aren't passed up to the machine-independent code. >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? Nothing much happens if you don't use these partitions. They used to be normally unused (there is no good reason to access the slice for the extended partition), but now the slice initialization code attempts to find all labels on all slices so that it can create devfs device nodes. Bruce 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?199807152331.JAA25461>