4
2
I am booting a new Xen kernel and it all goes fine up until some point during the boot process when the machine reboots without warning. Unfortunately, I don't see errors flash up just before that happens.
Is there a way of booting the machine with a working kernel and looking at a log of the previous boot or something?
EDIT: What I didn't notice is that there is actually an error on the screen. It just flashes up very quickly before the reboot. The error is related to not being able to mount the root filesystem because there is something wrong with my grub configuration.
A normal entry in grub.cfg looks like this:
menuentry 'Ubuntu, with Linux 2.6.32-33-server' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 75475e50-82e2-4f74-b860-6cf92c91b42e
linux /vmlinuz-2.6.32-33-server root=/dev/mapper/xenserver-root ro crashkernel=384M-2G:64M,2G-:128M
initrd /initrd.img-2.6.32-33-server
}
I added the following in /etc/grub.d/40_default
menuentry 'Xen 4 with Linux 2.6.32.45-xen' --class ubuntu --class gnu-linux --class gnu --class os --class xen {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set=root 75475e50-82e2-4f74-b860-6cf92c91b42e
echo 'Loading Xen 4 ...'
multiboot /xen.gz placeholder
echo 'Loading Linux 2.6.32.45-xen ...'
module /vmlinuz-2.6.32.45-xen placeholder root=/dev/mapper/xenserver-root ro iommu=1
echo 'Loading initial ramdisk ...'
module /initrd.img-2.6.32.45-xen
}
But it's not working for some reason. Any ideas?
EDIT: I also tried the 20_linux_xen script. Unfortunately that's not working. See these errors:
Found linux image: /boot/vmlinuz-2.6.32.45-xen
Found initrd image: /boot/initrd.img-2.6.32.45-xen
Found linux image: /boot/vmlinuz-2.6.32-33-server
Found initrd image: /boot/initrd.img-2.6.32-33-server
/etc/grub.d/20_linux_xen: 57: uses_abstraction: not found
Found linux image: /boot/vmlinuz-2.6.32.45-xen
Found initrd image: /boot/initrd.img-2.6.32.45-xen
/etc/grub.d/20_linux_xen: 156: gettext_printf: not found
gettext is installed.
I'm on ubuntu 10.04 LTS.
The error flashed up on boot is something like "please insert a correct root=boot kernel option..."
Why is this so hard and why are there so many different examples of grub2 xen? some put /boot in front some just /. I tried putting /boot in front but that didn't help. Also some have --set=root uuid and yet all my other working entries just have --set uuid. is this something to do with a different grub2 version?
One cause of this symptom that I've encountered is running 64-bit Xen on 32-bit hardware. – Randolf Richardson – 2011-08-24T22:43:39.743
Actually it turns out it's to do with the grub2 config. This is fully 64bit hardware – Matt H – 2011-08-24T23:05:01.800
Does that mean you found a solution? If so, please do post it as an answer (so that others can benefit) and I'll upvote it. =) – Randolf Richardson – 2011-08-24T23:07:14.917
No, I still can't get it to boot. – Matt H – 2011-08-24T23:08:31.387
When I install Xen on NetBSD, I do have the option of just booting my host OS without Xen (NetBSD 5 can natively boot into Xen without GRUB or GRUB2). Is GRUB2 not providing any other boot options? What parameters are you booting Xen with? – Randolf Richardson – 2011-08-24T23:11:44.253
Perhaps an even better question on serverfault.com – Prof. Falken contract breached – 2012-09-21T16:50:14.343