Re: useless image of hdd: how to make it useful?

From: Andries Brouwer (aebr@win.tue.nl)
Date: Mon Nov 18 2002 - 16:51:58 EST


On Mon, Nov 18, 2002 at 11:08:10AM +0100, Filipau, Ihar wrote:

> # dd if=/dev/hdc of=/root/hdc_img
>
> I do not know the way to mount partition table!
> it's possible with loop device to mount partition - but how
> to mount whole hddd (with its own partition table) to have
> access to single partition inside???

loop knows about an offset:

First find where your partitions are:

% sfdisk -l -uS hdc_img
Warning: hdc_img is not a block device
Disk hdc_img: cannot get size
Disk hdc_img: cannot get geometry

Disk hdc_img: 0 cylinders, 0 heads, 0 sectors/track

Units = sectors of 512 bytes, counting from 0

   Device Boot Start End #sectors Id System
 hdc_img1 63 112454 112392 83 Linux
 hdc_img2 112455 401624 289170 82 Linux swap
 hdc_img3 401625 33736499 33334875 5 Extended
 ...

OK, let us mount this first one, at an offset of 63 sectors.

% bc
63*512
32256

# mount hdc_img /mnt -o loop,offset=32256
#

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:24 EST