1879
Comment: Formatting, InterWiki links, comments, additions and comments regarding Squeeze and architecture, full stops.
|
1868
remove unneeded empty lines
|
Deletions are marked like this. | Additions are marked like this. |
Line 16: | Line 16: |
Line 21: | Line 20: |
Line 32: | Line 30: |
Line 47: | Line 44: |
Using pyGRUB to boot a domU kernel
Using pyGRUB from xen-utils-3.2-1 in Lenny or xen-utils-4.0 in Squeeze, 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.
On the domU
Install the Xen kernel (for AMD64 linux-image-2.6-xen-amd64) and GRUB Legacy or GRUB 2.
aptitude install linux-image-2.6-xen-amd64 grub # for AMD64 and with GRUB Legacy
Create the environment needed for running update-grub.
mkdir /boot/grub echo "(hd0) /dev/sda" > /boot/grub/device.map # edit this line to match your setup mknod /dev/sda b 202 0 # Should not be needed.
Create first /boot/grub/menu.lst based on the content of /boot/.
update-grub
Check the default GRUB root matches the partition where /boot/grub/ lives. If /boot/grub/ is on /dev/sda2, you need to have # groot=(hd0,1) in your /boot/grub/menu.lst.
After editing this file, you need to re-run update-grub to propagate the changes.
sed -i -e 's/^# groot=(hd0)/# groot=(hd0,1)/' \ /boot/grub/menu.lst update-grub
On the dom0
Replace the kernel and ramdisk parameters in the domU config file with the following line.
bootloader = '/usr/lib/xen-3.2-1/bin/pygrub'
If you get Error: Boot loader didn't return any data! you need to have the system partition as the first partition comming in your domU.cfg something akin to the following.
disk = [ 'phy:/dev/vg02/sandbox.openforce.com-disk,sda2,w', 'phy:/dev/vg02/sandbox.openforce.com-swap,sda1,w', ]