Date: Sat, 26 Feb 2000 02:30:02 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/17003: dscheck() overzealously protects labels on non-BSD partitions Message-ID: <200002261030.CAA78984@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/17003; it has been noted by GNATS.
From: Bruce Evans <bde@zeta.org.au>
To: eps@sirius.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/17003: dscheck() overzealously protects labels on non-BSD
partitions
Date: Sat, 26 Feb 2000 21:24:01 +1100 (EST)
On Sat, 26 Feb 2000 eps@sirius.com wrote:
> On a drive using DOS partitioning, dscheck() prevents overwriting the
> first 1K of a partition that formerly held a UFS filesystem, even if
It actually prevents overwriting the second sector. This prevents
overwriting the first nK if the write is for nK at offset 0 and the
sector size is < nK.
> the partition type is changed to something other than DOSPTYP_386BSD.
This is a feature. All types of partitions can have BSD labels. This
part of the feature is intentional. If you don't want your otherOS
partitions labeled, then don't put a label on them, and don't forget
to remove unwanted labels if you change partition types. Also, be
careful when moving partitions. An old label will wake up if there
is a valid one in the second sector of a new partition.
Labels can be difficult to remove, because of bugs in the label write
(un)protection ioctl. The only reliable method that I know of is:
1) Open the whole disk device for the drive, and write suitable garbage
(normally 0's) over the label sector. If you use dd, then you will
need an up to date dd that supports seeking to offsets >= 2GB if the
label sector offset is >= 2GB.
2) Make sure that all subdevices on the drive are closed. An in-core
copy of the old label will be used until the next open after they
are all closed.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002261030.CAA78984>
