[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: replacing hard disk



On Mon, 01 Jun 2009 17:12:17 -0400
Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > Are there any tips on moving the whole system from the old disk to
> > the new one? Or do I just have to re-install ubuntu, re-install
> > any updates and extra programs which are installed, find and copy
> > modified config files, mails, bookmarks, etc?
> 
> If you can connect both disks at the same time, and boot off of a Live
> CD (or a USB key), then the simplest option is:
> 
> - connect both disks
> - boot off of your rescue USB/CD.
> - dd if=/dev/[olddisk] of=/dev/[newdisk]
> - wait

I prefer System Rescue CD:

http://www.sysresccd.org/Main_Page

: using ddrescue for the copy if there is any reason to suspect bad
spots in the hard drive.

With System Rescue CD all your hard drives will be sda, sdb, etc....
doesn't matter whether they are sata or pata.

You can use the command:

fdisk -l

: to verify where the disks show up. Then issue the command:

ddrescue /dev/sda /dev/sdb

: assuming your old disk is sda and the new one sdb, new dis needs to
be at least as large as the old. Doing:

ddrescue --help

: will show you the syntax and list of available options.

The advantage ddrescue has is, on the first pass, when it hits a bad
spot on the disk it spends minimal effort attempting to read it before
moving on reducing the chance the drive will fail completely before you
get all the stuff from the good parts of the disk, once the first pass
is done it will make additional passes, breaking the bad spots into
smaller chunks in order to get much data as possible.

If you have a relatively small amount of stuff you consider to be of
high importance, it would be suggested to try to recover that
stuff first. Usually I will try with the file manager first, then if
there are errors during the copy, move on to other options.

Never tried ddresue with individual files, but it should be the same as
a partition or disk.

If the outfile needs to exist first you can use touch to create an
empty file:

touch /mnt/mountpoint/directory/filename

Later, Seeker


Reply to: