retrieving partition from dd image?
dsr at tao.merseine.nu
dsr at tao.merseine.nu
Fri Dec 29 04:05:24 EST 2006
On Thu, Dec 28, 2006 at 12:56:52PM -0500, 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.
You can mount an image of a partition that's been saved to a
file (most often done with an .ISO, but available for any
device-based filesystem) with mount -o loop.
In this case, you need to extract the specific partition to a
file. Run
fdisk -l restored.img
to get the partitioning information first.
-dsr-
--
_.. ___ . ... _ .... . _. ... ._ ._. . ._ _.. _.__ ___ .._ ._.
__ ._ .. ._.. ..__.. _ .... . .._. _... .. ..__..
--
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