Skip to contentSkip to conversation

grub 2 and booting xen dom0

DISCUSSION Matthew 4 participants 7 messages Feb 18, 2008 – Feb 28, 2008

lore
Share & tools
lore

Matthew

author
#0 lore raw

Hi,

I'm trying to boot a xen-3.1.gz with grub2, but without any luck. The only message I get is:

Error: Invalid magic number

after specifying

	linux /boot/xen-3.0.gz dom0_mem=262144

Another question:
What should I use instead of the module command (from grub legacy).
The xen docs instruct to use:

title Xen 3.0 / XenLinux 2.6

	kernel /boot/xen-3.0.gz dom0_mem=262144
	module /boot/vmlinuz-2.6-xen0 root=/dev/sda4 ro console=tty0
	module /boot/my_initrd.gz

for specifying the xenLinux kernel and initrd. For kernel we have the linux command in grub2, but what (or how) to use insted of the module (of course, with the former meaning as in grub legacy).

Martin

#1 lore raw
Quoted 11 lines · Matthew

The xen docs instruct to use:

title Xen 3.0 / XenLinux 2.6

	kernel /boot/xen-3.0.gz dom0_mem=262144
	module /boot/vmlinuz-2.6-xen0 root=/dev/sda4 ro console=tty0
	module /boot/my_initrd.gz

for specifying the xenLinux kernel and initrd. For kernel we have the linux command in grub2, but what (or how) to use insted of the module (of course, with the former meaning as in grub legacy).

"kernel" is "multiboot" in GRUB 2, not "linux", but "module" is still "module". Also, you may want to try uncompressed images and modules.

Signature · 2 lines
Regards,
Pavel Roskin
#2 lore raw
Quoted 10 lines · Pavel Roskin
Quoted 8 lines · Matthew

The xen docs instruct to use:

title Xen 3.0 / XenLinux 2.6

	kernel /boot/xen-3.0.gz dom0_mem=262144
	module /boot/vmlinuz-2.6-xen0 root=/dev/sda4 ro console=tty0
	module /boot/my_initrd.gz
Quoted 5 lines
Quoted 3 lines

for specifying the xenLinux kernel and initrd. For kernel we have the linux command in grub2, but what (or how) to use insted of the module (of course, with the former meaning as in grub legacy).

"kernel" is "multiboot" in GRUB 2, not "linux",

Well, it can even be "linux"! Too bad "kernel" in GRUB Legacy meant so many things ;-)

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
author
#3 lore raw
In reply to Pavel Roskin
Quoted 3 lines · Pavel Roskin

"kernel" is "multiboot" in GRUB 2, not "linux", but "module" is still "module". Also, you may want to try uncompressed images and modules.

The multiboot hint was very usefull, thanks... But strange undeterministic things happen now... :(

snippet from my grub.cfg:

menuentry "xen" {
       multiboot /boot/xen-3.0.gz dom0_mem=512M
       module /boot/vmlinuz-2.6.22-14-xen root=/dev/mapper/mainVG-rootLV ro
       module /boot/initrd.img-2.6.22-14-xen
}

when I try to boot this directly, it says:
"error: you need to load multiboot kernel first"

When I type manually (go to the grub command line after bios boot)
multiboot /boot/xen-3.0.gz dom0_mem=512M
it loads the xen and complains about not having any xenlinux
kernel specified

When I type:
multiboot /boot/xen-3.0.gz dom0_mem=512M
module /boot/vmlinuz-2.6.22-14-xen
It starts booting, but complains about the root device (which is
obvious)

But when I type:
multiboot /boot/xen-3.0.gz dom0_mem=512M
module /boot/vmlinuz-2.6.22-14-xen root=/dev/mapper/mainVG-rootLV ro
It starts booting but sometimes the error message is same as
previous one (like there is no root option), sometimes there is wierd characters in root=....
It looks like grub is not passing the arguments after file in
module command correctly to the kernel. (But take it just as my guess)

Has anybody some hints what to do/try next?

Martin

#4 lore raw
Quoted 35 lines · Matthew
Quoted 3 lines · Pavel Roskin

"kernel" is "multiboot" in GRUB 2, not "linux", but "module" is still "module". Also, you may want to try uncompressed images and modules.

The multiboot hint was very usefull, thanks... But strange undeterministic things happen now... :(

snippet from my grub.cfg:

 menuentry "xen" {
        multiboot /boot/xen-3.0.gz dom0_mem=512M
        module /boot/vmlinuz-2.6.22-14-xen root=/dev/mapper/mainVG-rootLV ro
        module /boot/initrd.img-2.6.22-14-xen

}

when I try to boot this directly, it says:
"error: you need to load multiboot kernel first"

When I type manually (go to the grub command line after bios boot)
multiboot /boot/xen-3.0.gz dom0_mem=512M
it loads the xen and complains about not having any xenlinux
kernel specified

When I type:

    multiboot /boot/xen-3.0.gz dom0_mem=512M
    module /boot/vmlinuz-2.6.22-14-xen
       It starts booting, but complains about the root device (which is

obvious)

But when I type:

    multiboot /boot/xen-3.0.gz dom0_mem=512M
    module /boot/vmlinuz-2.6.22-14-xen root=/dev/mapper/mainVG-rootLV ro
       It starts booting but sometimes the error message is same as
Quoted 7 lines

previous one (like there is no root option), sometimes there is wierd characters in root=....
It looks like grub is not passing the arguments after file in
module command correctly to the kernel. (But take it just as my guess)

Has anybody some hints what to do/try next?

The old multiboot loader doesn't set the boot device, perhaps you can try my patch and see if it works:

Signature · 1 line
Bean
#5 lore raw
Quoted 3 lines · Bean

The old multiboot loader doesn't set the boot device, perhaps you can try my patch and see if it works:

You forgot to attach it.

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
#6 lore raw
Quoted 6 lines · Robert Millan
Quoted 3 lines · Bean

The old multiboot loader doesn't set the boot device, perhaps you can try my patch and see if it works:

You forgot to attach it.

It's in the thread "Handling command line option for core.img and g2ldr".

Signature · 1 line
Bean