[Techtalk] dying hard drive

Wim De Smet kromagg at gmail.com
Sat Dec 2 14:53:48 UTC 2006


On 12/1/06, Maria McKinley <maria at shadlen.org> wrote:
> Hi there,
>
> Asking for more advice... I have a disk that is definitely on its way
> out. When I boot, it has numerous unrecoverable errors (in the /usr
> partition), but it does boot up and run. What is the best/easiest way
> for me to transfer stuff to a new drive? In the past, I've had drives
> fail more drastically, so that I have to re-install, and then I pull off
> config and user stuff off of backup. This time my old disk is still
> bootable, so seems like I should be able to just move stuff over to the
> new disk before it fails completely. Would love advice on best way to
> precede...

I recently had a similar problem with a drive and had to get all data
of it very fast. I found the easiest to do was
1) boot up a livecd (I used system rescue cd),
2) use dump/restore on all ext3 filesystems using the following steps:
- make a partition on the new drive (mke2fs)
- make the dump (I'll assume source is hda4, target is hdb4):
mount /dev/hdb4 /mnt/whatever; cd /mnt/whatever
dump -0 -f - /dev/hda4 | restore
--> that's a zero there, I don't really recall the options to restore
at the moment but something like this worked fine. I think this is a
better solution to dd. If it balks on disk errors, just pass the -I
switch to dump. Make sure hda4 isn't mounted.
3) use tar on reiser with -p and --numeric-uid or something like that
(dar would probably be better, but I don't know how to use it).
Something like:
cd /mountpointtosave
tar -cf - -p --numeric-something | (cd /mnt/newplacetogo; tar xf - )

That should probably do it, then install grub as indicated elsewhere.
Make sure to read all the manpages and be really careful around
options you pass to tar and dump! I dunno about using grub, that's how
I got the windows partition over (since that was mostly fried) but
it's not the fastest option (certainly not compared to dump) and it
needs a target of the same size (don't know about ddrescue though).

greets,
Wim


More information about the Techtalk mailing list