> Is a simple dd: > dd if=/dev/hdc of=/dev/hdx > capable of 'cloning' hdc into hdx? hdc is nearly dead so I will be > getting a replacement tomorrow and I don't fell like reinstalling > everything.
In addition to previous answers, if "nearly dead" means "has read errors", I'd rather reinstall the system. If you're desparate to save data from a disk with errors, you need dd_rescue from any SuSE distro. The standard dd has significant disadvantages which dd_rescue tries to address (it saved my bacon once or twice). In general, the more read attempts you make on a bad disk, the more errors the disk will get. Use your chance(s) wisely. cp has the advantage of not copying the whole disk. I would refrain from running fsck on the bad disk. Copy the lot first, then run fsck on a copy of the copy. Of course, the larger your partitions, the more trouble you'll have with finding space for copying. I keep all my important data on partitions which, surprise surprise, have exactly the size of a dvd. (Of course a little bigger works too, but then I'd have to compress and could no longer mount the dvd.) > DD the disk to a file on the larger disk and mount the image through a > loopback device. (It'll save space.) There's a noughty gotcha with this: if you dd single partitions, no problem. If you dd the disk, you'll have to give offsets when mounting partition with loop out of that dd image. 1) calculating the partition offsets is a pain and a half (politely put), 2) the offset is given in bytes, is rounded down to the nearest 512, and limited to 32 bits - if you're bigger than 4GB, you're stuffed. (Well, you use dd yet again and copy to another file.) Volker -- Volker Kuhlmann is possibly list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me.
