|
|
|
|
|
|
Home PageContact MeMAC OS XLinuxLinux Servers Fedora Core 4Linux Servers - CentOSLinux Servers Fedora Core 5Linux Servers Fedora Core 7Linux Servers Fedora 8OpenWRTNSLU2LinuxClusterHardware Hacking ProjectsSpeaker Building ProjectsElectronics ProjectsOther Sites |
Status/History
IntroductionI've been recently working with Xen 3.0 and Fedora Core 5 and disk images have become a part of linux life. Now I'm not talking about an image file that is a single partition. I'm talking about a disk image that represents a hard drive with an MBR and multiple partition in it. Mounting a Xen 3.0 Disk ImageWe need to start by mounting the image file to a loop back device. Here's another way to mount the partitions. We will use losetup with offsets. So start with the following:
Disk /dev/loop0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/loop0p1 * 63 208844 104391 83 Linux
/dev/loop0p2 208845 8385929 4088542+ 8e Linux
Now the important part is the start blocks. Your start blocks will look differently. My starts are 63 and 208845. The sector size if 512. So do 63*512 and 208845*512. That will give you the offset numbers to use in loset. For my setup I do the following. Now lets unmount and cleanup. |