From owner-freebsd-questions Fri Jul 3 00:08:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA28714 for freebsd-questions-outgoing; Fri, 3 Jul 1998 00:08:53 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.ftf.dk (mail.ftf.dk [129.142.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA28709 for ; Fri, 3 Jul 1998 00:08:50 -0700 (PDT) (envelope-from regnauld@tetard.glou.eu.org) Received: from mail.prosa.dk ([192.168.100.254]) by mail.ftf.dk (8.8.8/8.8.8/gw-ftf-1.0) with ESMTP id JAA05208; Fri, 3 Jul 1998 09:08:18 +0200 (CEST) (envelope-from regnauld@tetard.glou.eu.org) X-Authentication-Warning: mail.ftf.dk: Host [192.168.100.254] claimed to be mail.prosa.dk Received: from deepo.prosa.dk (deepo.prosa.dk [192.168.100.10]) by mail.prosa.dk (8.8.8/8.8.5/prosa-1.1) with ESMTP id JAA01120; Fri, 3 Jul 1998 09:07:49 +0200 (CEST) Received: (from uucp@localhost) by deepo.prosa.dk (8.8.8/8.8.5/prosa-1.1) with UUCP id JAA16352; Fri, 3 Jul 1998 09:08:02 +0200 (CEST) Received: from tetard.glou.eu.org (tetard [192.168.1.1]) by shiva.glou.eu.org (8.8.5/8.8.8/prosa-1.1) with ESMTP id JAA05538; Fri, 3 Jul 1998 09:07:22 +0200 (MET DST) (envelope-from regnauld@tetard.glou.eu.org) Received: (from regnauld@localhost) by tetard.glou.eu.org (8.8.8/8.7.3/tetard-uucp-2.7) id JAA17249; Fri, 3 Jul 1998 09:09:36 +0200 (MET DST) Message-ID: <19980703090936.64084@tetard.glou.eu.org> Date: Fri, 3 Jul 1998 09:09:36 +0200 From: Philippe Regnauld To: Greg Lehey Cc: ccoley@kinn.com, freebsd-questions@FreeBSD.ORG Subject: Re: Copying disks (was: Copying) References: <359C45E8.7354@kinn.com> <19980703124830.I358@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Description: Main Body X-Mailer: Mutt 0.69 In-Reply-To: <19980703124830.I358@freebie.lemis.com>; from Greg Lehey on Fri, Jul 03, 1998 at 12:48:30PM +0930 X-Operating-System: FreeBSD 3.0-CURRENT i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg Lehey (grog) écrit/writes: > On Thursday, 2 July 1998 at 18:46:00 -0800, Curtis Coley wrote: > > Is it possible to copy a FreeBSD system that I have to another drive, so > > that I can bring up another system that has all the features I want to > > use on another machine? Thank you for any information that can be > > provided.. > > Yes, assuming it's the same kind of disk. You should be able to do it > with dd, but I believe dd won't copy the disk label, so you should Assuming you use DD (instead of say, dump, which is another solution), dd _will_ copy the disklabel, boot blocks and kitchen sink :-) If your disks are identical, of it sizeof(Target) > sizeof(Source), you can do, from single user or from a bootable floppy with dd on it: dd if=/dev/rsd0 of=/dev/rsd1 bs=1024k [count=xxx] conv=notrunc The above will duplicate disk0 on to disk1, until end of disk (for which notrunc is needed to write the last block non multiple of 1 MB) or until count blocks of 1Mbyte has reached. I use the above to duplicate 12 FreeBSD/Win95 machines for teaching purposes -- I left 10 Mbytes empty between each partition on a 3 GB disk, so I can do: dd if=/dev/rsd0 of=/dev/rsd1 bs=1024k count=1581 ...to recreate the FreeBSD partition (1580 Mbytes) without chewing up Win95 behind. The other way around has been a problem (overwriting from middle-to-end of disk, with skip=) as dd will not accept an offset in bytes of more >2 GB. It's a gross hack but it works -- on IDE controllers, _provided the disks are _really_ identical_ I just pull out the slave disk when the copy is finished, and plug in another on the fly, and dd again :-) -- -- Phil -[ Philippe Regnauld / regnauld@eu.org / +55.4N +11.3E @ Sol3 / +45 33241690 ]- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message