[Linux-disciples] Moving /dev/hda elsewhere

Adam Rosi-Kessel adam at rosi-kessel.org
Wed Dec 29 14:55:06 EST 2004


Are the drives the same exact size? If not, the dd method won't work. I
think it's a bad approach anyway, but maybe just because I've never done
it that way.

In your example, where the new drive is hde, I would just boot to a
Knoppix disk, mount both drives--say under /mnt/hda and /mnt/hde
respectively, and then

cp -a /dev/hda /dev/hde

(or -av if you want some reassurance that it's making progress)

The only thing left to do is to reinstall grub or lilo in the boot
sector.  You can do this with appropriate switches to grub-install or
lilo; sometimes I've chroot'd to the new main drive before doing
grub-install, but I don't think that is strictly necessary.

I think restoring an rdiff-backup image would be much slower than the
simple cp -a method.  I've switched many many drives that way.

On Tue, Dec 28, 2004 at 04:15:28PM -0500, Stephen R Laniel wrote:
> /dev/hda on my machine looks to be dying, so I ordered a new
> hard drive. When it arrives, how should I move the data off
> /dev/hda? I have an rdiff-backup of the drive, but as of
> right now I think the drive is totally readable; is there
> any reason I shouldn't just
> 
> 1) connect the new drive to an IDE cable and plug it in;
> 2) boot and see which device identifier Linux has assigned
> to it (say, /dev/hde);
> 3) do dd if=/dev/hda of=/dev/hde
> 
> ?
> 
> I assume I shouldn't do this. Should I just do an
> rdiff-backup restore? Or is there a faster way?
-- 
Adam Rosi-Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20041229/423f572e/attachment.pgp


More information about the Linux-disciples mailing list