Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Feb 1999 23:54:19 -0500
From:      "Mark S. Reichman" <mark@borg.com>
To:        Chan Yiu Wah <c5666305@hkstar.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: how to install a new system by duplicating
Message-ID:  <36D8CBFB.2B3B8A73@borg.com>
References:  <199902271919.DAA16634@b1.hkstar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36D8CBFB.2B3B8A73>