Multi boot Ubuntu/XenServer

Asked by enderwiggins

Hi,

I am not sure this is the right place to get help for my problem...

I try to install a system with a multi boot Ubuntu/Windows seven/Xen server 5.5
I know Citrix says the multi boot is not supported by Xen Server but I feel it could work since XenServer is based on Linux.

The server I am using has an AMD Phenom II x4 CPU and 2 sata disks. This is how I proceded:
- installed Windows 7 on the first disk.
- unplug this disk since Xen server has the bad habit to destroy data of all the disks in the system...
- installed Xen server 5.5 on the second disk.
- plug the first HDD and installed Ubuntu 9.04 on the Windows disk in a new partition.

Now, when I boot on the second disk (the one with Xen), I can choose to boot Ubuntu, Seven and Xen.
The first two choices work fine but when I choose XenServer, I get the following error:
Error 13: Invalid or unsupported executable format.

This the result of a fdisk -l command on Ubuntu (sda is the XenServer disk):

sudo fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xafcc001f

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 499 4008186 83 Linux
/dev/sda2 500 998 4008217+ 83 Linux
/dev/sda3 999 38913 304552237+ 83 Linux

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe46c84e2

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2 13 38588 309848408 7 HPFS/NTFS
/dev/sdb3 38589 38913 2610562+ 5 Extended
/dev/sdb5 38589 38891 2433816 83 Linux
/dev/sdb6 38892 38913 176683+ 82 Linux swap / Solaris

And this is the content of the menu.lst file:

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 8dfe6bb4-8b1d-456f-ab46-650f84994c84
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=8dfe6bb4-8b1d-456f-ab46-650f84994c84 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid 8dfe6bb4-8b1d-456f-ab46-650f84994c84
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=8dfe6bb4-8b1d-456f-ab46-650f84994c84 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid 8dfe6bb4-8b1d-456f-ab46-650f84994c84
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title XenServer release 5.5.0-25727p (xenenterprise) (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024kdump root=/dev/sda1
savedefault
boot

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title XenServer release 5.5.0-25727p (xenenterprise) (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen root=/dev/sda1
savedefault
boot

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title Windows Vista (loader)
rootnoverify (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

The single reference to a similar problem I found is this one: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/147014

Can someone tell me if I have a chance of getting rid of this problem ?
Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
enderwiggins
Solved:
Last query:
Last reply:
Revision history for this message
Tom (tom6) said :
#1

Hi :)

I can't immediately see any noticeable problems with your menu.lst and it seems to be pointing at the right partition. Please could you also post this question at

http://www.linuxquestions.org

This would seem to be a problem with XenServer rather than with Ubuntu. Do they have user forums? If so i would definitely post the question in there also. Hopefully someone in linuxquestions will know tho! Posting the same question to a few different forums is quite valid, especially if you kindly post a link to the right answer in all the threads that weren't able to find the answer. It helps spread the knowledge around :)

Are you able to navigate to sda1 from inside Ubuntu? If so then it might be good to see what is in their "boot" folder, specifically to check there is a file called
vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen
and also various other files with the same kernel number. So if you could copy&paste the "dir" or "ls" of that folder into here it might show us something. Also, if you can, try to see their own "menu.lst" in boot/grub. Perhaps their entry could be copied into the Ubuntu's grub? Please back-up Ubuntu's grub first tho!

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.100510

Good luck and regards from
Tom :)

Revision history for this message
enderwiggins (jcmarie) said :
#2

Thank you Tom,

I did not yet post the question to Citrix XenServer forum. I am afraid the answer will be: unsupported feature...
But I will give it a try.

I did not find any menu.lst file on the Xen partition. the /boot/grub does not even exists.

This is the content of the boot folder:
root@jcm-desktop:/mnt/boot# ls -l
total 12504
-rw-r--r-- 2 root root 3848 2010-01-12 20:13 chain.c32
-rw-r--r-- 1 root root 52009 2009-11-16 15:13 config-2.6.18-128.1.6.el5.xs5.5.0.505.1024kdump
-rw-r--r-- 1 root root 52702 2009-11-16 15:13 config-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen
-rw-r--r-- 1 root root 1679 2010-05-07 21:31 extlinux.conf
-r--r--r-- 1 root root 10849 2010-05-07 21:31 extlinux.sys
-rw------- 1 root root 3090431 2010-05-07 21:31 initrd-2.6.18-128.1.6.el5.xs5.5.0.505.1024kdump.img
-rw------- 1 root root 3091955 2010-05-07 21:31 initrd-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen.img
lrwxrwxrwx 1 root root 49 2010-05-07 21:31 initrd-2.6-xen.img -> initrd-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen.img
-rw-r--r-- 2 root root 47404 2010-01-12 20:13 mboot.c32
-rw-r--r-- 2 root root 37196 2010-01-12 20:13 menu.c32
-rw-r--r-- 1 root root 755681 2009-11-16 15:13 System.map-2.6.18-128.1.6.el5.xs5.5.0.505.1024kdump
-rw-r--r-- 1 root root 811036 2009-11-16 15:13 System.map-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen
-rw-r--r-- 1 root root 1907138 2009-11-16 15:13 vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024kdump
-rw-r--r-- 1 root root 2244786 2009-11-16 15:13 vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen
lrwxrwxrwx 1 root root 46 2010-05-07 21:31 vmlinuz-2.6-xen -> vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen
lrwxrwxrwx 1 root root 48 2010-05-07 21:31 vmlinuz-kdump -> vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024kdump
-rw-r--r-- 1 root root 473012 2009-10-13 20:57 xen-3.3.1.gz
-rw-r--r-- 1 root root 154385 2009-10-13 20:57 xen-3.3.1.map
lrwxrwxrwx 1 root root 12 2010-05-07 21:31 xen-3.3.gz -> xen-3.3.1.gz
lrwxrwxrwx 1 root root 12 2010-05-07 21:31 xen-3.gz -> xen-3.3.1.gz
lrwxrwxrwx 1 root root 12 2010-05-07 21:31 xen.gz -> xen-3.3.1.gz

As you can see, the vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen file exists.

The /boot/extlinux.conf as a content very similar to a menu.lst file. This is its content:

root@jcm-desktop:/mnt/boot# cat extlinux.conf
serial 0 115200
default xe
prompt 1
timeout 50

label xe
  # XenServer
  kernel mboot.c32
  append /boot/xen.gz dom0_mem=752M lowmem_emergency_pool=16M crashkernel=64M@32M console=/dev/null vga=mode-0x0311 --- /boot/vmlinuz-2.6-xen root=LABEL=root-onatlipy ro quiet vga=785 splash --- /boot/initrd-2.6-xen.img

label xe-serial
  # XenServer (Serial)
  kernel mboot.c32
  append /boot/xen.gz com1=115200,8n1 console=com1,tty dom0_mem=752M lowmem_emergency_pool=16M crashkernel=64M@32M --- /boot/vmlinuz-2.6-xen root=LABEL=root-onatlipy ro console=tty0 console=ttyS0,115200n8 --- /boot/initrd-2.6-xen.img

label safe
  # XenServer in Safe Mode
  kernel mboot.c32
  append /boot/xen.gz nosmp noreboot noirqbalance acpi=off noapic dom0_mem=752M com1=115200,8n1 console=com1,tty --- /boot/vmlinuz-2.6-xen nousb root=LABEL=root-onatlipy ro console=tty0 console=ttyS0,115200n8 --- /boot/initrd-2.6-xen.img

label fallback
  # XenServer (Xen 3.3.1 / Linux 2.6.18-128.1.6.el5.xs5.5.0.505.1024xen)
  kernel mboot.c32
  append /boot/xen-3.3.1.gz dom0_mem=752M lowmem_emergency_pool=16M crashkernel=64M@32M --- /boot/vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen root=LABEL=root-onatlipy ro console=tty0 --- /boot/initrd-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen.img

label fallback-serial
  # XenServer (Serial, Xen 3.3.1 / Linux 2.6.18-128.1.6.el5.xs5.5.0.505.1024xen)
  kernel mboot.c32
  append /boot/xen-3.3.1.gz com1=115200,8n1 console=com1,tty dom0_mem=752M lowmem_emergency_pool=16M crashkernel=64M@32M --- /boot/vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen root=LABEL=root-onatlipy ro console=tty0 console=ttyS0,115200n8 --- /boot/initrd-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen.img

I will try to add the several entries of this file in the Ubuntu /boot/grub/menu.lst (I will first make a back up ;)) and let you know what happens.
Is "append" a regular command for a menu.lst file ? As you could guess, I am not really at ease with those boot stuff...and with English...

