Xen vs. GRUB
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
[Cced to <[email protected]>.]
Hello!
This is about porting GRUB to Xen to allow booting a GNU/Hurd system as a Xen domU.
GNU/Hurd systems use GNU Mach as a microkernel and have a GRUB configuration like the following one, which is currently not translatable to a Xen configuration:
#v+
title Debian GNU/Hurd
kernel (hd0,5)/boot/gnumach.gz \
root=device:hd0s6
module (hd0,5)/hurd/ext2fs.static \
--multiboot-command-line=${kernel-command-line} \
--host-priv-port=${host-port} \
--device-master-port=${device-port} \
--exec-server-task=${exec-task} \
-T typed ${root} $(task-create) $(task-resume)
module (hd0,5)/lib/ld.so.1 \
/hurd/exec \
$(exec-task=task-create)
#v-
Quoted 7 lines · Samuel Thibault
Thomas Schwinge, le Tue 02 Jan 2007 12:10:49 +0100, a ?crit :
Quoted 6 lines · Samuel Thibault
Quoted 1 line
A crude first ugly patch.
I wondered how you got the thing to boot, wondered if you had also ported GRUB to Xen along the way, but then I saw the patch for `kern/bootstrap.c'. :-)
[Samuel there hard-coded the above quoted ``module [...]'' lines.]
Quoted 5 lines
;)
Yes, the problem is that Xen is a bit Linux-oriented, and as such the parameter is called "ramdisk", can ship only one file, and doesn't have a command line separate from the kernel's...
Is there a consensus that GRUB (or rather GRUB2) should be ported to allow them to run in a Xen environment?
Regards,
Thomas
Hi,
Quoted 2 lines · Thomas Schwinge, le Wed 03 Jan 2007 13:09:25 +0100, a écrit :
Is there a consensus that GRUB (or rather GRUB2) should be ported to allow them to run in a Xen environment?
I'm not sure grub on Xen would be so useful, since people usually choose their operating system and parameters directly from Xen configuration files. And I actually already contacted Xen people, and they agree that adding a multiboot-like module abstraction to Xen won't be hard and would be useful.
Well... Why not.
Samuel
Quoted 8 lines · Samuel Thibault
Quoted 4 lines · Thomas Schwinge, le Wed 03 Jan 2007 13:09:25 +0100, a écrit :
Is there a consensus that GRUB (or rather GRUB2) should be ported to allow them to run in a Xen environment?
Quoted 7 lines
I'm not sure grub on Xen would be so useful, since people usually choose their operating system and parameters directly from Xen configuration files. And I actually already contacted Xen people, and they agree that adding a multiboot-like module abstraction to Xen won't be hard and would be useful.
Xen PV domUs can boot from "pygrub". This is the method used by JailTime and rPath to encapsulate kernels and initrd inside the disk images.
So there is already such a "port". Just specify a bootloader in your xen config:
bootloader="/usr/lib/xen/bin/pygrub"
and it's easy enough to override the config file with your own boot entry:
bootentry="hda1:/boot/vmlinuz-xen,/boot/initrd-xen"
Which does seem a bit silly when you can specify the same thing with root=, ramdisk=, and anything else with extra=. Alternatively, there are libvirt and xen-tools and other xen config abstrations outside of xm.
Xen HVM domUs, on the other hand, bootstrap whatever MBR is installed on the virtual disk. No changes needed here at all.
The next step is HVM with paravirt_ops/VMI, which might actually show up some day for Xen (not there yet). Guests would still run in an HVM jail but are aware of the hypervisor and don't need to interact with the QEMU provided virtual hardware (think PV drivers).
Also, kvm has paravirt_ops now, as of a couple of days ago (thanks to Ingo). With l-hype and kvm, xen is quickly becoming moot anyway.
How does this affect grub and other bootstrapping? We very well might be talking about paravirt_ops/VMI and/or PV drivers at some point in addition to vanilla int13 real mode devices (though the virtual BIOSes will likely take care of this anyway).
- Ian C. Blenke <[email protected]>
Hi,
Quoted 11 lines · Ian C. Blenke, le Mon 08 Jan 2007 13:56:32 -0500, a écrit :
Xen PV domUs can boot from "pygrub". This is the method used by JailTime and rPath to encapsulate kernels and initrd inside the disk images.
So there is already such a "port". Just specify a bootloader in your xen config:
bootloader="/usr/lib/xen/bin/pygrub"
and it's easy enough to override the config file with your own boot entry:
bootentry="hda1:/boot/vmlinuz-xen,/boot/initrd-xen"
Mmm, how does the domU kernel get the store/console MFN/port and such info that is usually in the xen boot_info structure?
Samuel
Quoted 2 lines · Thomas Schwinge
Is there a consensus that GRUB (or rather GRUB2) should be ported to allow them to run in a Xen environment?
Sorry for my late response. Personally, I think it is a good idea to port GRUB 2 to Xen. Xen is just a firmware from GRUB's point of view, so it should not be very difficult to do.
In addition, I would like to see GRUB 2 ported to more platforms, such as LinuxBIOS as well as Xen.
Okuji
Quoted 7 lines · Yoshinori K. Okuji
Quoted 2 lines · Thomas Schwinge
Is there a consensus that GRUB (or rather GRUB2) should be ported to allow them to run in a Xen environment?
Sorry for my late response. Personally, I think it is a good idea to port GRUB 2 to Xen. Xen is just a firmware from GRUB's point of view, so it should not be very difficult to do.
Humm, you have to write a few device drivers...
What is the point in porting grub to xen ? Xen directly loads the kernel and Xen comes with pygrub (a grub clone in python) which allows the user to choose kernel and set parameters. (Although I have never tried it).
Tristan.