add new bootloader xenpvnetboot for pv guest
PATCH 1/1 add new bootloader xenpvnetboot for pv guest
tools/misc/Makefile | 2 +- tools/misc/xenpvnetboot | 293 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 294 insertions(+), 1 deletions(-)
# HG changeset patch
# User Zhigang Wang <[email protected]> # Date 1329919344 18000
# Node ID 6770476b814532bb36a3b00cba16e5cd8a6b4585 # Parent ca80eca9cfa39d1b60d1216948dac5711d550b83 add new bootloader xenpvnetboot for pv guest
xenpvnetboot supports getting boot images from following locations:
- http://host/path
- https://host/path
- ftp://host/path
- file:///path
- tftp://host/path
- nfs:host:/path
- /path
- /path/file.iso
- /path/filesystem.img
- /dev/sda1
- nfs+iso:host:/path/file.iso
- nfs+iso:host:/path/filesystem.img
To use it, make xenpvnetboot as bootloader for PV guest::
bootloader = '/usr/bin/xenpvnetboot'
To get boot images from various locations, set the right bootloader arguments, e.g.::
bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64'] bootloarder_args = ['--location=ftp://192.168.0.1/fedora/x86_64'] bootloarder_args = ['--location=file:///fedora/x86_64'] bootloarder_args = ['--location=tftp://192.168.0.1/fedora/x86_64'] bootloarder_args = ['--location=/fedora/x86_64'] bootloarder_args = ['--location=/fedora/Fedora-16-x86_64-DVD.iso'] bootloarder_args = ['--location=nfs:192.168.0.1:/fedora/x86_64'] bootloarder_args = ['--location=nfs+iso:192.168.0.1:/fedora/Fedora-16-x86_64-DVD.iso']
You can use kernel and ramdisk to specify the relative path of boot kernel and ramdisk. xenpvnetboot will join them with the location to find the boot kernel and ramdisk, e.g.::
kernel = 'images/pxeboot/vmlinuz'
ramdisk = 'images/pxeboot/initrd.img'
bootloarder_args = ['--location=http://192.168.0.1/fedora/x86_64']
kernel = 'fedora/x86_64/images/pxeboot/vmlinuz'
ramdisk = 'fedora/x86_64/images/pxeboot/initrd.img'
bootloarder_args = ['--location=http://192.168.0.1/']You can also omit the --location option and specify the full URL for kernel and ramdisk directly, e.g.:
kernel = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/vmlinuz' ramdisk = 'http://192.168.0.1/fedora/x86_64/images/pxeboot/initrd.img'
If only --location is specified and kernel and ramdisk are not specified, xenpvnetboot will search the following places for boot images from the location::
('images/xen/vmlinuz', 'images/xen/initrd.img'), # Fedora <= 10 and OL = 5
('boot/i386/vmlinuz-xen', 'boot/i386/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
('boot/x86_64/vmlinuz-xen', 'boot/x86_64/initrd-xen'), # openSUSE >= 10.2 and SLES >= 10
('current/images/netboot/xen/vmlinuz', 'current/images/netboot/xen/initrd.gz'), # Debian
('images/pxeboot/vmlinuz', 'images/pxeboot/initrd.img'), # Fedora >=10 and OL >= 6
('isolinux/vmlinuz', 'isolinux/initrd.img'), # Fedora >= 10 and OL >= 6xenpvnetboot requires python module urlgrabber <http://urlgrabber.baseurl.org/>.
tools/misc/Makefile +1 -1
@@ -17,7 +17,7 @@ SUBDIRS-$(CONFIG_LOMOUNT) += lomount SUBDIRS-$(CONFIG_MINITERM) += miniterm SUBDIRS := $(SUBDIRS-y) -INSTALL_BIN-y := xencons +INSTALL_BIN-y := xencons xenpvnetboot INSTALL_BIN-$(CONFIG_X86) += xen-detect INSTALL_BIN := $(INSTALL_BIN-y)
tools/misc/xenpvnetboot new file +293 -0
293 lines not on this page · raw message
Quoted 5 lines · Zhigang Wang
tools/misc/Makefile| 2 +-tools/misc/xenpvnetboot | 293 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 294 insertions(+), 1 deletions(-)
Quoted 8 lines
# HG changeset patch
# User Zhigang Wang <[email protected]> # Date 1329919344 18000
# Node ID6770476b814532bb36a3b00cba16e5cd8a6b4585# Parentca80eca9cfa39d1b60d1216948dac5711d550b83add new bootloader xenpvnetboot for pv guest
xenpvnetbootsupports getting boot images from following locations:
I think this is a really nice idea -- it's been floating around the bottom of my TODO list for ages now.
Would it be possible to add a man page by adding docs/man/xenpvnetboot.1.pod using the Perl POD syntax (there's a bunch of existing docs you could take inspiration from) and perhaps to update docs/man/xl.cfg.5.pod to reference this new bootloader (you might need to add a list of possible options, since pyrub was previously the only thing)
Since you have, I guess, reverse engineered the PV bootloader protocol from pygrub in order to implement this I wonder if you would consider writing up a specification for the required interface or such bootloaders? e.g. docs/misc/pvbootloader.markdown.
By happy coincidence there is a Xen documentation day on Monday ;-)
http://lists.xen.org/archives/html/xen-devel/2012-02/msg01468.html and
http://wiki.xen.org/wiki/Xen_Document_Days
http://blog.xen.org/index.php/2012/02/24/next-xen-document-day-feb-27/
Do you have any further plans for this bootloader? e.g. I think it would be really cool if it could present a curses based wizard, e.g.
* Select your distro
* Provide a URL
* Tweak command line options
* Go!
Ian.
Re: [PATCH] add new bootloader xenpvnetboot for pv guest [and 1 more messages]
In reply to Zhigang WangZhigang Wang writes ("[Xen-devel] [PATCH] add new bootloader xenpvnetboot for pv guest"):
Quoted 1 line
add new bootloader xenpvnetboot for pv guest
Great, thanks. I agree with Ian's comments but this is a clear improvement so I have applied it. But, improving the documentation is something we should definitely do.
Quoted 4 lines · Ian
Since you have, I guess, reverse engineered the PV bootloader protocol
Quoted 1 line
from pygrub in order to implement this I wonder if you would consider
writing up a specification for the required interface or such bootloaders? e.g. docs/misc/pvbootloader.markdown.
That is also an excellent suggestion.
Ian.
Re: [PATCH] add new bootloader xenpvnetboot for pv guest [and 1 more messages]
Quoted 8 lines · Ian Jackson
Zhigang Wang writes ("[Xen-devel] [PATCH] add new bootloader xenpvnetboot for pv guest"):
Quoted 1 line
add new bootloader xenpvnetboot for pv guest
Great, thanks. I agree with Ian's comments but this is a clear improvement so I have applied it. But, improving the documentation is something we should definitely do.
Ian writes:
Quoted 8 lines
Quoted 4 lines
Since you have, I guess, reverse engineered the PV bootloader protocol
Quoted 1 line
from pygrub in order to implement this I wonder if you would consider
writing up a specification for the required interface or such bootloaders? e.g. docs/misc/pvbootloader.markdown.
That is also an excellent suggestion.
Ian.
Thanks Ian C and Ian J.
Sorry I missed Ian C's mail a few days ago.
I add what you suggested to my TODO list.
Another thing you may help about this is: PV guest diskless boot using this boot loader. Current for PV guest, we require at least one disk. I will work on it and probably ask for help later.
Thanks,
Zhigang
Re: [PATCH] add new bootloader xenpvnetboot for pv guest [and 1 more messages]
Quoted 2 lines · Zhigang Wang
Another thing you may help about this is: PV guest diskless boot using this boot loader. Current for PV guest, we require at least one disk.
You mean the toolstack errors out if you don't configure a disk? I think that's just a bug, or perhaps a misfeature.
Ian.
Re: [PATCH] add new bootloader xenpvnetboot for pv guest [and 1 more messages]
Quoted 5 lines · Ian Campbell
Quoted 2 lines · Zhigang Wang
Another thing you may help about this is: PV guest diskless boot using this boot loader. Current for PV guest, we require at least one disk.
You mean the toolstack errors out if you don't configure a disk? I think that's just a bug, or perhaps a misfeature.
Yes. I mean that. Then let's fix that.
Zhigang
Quoted 8 lines
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH] add new bootloader xenpvnetboot for pv guest [and 1 more messages]
In reply to Zhigang WangZhigang Wang writes ("Re: [Xen-devel] [PATCH] add new bootloader xenpvnetboot for pv guest [and 1 more messages]"):
Quoted 1 line
I add what you suggested to my TODO list.
Thanks.
Quoted 3 lines
Another thing you may help about this is: PV guest diskless boot using this boot loader. Current for PV guest, we require at least one disk. I will work on it and probably ask for help later.
Great. Let us know if you have questions.
Ian.