Anyway thanks for your time.

Christophe.

Revision history for this message
Tom (tom6) said :
#3

Hi :)

I hadn't thought of checking the permissions of the files using "-l". I don't qquite understand permissions fully just yet anyway and this output doesn't mean anything special to me. I did notice the line

-rw-r--r-- 1 root root 2244786 2009-11-16 15:13 vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen

which was specifically called in Ubuntu's menu.lst

title XenServer release 5.5.0-25727p (xenenterprise) (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen root=/dev/sda1
savedefault
boot

I have not ever seen "append" in a menu.lst before but there is always a first time & there is a lot about grub1 that i never got around to finding out about. I would stick with grub1 for this tho and not even attempt to start messing around with the new grub2! I think most of us understand grub1 far better than grub2 at this point! Since the Xen boot system is quite a bit different from Ubuntu's and from other gnu&linux distros that i have looked at i find myself woondering about adding the line "chainloader +1" to the end of the Xen stanza? making it look like this

title XenServer release 5.5.0-25727p (xenenterprise) (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-128.1.6.el5.xs5.5.0.505.1024xen root=/dev/sda1
savedefault
boot
chainloader +1

As far as i understand it that pushes the boot process into a standard Xen bootup using their boot-loader? Another command i have not noticed in the menu.lst before is "boot". I think it's time to find a grub manual!

Sorry i have not been hugely helpful here!
Good luck and regards from
Tom :)

Revision history for this message
enderwiggins (jcmarie) said :
#4

Tom,

I tried to use the chainloader command. I had this entry in teh menu.lst file:
title Xen Server
rootnoverify (hd1,0)
savedefault
makeactive
chainloader +1

but it did not work. I got this error:
Starting up...
Boot error.

But I found this blog entry: http://dougbunger.blogspot.com/2009/08/dual-boot-citrix-xenserver-5.html
which resolved my problem.
I added the following entry in the menu.lst file and now, everything works fine.);

title Xen server
root (hd1,0)
kernel /boot/xen-3.3.1.gz
module /boot/vmlinuz-2.6-xen ro root=/dev/sdb1
module /boot/initrd-2.6-xen.img

I do not really understand how it works but it works.
Thanks.

Christophe.