# create raw image file (64 * (512 * 63 * 16 = 516096) = ~32MBytes)
# adjust the size to your tastes
dd if=/dev/zero of=image.bin count=64 bs=516096c
# create partition (-C64 means 64 cylinders, the size we decided upon in the previous step)
fdisk -cu -C64 -S63 -H16 image.bin
n (new partition)
p (primary partition)
1 (partition #1)
63 as start sector
default as last sector
a (toggle bootable)
1 (partition #1)
p (confirm it shows as bootable and that the start sector is 63)
w (write changes)
# mount image for formatting (32256 = 63 * 512)
sudo losetup -o32256 /dev/loop0 image.bin
# format
sudo mkfs.ext3 -b1024 /dev/loop0
# mount filesystem
sudo mount /dev/loop0 /mnt
# create directories
sudo mkdir -p /mnt/boot
sudo mkdir -p /mnt/tce
OR
sudo mkdir -p /mnt/boot
sudo mkdir -p /mnt/tce
# copy files
sudo cp ~/microcore.gz /mnt/boot/
sudo cp ~/linux-2.6.33.3/arch/x86/boot/bzImage /mnt/boot/
# unmount
sudo umount /mnt
sudo losetup -d /dev/loop0
# create XVA
# this requires python and xva.py; the latter is available here:
#
http://www.xen.org/files/xva/xva.pypython xva.py -n my_test_image --is-pv --disk image.bin --filename=output.xva