lkml.org 
[lkml]   [2002]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: useless image of hdd: how to make it useful?
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/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.055 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site