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/
Home Products Support Community News


Re: [Xen-users] How to create a domU on RedHat Enterprise AS 4.4?

On Sun, 10 Sep 2006, Luke Crawford wrote:

> if you are  using the partition-within-the-domU method that makes it difficult
> to mount it outside,  make the problem domU the second disk in a good domU...
> you can boot the good domU and the mount the second disk and mess with it.

The hvm install docs also covers this well.... there's a -o
offset parameter you can use for losetup... which will let you mount the 
partition from dom0

that's appendix a.3

   Make the file system and install grub
   # ln -s /dev/loop0 /dev/loop
   # losetup /dev/loop0 hd.img
   # losetup -o 16384 /dev/loop1 hd.img
   # mkfs.ext3 /dev/loop1
   # mount /dev/loop1 /mnt
   # mkdir -p /mnt/boot/grub
   # cp /boot/grub/stage* /boot/grub/e2fs_stage1_5 /mnt/boot/grub
   # umount /mnt
   # grub
   grub> device (hd0) /dev/loop
   grub> root (hd0,0)
   grub> setup (hd0)
   grub> quit
   # rm /dev/loop
   # losetup -d /dev/loop0
   # losetup -d /dev/loop1

   The losetup option -o 16384 skips the partition table in the image file. 
   It is the number of sectors times 512. We need /dev/loop because grub is 
   expecting a disk device name, where name represents the entire disk and 
   name1 represents the first partition. 

Xen-users mailing list