1 |
On Sun, Apr 6, 2008 at 5:03 PM, pat <pat@××××××××.org> wrote: |
2 |
> Hello, |
3 |
> |
4 |
> I have a question about mounting disk image as the disk. I have disk image |
5 |
> which was created using: |
6 |
> dd if=/dev/sda of=./file.iso |
7 |
> and the sda contained two partitions sda1 and sda2. I know, that if I have |
8 |
> only image of the sda1 I can mount it using loop device like |
9 |
> #losetup /dev/loop0 file.iso |
10 |
> #mount -t ... /dev/loop0 /mnt/tmp |
11 |
> |
12 |
> But, how to do it if the file structure is: sda -> sda1, sda2? I need to get |
13 |
> data from sda1 and sda2 :-| |
14 |
> |
15 |
> Thanks a lot for help. |
16 |
> |
17 |
> Pat |
18 |
> -- |
19 |
> gentoo-user@l.g.o mailing list |
20 |
> |
21 |
> |
22 |
|
23 |
I don't have time to test, but try something like this: |
24 |
|
25 |
(from: http://lwn.net/Articles/110426/) |
26 |
|
27 |
losetup /dev/loop0 file.iso |
28 |
blockdev --rereadpt /dev/loop0 |
29 |
mount /dev/loop0p2 /mnt/temp (for p2 replace with other partition, |
30 |
check ls /sys/block/loop0/dev) |
31 |
-- |
32 |
gentoo-user@l.g.o mailing list |