cloning a FreeBSD HDD

Mike Meyer mwm-keyword-freebsdhackers.102a7e at mired.org
Tue Mar 28 00:21:40 UTC 2006


In <20060324174235.GA58111 at qlovarnika.bg.datamax>, Vasil Dimov <vd at freebsd.org> typed:
> On Fri, Mar 24, 2006 at 06:19:13PM +0100, Dirk GOUDERS wrote:
> Without reading it, I would first try this, it's quite straightforward
> 
> * boot into single user mode (enter "boot -s" at loader prompt)
> * make sure filesystems are mounted readonly (mount)
> dd if=/dev/ad0 of=/dev/ad1 bs=1m
> (where ad0 is your disk with data and ad1 is your new disk, make sure
> you do not swap them :)

Doesn't really matter in single user mode - you'll just copy the swap
over. But yeah, this procedure works fine for me in the past.

One thing: 1m is a bit small for modern systems. Or for not-so-modern
systems. Since nothing else is running, you might as well use all the
memory you've got, or as big as you can get a process to be. 128m or
more is perfectly reasonable.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list