[CentOS-virt] Migrating from KVM to XEN - kernel panic

Mon Nov 9 20:54:11 UTC 2009
Christopher G. Stach II <cgs at ldsys.net>

----- "Christopher G. Stach II" <cgs at ldsys.net> wrote:

> 1. mkinitrd --with=xenblk --with=xennet --preload=xenblk
> --preload=xennet <img> <version>
> (yes, that's the original one without the fstab)
> 2. gunzip -c /boot/initrd-blah.img > /root/blah
> 3. mkdir /mnt/blah
> 4. mount -o loop /root/blah /mnt/blah
> 5. vi /mnt/blah/init
> <change occurrences of dom0 VG to guest VG>
> <change dom0 root device name to guest root device name>
> 6. umount /mnt/blah
> 7. gzip -c /root/blah > /boot/initrd-blah.img

If you followed these directions, you're probably scratching your head. I screwed up. The initrd is actually a cpio archive, so:

1. mkinitrd --with=xenblk --with=xennet --preload=xenblk --preload=xennet <img> <version>
(yes, that's the original one without the fstab)
2. mkdir /root/initrd-blah
3. cd /root/initrd-blah
4. gunzip -c /boot/initrd-blah.img | cpio -idmv
5. vi /root/initrd-blah/init
6. find . -print | cpio -o | gzip -c > /boot/initrd-blah.img

-- 
Christopher G. Stach II