* open image file
@ 2013-02-03 2:03 horseriver
2013-02-03 14:12 ` Anuz Pratap Singh Tomar
0 siblings, 1 reply; 9+ messages in thread
From: horseriver @ 2013-02-03 2:03 UTC (permalink / raw)
To: kernelnewbies
hi:
Is there mothod to look into a image file ?
How can I know its filesystem?
I have mounted my fd0 to /mnt with -t tmpfs ,but I find
nothing under /mnt.How can I touch the files in image?
thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-03 2:03 open image file horseriver
@ 2013-02-03 14:12 ` Anuz Pratap Singh Tomar
2013-02-03 14:17 ` Zoltan Gyarmati
0 siblings, 1 reply; 9+ messages in thread
From: Anuz Pratap Singh Tomar @ 2013-02-03 14:12 UTC (permalink / raw)
To: kernelnewbies
On Sun, Feb 3, 2013 at 2:03 AM, horseriver <horserivers@gmail.com> wrote:
> hi:
>
> Is there mothod to look into a image file ?
> How can I know its filesystem?
>
> I have mounted my fd0 to /mnt with -t tmpfs ,but I find
> nothing under /mnt.How can I touch the files in image?
>
> I think you need to mount it as loopback device
http://www.andremiller.net/content/mounting-hard-disk-image-including-partitions-using-linux
>
> thanks!
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
Thank you
Warm Regards
Anuz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130203/19d8acc0/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-03 14:12 ` Anuz Pratap Singh Tomar
@ 2013-02-03 14:17 ` Zoltan Gyarmati
2013-02-04 14:03 ` Greg Freemyer
0 siblings, 1 reply; 9+ messages in thread
From: Zoltan Gyarmati @ 2013-02-03 14:17 UTC (permalink / raw)
To: kernelnewbies
On 02/03/2013 03:12 PM, Anuz Pratap Singh Tomar wrote:
>
>
> On Sun, Feb 3, 2013 at 2:03 AM, horseriver <horserivers@gmail.com
> <mailto:horserivers@gmail.com>> wrote:
>
> hi:
>
> Is there mothod to look into a image file ?
> How can I know its filesystem?
>
> I have mounted my fd0 to /mnt with -t tmpfs ,but I find
> nothing under /mnt.How can I touch the files in image?
>
> I think you need to mount it as loopback device
> http://www.andremiller.net/content/mounting-hard-disk-image-including-partitions-using-linux
>
>
>
> thanks!
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> <mailto:Kernelnewbies@kernelnewbies.org>
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
>
> --
> Thank you
> Warm Regards
> Anuz
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi,
in case of image with multiple partitions, easier to use kpartx, then
get the offsets with parted:
http://ppadala.net/blog/2010/09/kpartx-to-mount-vm-disk-images/
of course with image with one partition, it doesn't matter
--
br,
Zoltan Gyarmati
mail: mr.zoltan.gyarmati at gmail.com
freenode nick: zgyarmati
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-03 14:17 ` Zoltan Gyarmati
@ 2013-02-04 14:03 ` Greg Freemyer
2013-02-04 14:24 ` Zoltan Gyarmati
2013-02-04 19:16 ` horseriver
0 siblings, 2 replies; 9+ messages in thread
From: Greg Freemyer @ 2013-02-04 14:03 UTC (permalink / raw)
To: kernelnewbies
Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com> wrote:
>Hi,
>
>in case of image with multiple partitions, easier to use kpartx, then
>get the offsets with parted:
>http://ppadala.net/blog/2010/09/kpartx-to-mount-vm-disk-images/
>
>of course with image with one partition, it doesn't matter
I think you meant an image of a drive with no partitions:
Ie.
mkfs /dev/sdb. Create a filesystem on the entire disk, there is no offset and no partitions (the entire disk is the filesystem, no mbr or gpt).
mkfs /dev/sdb1. Create a filesystem on the first partition, there is an offset even if it is the only partition. You examine the mbr or gpt to determine the offset.
Or possibly you meant an image of a partition:
dd if=/dev/sdb1 of=image_file. Create the image of a partition, no offset needed for loopback mount.
Greg
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-04 14:03 ` Greg Freemyer
@ 2013-02-04 14:24 ` Zoltan Gyarmati
2013-02-04 19:16 ` horseriver
1 sibling, 0 replies; 9+ messages in thread
From: Zoltan Gyarmati @ 2013-02-04 14:24 UTC (permalink / raw)
To: kernelnewbies
On 02/04/2013 03:03 PM, Greg Freemyer wrote:
>
> Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com> wrote:
>
>
>> Hi,
>>
>> in case of image with multiple partitions, easier to use kpartx, then
>> get the offsets with parted:
>> http://ppadala.net/blog/2010/09/kpartx-to-mount-vm-disk-images/
>>
>> of course with image with one partition, it doesn't matter
> I think you meant an image of a drive with no partitions:
>
> Ie.
> mkfs /dev/sdb. Create a filesystem on the entire disk, there is no offset and no partitions (the entire disk is the filesystem, no mbr or gpt).
>
> mkfs /dev/sdb1. Create a filesystem on the first partition, there is an offset even if it is the only partition. You examine the mbr or gpt to determine the offset.
>
> Or possibly you meant an image of a partition:
>
> dd if=/dev/sdb1 of=image_file. Create the image of a partition, no offset needed for loopback mount.
>
> Greg
>
Indeed!
I was not accurate enough, thx for the comment.
--
br,
Zoltan Gyarmati
mail: mr.zoltan.gyarmati at gmail.com
freenode nick: zgyarmati
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-04 14:03 ` Greg Freemyer
2013-02-04 14:24 ` Zoltan Gyarmati
@ 2013-02-04 19:16 ` horseriver
2013-02-05 6:15 ` Vineet Agarwal
1 sibling, 1 reply; 9+ messages in thread
From: horseriver @ 2013-02-04 19:16 UTC (permalink / raw)
To: kernelnewbies
hi:)
I have a image file ,after I input this command:
******
sh> losetup /dev/loop0 xx.img
sh> mount -t tmpfs /dev/loop0 /mnt
******
I find no content under /mnt ,But this image file contains a bootloader.
What is the reason ? How can I check out the file tree structure of this image ?
thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-05 6:15 ` Vineet Agarwal
@ 2013-02-04 20:59 ` horseriver
2013-02-05 17:03 ` Valdis.Kletnieks at vt.edu
0 siblings, 1 reply; 9+ messages in thread
From: horseriver @ 2013-02-04 20:59 UTC (permalink / raw)
To: kernelnewbies
hi:
It is not a cpio archive , so that command can not work .
its file system type is tmpfs.
thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-04 19:16 ` horseriver
@ 2013-02-05 6:15 ` Vineet Agarwal
2013-02-04 20:59 ` horseriver
0 siblings, 1 reply; 9+ messages in thread
From: Vineet Agarwal @ 2013-02-05 6:15 UTC (permalink / raw)
To: kernelnewbies
On Tue, Feb 5, 2013 at 12:46 AM, horseriver <horserivers@gmail.com> wrote:
> hi:)
>
> I have a image file ,after I input this command:
>
> ******
> sh> losetup /dev/loop0 xx.img
> sh> mount -t tmpfs /dev/loop0 /mnt
>
> ******
>
>
> I find no content under /mnt ,But this image file contains a bootloader.
> What is the reason ? How can I check out the file tree structure of this
> image ?
>
>
Determine the file type of your image file.
I suspect you are trying to look into the initrd images. These image files
are compressed gzip images.
You can try extracting the image file then examine it's content.
gunzip -c <path_to_image_file> | cpio -id
The above command would extract the content of the image file in the
current directory.
Hope this solves your problem.
thanks!
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130205/84795851/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* open image file
2013-02-04 20:59 ` horseriver
@ 2013-02-05 17:03 ` Valdis.Kletnieks at vt.edu
0 siblings, 0 replies; 9+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-02-05 17:03 UTC (permalink / raw)
To: kernelnewbies
On Tue, 05 Feb 2013 04:59:42 +0800, horseriver said:
> hi:
>
> It is not a cpio archive , so that command can not work .
>
> its file system type is tmpfs.
Umm. No. It's not tmpfs.
tmpfs is a specific ram/swap based filesystem - basically, take enough
4K pages for the size= parameter and do it in memory. Major user-visible
difference from the older 'ramfs' is that tmpfs pages can move to swap
space, and ramfs pages are nailed down in RAM.
mount -t tmpfs /dev/loop0 /mnt
This never actually looks at /dev/loop0 *at all*. You could even say this:
mount -t tmpfs none /mnt
and it would work just fine. Try leaving the '-t tmpfs' off entirely and
let the mount command figure out what type it is, and see if that works
any better for you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130205/70699028/attachment.bin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-02-05 17:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-03 2:03 open image file horseriver
2013-02-03 14:12 ` Anuz Pratap Singh Tomar
2013-02-03 14:17 ` Zoltan Gyarmati
2013-02-04 14:03 ` Greg Freemyer
2013-02-04 14:24 ` Zoltan Gyarmati
2013-02-04 19:16 ` horseriver
2013-02-05 6:15 ` Vineet Agarwal
2013-02-04 20:59 ` horseriver
2013-02-05 17:03 ` Valdis.Kletnieks at vt.edu
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).