WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Guest O/S Questions

To: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Guest O/S Questions
From: "Karsten M. Self" <karsten@xxxxxxxxxxxxx>
Date: Mon, 29 Aug 2005 15:37:11 -0700
Delivery-date: Mon, 29 Aug 2005 22:35:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <43138774.9040009@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <20050824T144313Z_87A6000D0001@xxxxxxxxx> <200508242237.08951.mark.williamson@xxxxxxxxxxxx> <430CED91.4050204@xxxxxxxxxx> <43138774.9040009@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)
Karsten M. Self wrote:

4. Find out the image file's partitioning.  fdisk's '-u' option gives
   output in sectors.  This helps in the next step.  Sample partition
   table:
       $ /sbin/fdisk -lu rhel4
       You must set cylinders.
       You can do this from the extra functions menu.

       Disk rhel4: 0 MB, 0 bytes
       255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
       Units = sectors of 1 * 512 = 512 bytes

        Device Boot      Start         End      Blocks   Id  System
       rhel4p1   *          63      208844      104391   83  Linux
rhel4p2 208845 401624 96390 82 Linux swap / Solaris
       rhel4p3          401625     4192964     1895670   83  Linux

   Ignore the cylinder messages (they matter if you're going to modify
   the partition table).

   The start sector times the blocksize (512 bytes) gives you the
   partition offset in bytes.  This is used if you want to loopback
   mount the filesystems to copy them someplace else, which you do.

   The first partition is /boot, the second is /.  I didn't use logical
   volumes, though it's possible to do so, complicating matters
   somewhat more.

...or as Ian pointed out off-list, you can use lomount (there's a related losetup command), included in Xen 3. I mentioned the hand-rolled method as lomount isn't generally available in most off-the-shelf distros. It also helps in understanding the concept of partitioned files.

Cheers.

--
Karsten M. Self <karsten@xxxxxxxxxxxxx>
XenSource, Inc.
2300 Geng Road #250                                +1 650.798.5900 x259
Palo Alto, CA 94303                                +1 650.493.1579 fax


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users