From owner-freebsd-hackers Sat Dec 23 05:14:58 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA10227 for hackers-outgoing; Sat, 23 Dec 1995 05:14:58 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id FAA10222 for ; Sat, 23 Dec 1995 05:14:52 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id AAA23907; Sun, 24 Dec 1995 00:09:49 +1100 Date: Sun, 24 Dec 1995 00:09:49 +1100 From: Bruce Evans Message-Id: <199512231309.AAA23907@godzilla.zeta.org.au> To: didier@omnix.fr.org, j@uriah.heep.sax.de Subject: Re: disk to disk copy Cc: hackers@FreeBSD.ORG Sender: owner-hackers@FreeBSD.ORG Precedence: bulk >> is it to do a disk to disk copy including the partition table and label >It depends on the device node you're using. You can copy all, includ- >ing even the master boot record (which _can_ be the start of the BSD >disklabel as well, but isn't for most disks). Actually, overwriting valid MBR's, SecondaryBR's (inside extended partitions and disk labels should fail. It succeeds in some cases because of bugs: - write protection isn't implemented for MBR's and SBR's - write protection of labels is implemented but can be defeated by copying to the whole disk device (e.g. /dev/rsd0 instead of /dev/rsd0c, even when these devices contain the same sectors). The MBR can never be the start of a FreeBSD disk label, since FreeBSD labels are always in sector LABELSECTOR = 1. BSD labels for other BSD's may start be in sector 0. FreeBSD would not be able to find these. Bruce