boot0 and fdisk / disklabel misbehaviour
Bruce Evans
bde at zeta.org.au
Tue Nov 11 08:32:40 PST 2003
On Tue, 11 Nov 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote:
> I've been busy installing various OSes on a spare disk in order to try
> to reproduce some of fefe's benchmarks. In the process, I've noticed
> a couple of bogons in boot0 and disklabel:
>
> - disklabel -B trashes the partition table:
>
> # dd if=3D/dev/zero of=3D/dev/ad0 count=3D20
> # fdisk -i ad0
> (create a FreeBSD partition)
> # disklabel -rw ad0s1 auto
> # newfs -U /dev/ad0s1a
> # disklabel -B ad0s1a
> (this trashes the partition table)
I think you mean bsdlabel. disklabel is just a link to bsdlabel in
-current.
This was fixed in rev.1.8 of disklabel.c, but the change was lost in
bsdlabel.
> This probably happens because fdisk silently allows the user to
> create a partition that overlaps the partition table. Arguably
> pilot error, but very confusing at the time, and fdisk should warn
> about it.
Yes. This is the dangerously undedicated case. Some consider this to
be an error. I only ever used it for one drive.
Bruce
More information about the freebsd-current
mailing list