retrieving partition from dd image?

David Kramer david at thekramers.net
Fri Dec 29 08:02:03 EST 2006


Scott Ehrlich wrote:
> I dd'd a dualboot drive from a machine to a file via dd if=/dev/hda
> |gzip -c |split -b 2000m - /mnt/remote/host/file.img.gz, and while I no
> longer have that machine to restore the image to, want to
> retrieve/restore one of the partitions.
> 
> I can easily re-cat, gzip -dc, dd of=restored.img, but beyond that, how
> do I extract the partition of choice?   Do I need to restore the image
> to a machine?  If so, I'll find one.

If you want to use dd to restore the immage, you need an identical
drive.  That's the problem with image backups.

What you can also do, though, is "mount -o loop restored.img
/mnt/restore", then "cp -a" the files from the partition to be restored.
  You may have to jigger the file ownership (though there are mount
flags to help with that) if the users have different uids on the new system.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the Discuss mailing list