Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Nov 2006 10:28:38 -0500
From:      Chuck Swiger <cswiger@mac.com>
To:        Jonathan Horne <freebsd@dfwlp.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: i need to upgrade a disk
Message-ID:  <4550A626.6090802@mac.com>
In-Reply-To: <200611070900.01897.freebsd@dfwlp.com>
References:  <200611070900.01897.freebsd@dfwlp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Horne wrote:
> i have a system that is FreeBSD 6.2-PRERELEASE, that i need to upgrade its 
> single disk.  id like to keep all its existing slices the same size, and then 
> use the unused space to create a new /opt slice.  would dd be the way to go?  
> if so, could someone advise on its proper usage for duplicating one disk to 
> another?

dd would be one way.  Use fdisk or sysinstall to create a disk label on the 
new disk with the partitions sized and named as you want.  Then run:

    dd if=/dev/ad0s1a of=/dev/ad1s1a bs=64k

...for each partition (except swap), where you would use the appropriate 
device names-- if is the source, of points to where you are writing to.  It's 
best to do this in a shell after booting off a FreeBSD CD, so that the on-disk 
filesystems are not actively mounted when you copy them.

The FAQ has a more complete discussion and alternatives like using dump and 
restore, I believe.

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4550A626.6090802>