Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Dec 1998 22:01:56 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        dillon@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, jin@iss-p5.lbl.gov
Subject:   Re: bin/7614
Message-ID:  <199812131101.WAA21601@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I'm pretty sure this PR can be closed, though I will add another note:
>sometimes there will be data on the disk that causes disklabel to barf,
>even when you are trying to install a new label.  When this happens to
>...
>e.g.  dd if=/dev/zero of=THEPARTITION bs=64k count=1
>(this will 'destroy' the disk, after which you can install a new
>label & new boot blocks with disklabel)

This should fail in most cases where you need it to work, since labels
are write protected.

The easiest way to bypass the write protection is to exploit its brokennes
for the whole disk, e.g.,

    dd if=THEDISK of=/var/tmp/youdokeepbackupsdontyou seek=whatever count=1
    dd if=/dev/zero of=THEDISK seek=whatever count=1

where `whatever' is the offset of the label in sectors (= offset of slice
+ 1 for "i386" disks).

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?199812131101.WAA21601>