[Fedora-xen] Createing/working with disk images

Lamont Peterson lamont at gurulabs.com
Tue Mar 27 23:24:42 UTC 2007


On Tuesday 27 March 2007 03:42pm, Karel Zak wrote:
[snip]
> > How can I access partitions inside a disk image as block devices?  Should
> > I be using something other than losetup here?
>
>  man losetup
>  man mount
>
>  ... option "offset"

Yeah, the moment I sent the original post, I realized I could try using 
offsets with losetup.  Unfortunately, it's not quite working.

I think the problem is that the -s switch won't work with the RHEL5 or FC6 
loopback drivers and without it, running:

# losetup -o512 /dev/loop1 /some/image/file

... is creating /dev/loop1 to span from the beginning of partition 1 to the 
end of the image file, which includes the space for partitions 2 and up.  
The -s switch needs to be used here to make this loopback device the right 
size.

The note, "This option may not be supported on some older kernels and/or loop 
drivers," appears in the losetup(8) man page with the -s information.  I 
don't think these would be considered "older kernels" but the losetup command 
is not able to work when I try to use -s.

>  or you can try lomount (from the Xen package) that supports
>  partitions more friendly. For more information (especially when you
>  want to use LVM), see:

That's good to know about.  Of course, that will only work once there is a 
filesystem on the partition inside the image file.  I still have the problem 
of being able to run mke2fs and format *just* the partition within the image.

> 
> http://fedoraproject.org/wiki/FedoraXenQuickstartFC6?highlight=%28Xen%29#he
>ad-9c5408e750e8184aece3efe822be0ef6dd1871cd

Thanks.
-- 
Lamont Peterson <lamont at gurulabs.com>
Senior Instructor
Guru Labs, L.C. [ http://www.GuruLabs.com/ ]

NOTE:  All messages from this email address should be digitally signed with my
       0xDC0DD409 GPG key. It is available on the pgp.mit.edu keyserver as
       well as other keyservers that sync with MIT's.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-xen/attachments/20070327/19b47736/attachment.sig>


More information about the Fedora-xen mailing list