From owner-freebsd-questions Mon Oct 1 3:28:21 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id C071237B40C for ; Mon, 1 Oct 2001 03:28:18 -0700 (PDT) Received: (qmail 30288 invoked by uid 100); 1 Oct 2001 10:28:17 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15288.17729.723382.466783@guru.mired.org> Date: Mon, 1 Oct 2001 05:28:17 -0500 To: Micke Josefsson Cc: questions@freebsd.org Subject: RE: Copy a disk using dd In-Reply-To: <79586351@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [Context recovered from top posting.] Micke Josefsson types: > On 30-Sep-2001 Mario Doria wrote: > > On some machine with 2 identical disks, I want to copy everything on the > > first drive to the second drive (mirror copy). The disks are da0 and da1. > > I'm thinking of using: > > dd if=/dev/da0 of=/dev/da1 bs=8192 > > Is this OK? > > The purpose of this is to later remove the second hard disk, and use it on > > another machine (like installing using Norton's Ghost). Both machines are > > identical, I just don't want to do two separate installations. > It works if you are absolutely certain that the disks are EXACTLY identical. > I.e. the disk you are copying to only have bad sectors in common with the source > drive. Are you willing to take that risc? Probably not. Don't SCSI drives do the bad block remapping themselves, transparent to the OS? If so, then this won't matter. > Format the second disk then use tar or cpio to get the info over. Since he's talking about moving the installation, he's probably going to use move root. Dump is the only thing you can depend on to do that reliably: dump 0uf - /srcdev | (cd /destdev; restore -f -) http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message