Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2004 22:12:09 +1100
From:      Tony Frank <tfrank@optushome.com.au>
To:        Tig <tigger@onemoremonkey.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Copy old drive to new drive - is it possible?
Message-ID:  <20040221111209.GJ98919@marvin.home.local>
In-Reply-To: <20040221213841.76391b1c@piglet.goo>
References:  <20040221213841.76391b1c@piglet.goo>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi there,

On Sat, Feb 21, 2004 at 09:38:41PM +1100, Tig wrote:
> Hi, I have a hard drive which is on its last legs. I also have new hard
> drive to replace the old one. I was wondering if it is possible to
> simply copy everything from the old drive to the new (after formating
> the new drive) and have my system back up and running, or do I need to
> reinstall the OS and everything else?

Yes this is quite possible & happens regularly.

Check out the handbook chapter 12:
http://marvin.home.local/doc/en_US.ISO8859-1/books/handbook/disks-adding.html

This example is for a new disk alongside existing system.

If you plan to replace the original disk altogether you can do:
0. Backup all important data, settings, configuration & hard to replace items.
1. Physically install new disk together with old disk
2. Install boot blocks if necessary
3. layout filesystems on the new disk (can use fdisk & disklabel)
4. Create new filesystems (newfs)
5. mount new filesystem in temporary location 
6. copy data across.
Many ways exist:
tar
cpio
dump / restore
7. shutdown system
8. Remove old drive, install new drive in old position.
Ie if IDE primary master is your old disk, put the new into the same
position.

If it all goes to pieces reinstall on the new drives and restore your
backups.

You can use /stand/sysinstall to do steps 2,3,4 - the handbook covers
this part quite well.

> Tips, URL's or a simple 'from personal experience, best to reinstall'
> comments more than welcome.

It depends on how comfortable you are in a procedure like the above.
It may be reinstall is easiest / best option for you.

Regards,

Tony



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