From owner-freebsd-questions Sat Feb 27 20:50:29 1999 Delivered-To: freebsd-questions@freebsd.org Received: from madcow.borg.com (madcow.borg.com [205.217.206.165]) by hub.freebsd.org (Postfix) with ESMTP id 150941502C for ; Sat, 27 Feb 1999 20:50:27 -0800 (PST) (envelope-from mark@borg.com) Received: from mail.borg.com (mail.borg.com [205.217.206.192]) by madcow.borg.com (8.9.0/8.8.8) with ESMTP id XAA07348; Sat, 27 Feb 1999 23:50:10 -0500 (EST) Received: from borg.com (ip46a.borg.com [208.3.180.46]) by mail.borg.com (8.8.7/8.7.3) with ESMTP id XAA08171; Sat, 27 Feb 1999 23:50:06 -0500 (EST) Message-ID: <36D8CBFB.2B3B8A73@borg.com> Date: Sat, 27 Feb 1999 23:54:19 -0500 From: "Mark S. Reichman" X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.1-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Chan Yiu Wah Cc: freebsd-questions@FreeBSD.ORG Subject: Re: how to install a new system by duplicating References: <199902271919.DAA16634@b1.hkstar.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I just did this... This my way, not necassarily everyones way. Lets assume you have 1 FreeBSD slice containing all your partitions(/,/var,/usr,...) on wd0 and want duplicate this same setup to wd1... NOTE: Remember, /stand/sysinstall, dump, and restore are your friends through this whole thing. 1) If you need to, add a second disk to system. Reboot... 2) Type /stand/sysintall at the prompt. 3) Select "5 Configure Do post-install configuration of FreeBSD" 4) Select "F Fdisk The disk Slice (PC-style partition) Editor " 5) Select wd1.. (<--example..) 5) Hack off a chunk of the disk for a FreeBSD slice at least the same size as the total data you want to copy or bigger or use the whole disk. Use option C to create, option S to make it bootable, enter the size of the slice, and then use option W to write the slice to the disk. Hint: Make sure you are doing this on the correct/new disk. 6) Select "L Label The disk Label editor" 7) Create your partitions within the slice of step 5. Here you would make /,/var,/usr and swap space and/or carve the slice up to mimic the old/source disk. Make some temp mount points, usually some subdirs under /mnt like /mnt/usr and /mnt/var, for the new/destination partitions. Make one temp subdir under /mnt for each new partition created. Use C to create a partition, set the size, set the temp mnt point and then Choose W to write each partition to the disk. Write down the device name assigned by label editor for each partition and the temp mount point the partition is attached to. 8) If all is well, all should be created and mounted. Lets assume a new/destination partition, wd1s1f, was created for the new /usr. It was temporarily mounted at /mnt/usr by the Label Editor. We need to copy the data from the old (/usr a.k.a. /dev/wd0s1f) to the new (/mnt/usr a.k.a /dev/wd1s1f). At the prompt try.. $ cd /mnt/usr <--- Very important to be cd'd into the directory you want to copy to... $ dump -0f - /dev/wd0s1f | restore xf - Restore will place the dump in the current working dir. Thats why you need to be cd'd into it. 9) Do this, step 8, for each old/source partition that needs to be copied to a new/destination partiton. 10) Oh.. I forgot... Before attempting step 1... Cross fingers... Chan Yiu Wah wrote: > > Hello, > > Is there anyone try to install a new system by duplicating the content of > a disk. That is to copy the content if disk 1 to disk2 which is the system > of another machine. If so, can you show me your steps. Thanks. > > Clarence > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- \|/ (@ @) +----------oOO----(_)------------------+ | Mark S. Reichman FreeBSD | | mark@borg.com Got source? | | | | May the source be with you! | | | +------------------------oOO-----------+ |__|__| || || ooO Ooo To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message