* [Qemu-devel] How to extract content of a raw image on host?
@ 2008-02-16 6:34 Dirk Behme
2008-02-16 6:41 ` JonY
0 siblings, 1 reply; 7+ messages in thread
From: Dirk Behme @ 2008-02-16 6:34 UTC (permalink / raw)
To: qemu-devel
Hi,
is there a way to extract the contents of a qemu raw image on (x86
Linux) host without starting QEMU itself? If so, any hint would be
quite nice.
I'm looking for anything like the reverse what
http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00448.html
seems to do. Extract files/directories from an existing raw image.
qemu-img reports me
> qemu-img info disk.img
image: disk.img
file format: raw
virtual size: 4.3M (4515328 bytes)
disk size: 4.3M
but what is in it and how to access the content?
Thanks, and sorry if this is a FAQ and I missed the correct search string,
Dirk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] How to extract content of a raw image on host?
2008-02-16 6:34 [Qemu-devel] How to extract content of a raw image on host? Dirk Behme
@ 2008-02-16 6:41 ` JonY
2008-02-16 7:18 ` Dirk Behme
0 siblings, 1 reply; 7+ messages in thread
From: JonY @ 2008-02-16 6:41 UTC (permalink / raw)
To: qemu-devel
Dirk Behme wrote:
> Hi,
>
> is there a way to extract the contents of a qemu raw image on (x86
> Linux) host without starting QEMU itself? If so, any hint would be quite
> nice.
>
> I'm looking for anything like the reverse what
>
> http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00448.html
>
> seems to do. Extract files/directories from an existing raw image.
>
> qemu-img reports me
>
> > qemu-img info disk.img
> image: disk.img
> file format: raw
> virtual size: 4.3M (4515328 bytes)
> disk size: 4.3M
>
> but what is in it and how to access the content?
>
> Thanks, and sorry if this is a FAQ and I missed the correct search string,
>
> Dirk
>
>
>
Hi,
have you tried using a loop back mount?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] How to extract content of a raw image on host?
2008-02-16 6:41 ` JonY
@ 2008-02-16 7:18 ` Dirk Behme
2008-02-16 7:44 ` JonY
2008-02-16 7:55 ` Laurent Vivier
0 siblings, 2 replies; 7+ messages in thread
From: Dirk Behme @ 2008-02-16 7:18 UTC (permalink / raw)
To: JonY; +Cc: qemu-devel
JonY wrote:
> Dirk Behme wrote:
>
>> Hi,
>>
>> is there a way to extract the contents of a qemu raw image on (x86
>> Linux) host without starting QEMU itself? If so, any hint would be
>> quite nice.
>>
>> I'm looking for anything like the reverse what
>>
>> http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00448.html
>>
>> seems to do. Extract files/directories from an existing raw image.
>>
>> qemu-img reports me
>>
>> > qemu-img info disk.img
>> image: disk.img
>> file format: raw
>> virtual size: 4.3M (4515328 bytes)
>> disk size: 4.3M
>>
>> but what is in it and how to access the content?
>>
>> Thanks, and sorry if this is a FAQ and I missed the correct search
>> string,
>>
>> Dirk
>>
> Hi,
>
> have you tried using a loop back mount?
# mount -o loop disk.img mnt/
mount: You have to specify a file system type
# mount -t raw -o loop disk.img mnt/
mount: unknown file system type „raw“
Sorry if I miss the obvious ;)
Dirk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] How to extract content of a raw image on host?
2008-02-16 7:18 ` Dirk Behme
@ 2008-02-16 7:44 ` JonY
2008-02-16 7:47 ` JonY
2008-02-16 7:55 ` Laurent Vivier
1 sibling, 1 reply; 7+ messages in thread
From: JonY @ 2008-02-16 7:44 UTC (permalink / raw)
To: Dirk Behme; +Cc: qemu-devel
Dirk Behme wrote:
> JonY wrote:
>> Dirk Behme wrote:
>>
>>> Hi,
>>>
>>> is there a way to extract the contents of a qemu raw image on (x86
>>> Linux) host without starting QEMU itself? If so, any hint would be
>>> quite nice.
>>>
>>> I'm looking for anything like the reverse what
>>>
>>> http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00448.html
>>>
>>> seems to do. Extract files/directories from an existing raw image.
>>>
>>> qemu-img reports me
>>>
>>> > qemu-img info disk.img
>>> image: disk.img
>>> file format: raw
>>> virtual size: 4.3M (4515328 bytes)
>>> disk size: 4.3M
>>>
>>> but what is in it and how to access the content?
>>>
>>> Thanks, and sorry if this is a FAQ and I missed the correct search
>>> string,
>>>
>>> Dirk
>>>
>> Hi,
>>
>> have you tried using a loop back mount?
>
> # mount -o loop disk.img mnt/
> mount: You have to specify a file system type
> # mount -t raw -o loop disk.img mnt/
> mount: unknown file system type „raw“
>
> Sorry if I miss the obvious ;)
>
> Dirk
>
>
Hi,
"raw" is not really a file system, its just a way of saying the image
has a "exact copy of every bit" of what a physical disk would have.
Try, "mount -o loop disk.img mnt/", mount might be able to determine the
correct file system.
If it is a hard disk image with partition tables, try opening it with
fdisk to confirm so. List down the partitions. Note the offsets
Try something like "mount -o loop,offset=32256 disk.img mnt/"
see here for more details:
http://howto.wikia.com/wiki/How_to_see_the_content_of_a_Qemu_image_on_a_linux-based_OS
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] How to extract content of a raw image on host?
2008-02-16 7:18 ` Dirk Behme
2008-02-16 7:44 ` JonY
@ 2008-02-16 7:55 ` Laurent Vivier
2008-02-16 13:47 ` Stuart Brady
1 sibling, 1 reply; 7+ messages in thread
From: Laurent Vivier @ 2008-02-16 7:55 UTC (permalink / raw)
To: qemu-devel; +Cc: JonY
[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]
Le samedi 16 février 2008 à 08:18 +0100, Dirk Behme a écrit :
> JonY wrote:
> > Dirk Behme wrote:
> >
> >> Hi,
> >>
> >> is there a way to extract the contents of a qemu raw image on (x86
> >> Linux) host without starting QEMU itself? If so, any hint would be
> >> quite nice.
> >>
> >> I'm looking for anything like the reverse what
> >>
> >> http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00448.html
> >>
> >> seems to do. Extract files/directories from an existing raw image.
> >>
> >> qemu-img reports me
> >>
> >> > qemu-img info disk.img
> >> image: disk.img
> >> file format: raw
> >> virtual size: 4.3M (4515328 bytes)
> >> disk size: 4.3M
> >>
> >> but what is in it and how to access the content?
> >>
> >> Thanks, and sorry if this is a FAQ and I missed the correct search
> >> string,
> >>
> >> Dirk
> >>
> > Hi,
> >
> > have you tried using a loop back mount?
>
> # mount -o loop disk.img mnt/
> mount: You have to specify a file system type
> # mount -t raw -o loop disk.img mnt/
> mount: unknown file system type „raw“
>
> Sorry if I miss the obvious ;)
Loop is not able to manage partition.
Either you use the offset option to point to the offset of the partition
you want to mount in the raw image.
Either you use the attached patch to be able to manage partition table
with loop (and load the module with parameter "max_part=64")
Laurent
--
----------------- Laurent.Vivier@bull.net ------------------
"Programmers who subconsciously view themselves as artists
will enjoy what they do and will do it better." D. Knuth
[-- Attachment #2: 0001-Modify-loop-device-to-be-able-to-manage-partitions-o.patch --]
[-- Type: application/mbox, Size: 3895 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-02-16 13:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 6:34 [Qemu-devel] How to extract content of a raw image on host? Dirk Behme
2008-02-16 6:41 ` JonY
2008-02-16 7:18 ` Dirk Behme
2008-02-16 7:44 ` JonY
2008-02-16 7:47 ` JonY
2008-02-16 7:55 ` Laurent Vivier
2008-02-16 13:47 ` Stuart Brady
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).