Date: Fri, 3 Jul 1998 09:09:36 +0200 From: Philippe Regnauld <regnauld@I23.EU.org> To: Greg Lehey <grog@lemis.com> Cc: ccoley@kinn.com, freebsd-questions@FreeBSD.ORG Subject: Re: Copying disks (was: Copying) Message-ID: <19980703090936.64084@tetard.glou.eu.org> In-Reply-To: <19980703124830.I358@freebie.lemis.com>; from Greg Lehey on Fri, Jul 03, 1998 at 12:48:30PM %2B0930 References: <359C45E8.7354@kinn.com> <19980703124830.I358@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980703090936.64084>