Making use of pygrub in lenny domU and hardy dom0
If you want to make use of a Debian Lenny as a domU in a Ubuntu Hardy dom0 you can either install the dom0 kernel and modules in the domU or you can use pygrub.
To make use of pygrub there are a few simple steps you need to perform:
- Adjusting the domU config file, an example:
# # Kernel + memory size # #kernel = '/boot/vmlinuz-2.6.24-21-xen' <-- must be commented #ramdisk = '/boot/initrd.img-2.6.24-21-xen' <-- must be commented bootloader = '/usr/bin/pygrub' <-- must be for use of pygrub memory = '256' # # Disk device(s). # root = '/dev/sda2 ro' disk = [ 'phy:/dev/server/jupiter-disk,sda2,w', <-- must be the first line is the root partition 'phy:/dev/server/jupiter-swap,sda1,w', 'phy:/dev/server/www,sda3,w', ] # # Hostname # name = 'jupiter' # # Networking # vif = [ 'ip=192.168.1.6,mac=00:16:3E:79:6B:D6' ] # # Behaviour # on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart'
- Installing needed packages in domU
- If the domU is running
apt-get install linux-image-2.6-xen-686
apt-get install grub
grub-install /dev/XXX <-- the hdd you defined as root partition (not nessesarry)
-
- If it’s not running
mkdir /mnt/temp
mount /dev/XXX /mnt/temp
mount -t proc none /mnt/temp/proc
chroot /mnt/temp
apt-get install linux-image-2.6-xen-686
apt-get install grub
grub-install /dev/XXX <– the hdd you defined as root partition (not nessesarry)
- Finaly putting this in the config: /boot/grub/grub.conf
title Debian 2.6.26
kernel /boot/vmlinuz-2.6.26-1-xen-686 ro root=/dev/sda2 console=hvc0 xencons=tty
initrd /boot/initrd.img-2.6.26-1-xen-686