On Tuesday 26 April 2011 00:25:52 me,apporc wrote:
> Hi
> Is there a book or someting like which i can refer to for these knowledge
> about disks , images files and partitions .
> I don't know how to mount a partition in a image file with offset .I want
> to know detailed knowledge about this . I hope you can give me an advice.

Point one: the block stream in an image file is very much like the block 
(sector) stream on a hard drive.

Point two: the man pages are your friend; 'man mount' and 'man losetup' will 
tell you what you need to know about mounting image files and using offsets 
into those images. Here is a very simple, generic example of mounting file 
disk.image onto mount point '/mnt' with an offset 234 bytes into the file:
  mount disk.image /mnt -o loop,offset=234

As to determining the actual offsets to use, you will have to read up on the 
particular VM technology used, be it QEMU, VMware, Xen, VirtualBox or any 
other system. I expect they will all be different. You will also have to 
research the various partition format available (MSDOS, PC98, GPT, Apple, SCO, 
BSD, etc.); they're all different.

You should even find information via Google or Wikipedia about specific image 
file formats, but this takes time and persistence.

I've learned what I know about the subject from the man pages, Google, 
Wikipedia and plenty of plain, dogged experimentation using dd, od and other 
shell tools to dissect image files in order to figure out what is where in the 
files.

N
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to