[Libguestfs] GSoC project to deal with bootloaders

Richard W.M. Jones rjones at redhat.com
Sat Mar 16 19:53:15 UTC 2013


[Adding Ian McLeod]

On Sun, Mar 17, 2013 at 12:57:49AM +0530, Kashyap Chamarthy wrote:
> Hi Matt,
>
> I was discussing with Rich on #libguestfs about using the supermin
> appliance to 'package' all the 3 outputs (kernel, initrd, root) the
> fedora appliance [1] into a raw/qcow2 image.
>
> [1] http://git.annexia.org/?p=a-fedora-appliance.git;a=summary
>
> He then suggested, it's not easy,but do-able:
>
> - put the kernel and initrd onto the root disk, and then install a
>   bootloader;
>
> - and then installing 'syslinux' on disk images
> 
> And said it'd be a nice GSoC project to deal with bootloaders.
>
> If you have time to mentor, you might want to add some details under
> qemu/libvirt GSoC umbrella -
> http://wiki.qemu.org/Google_Summer_of_Code_2013

I think there's a GSoC project in here.  I'm envisaging something like
this:

(1) Extend libguestfs to add support for detecting which bootloader is
installed on a disk.

This would be a part of inspection.  eg. You'd point it at a disk, it
would examine the boot sector and other sectors and filesystem, and
say "grub2" or "NTLDR" (or whatever).

It would also produce some other information such as which [operating
systems? partitions? OS versions?] this boot loader is responsible for
booting.

This would be immediately useful for virt-v2v.

(2) Extend libguestfs to allow certain bootloaders to be installed.

We have, controversially, a grub-install API.  It was deliberately
broken by the upstream grub / Fedora maintainers because they didn't
want to maintain grub-legacy any longer.  I *still* think it's a good
idea to allow boot loaders to be installed from libguestfs.  It looks
like we could install: SYSLINUX, for sure.  Grub{1,2} with a lot more
effort.  NTLDR: not at all because of licensing issues.

Ian McLeod could use this immediately for his SYSLINUX / OpenStack
work.

(3) Extend libguestfs to allow a bootloader to be copied from one
guest to another.

virt-resize could use this.  The way it does it right now is
hokey voodoo (although it does tend to work, a lot of time).

https://github.com/libguestfs/libguestfs/blob/master/resize/resize.ml#L854

 - - -

In fact, looking at this, I don't think we can wait for GSoC :-)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)




More information about the Libguestfs mailing list