Differences between revisions 28 and 29
Revision 28 as of 2013-02-21 13:50:12
Size: 2079
Comment: Make menu.lst more kernel-version independant
Revision 29 as of 2013-05-13 09:58:36
Size: 2082
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Using pyGRUB on Squeeze to boot a domU kernel = = Using pyGRUB on Wheezy to boot a domU kernel =
Line 3: Line 3:
The domU FileSystem needs to be ext3. The domU FileSystem needs to be ext[234].

Using pyGRUB on Wheezy to boot a domU kernel

Using pyGRUB from xen-utils-4.0, each domU can boot with its own kernel instead of using the dom0 kernel, which makes life easier for updates and multi distribution Xen installs. You need to have first a working domU. The domU FileSystem needs to be ext[234].

On the dom0

  • You need to have your disk entries configured with the xvd xen driver, full block devices (ie not xvda1/2/3) to make grub in domU happy, and to have the system partition as the first partition listed in your domU.cfg disklist.

Config snippet:

root        = '/dev/xvda2 ro'
disk        = [
                  'phy:/dev/vg05/test2.openforce.com-disk,xvda2,w',
                  'phy:/dev/vg05/test2.openforce.com-swap,xvda1,w',
              ]

On the domU

mkdir /boot/grub
apt-get install linux-image-2.6-xen-amd64

You don't need to install grub, you need to create a simple grub file which will be read by pygrub on the Dom0.

  • Create first /boot/grub/menu.lst based on the content of /boot/.

cat > /boot/grub/menu.lst << EOF

default         0
timeout         2

title           Debian GNU/Linux
root            (hd0,0)
kernel          /vmlinuz root=/dev/xvda2 ro
initrd          /initrd.img

title           Debian GNU/Linux (recovery mode)
root            (hd0,0)
kernel          /vmlinuz root=/dev/xvda2 ro single
initrd          /initrd.img

EOF

On the dom0

  • Check that grub was properly installed on the domU with

/usr/lib/xen-default/bin/pygrub /dev/vg02/my_domU-disk

which should great with the familiar grub menu, and then abort

  • Replace the kernel and ramdisk parameters in the domU config file with the following line.

bootloader      = '/usr/lib/xen-default/bin/pygrub'