09/06/2008

Dumping a disk image to a remote share

Situation: You have a samba share on a networked PC (if not, set up a samba server) a broken system partition you want to back up before screwing with it, a Linux rescue CD and no available movable hard disks. Configure your network with ifconfig/ifup or the correspondig utilities on the rescue disk. Mount your Samba share with
# sudo mount -t cifs -o username=<yourusername>,password=<yourpassword> //ip.of.network.pc/<nameofshare> /<some mount folder>
Knoppix e.g. has an empty mount folder at /media/test.
Now the image can be dumped with
# dd_rhelp /dev/<sdxx> /<some mount folder>/<some image>

So far in theory: practically, I couldn't find ddrescue on my Knoppix 5.1 live CD (no idea why, maybe I was just tired), so I just plugged the drive into good old Archimedes again and dumped the drive locally before it got completely unreadable. However, dd onto a samba share worked up to the first I/O error, as expected, so dd_rhelp ought to work on the same lines. Booting the Knoppix 5.3 DVD afterwards produced a perfectly reasonable /sbin/ddrescue.

No comments: