GRUB should now support booting from CDs reliably, and its new graphical menu system was designed partly with the aim of being able to implement our CD menus. If successful, this would be easier to maintain than gfxboot.

Release Note

Ubuntu CDs now use the GRUB 2 boot loader. The CD boot menu interface has been redesigned.


Current Ubuntu CDs use ISOLINUX, with the gfxboot extensions from SuSE implementing graphical menus.

This has proven to be rather difficult to maintain, with only one person in Ubuntu who understands the theming code involved (which is actually rather more than what one would normally expect from a theme: the underlying language only provides primitive operations, and the theme needs to implement everything from the widget layer on up). Since we are now using GRUB 2 everywhere else on x86, and since GRUB 2 recently had graphical menu support added to it upstream, moving to that has the potential to reduce our maintenance load. It seems likely that we will need to use GRUB 2 anyway in order to support EFI, and having to configure two different boot loaders on our CDs would be undesirable.

Using GRUB will also permit us to take advantage of foundations-m-grub2-boot-framebuffer, using a better video mode and transitioning the display smoothly to Plymouth.


At the time of writing, we have an image created using grub-mkrescue with the addition of a theme produced by Jo Shields. Basic boot menu support is working. However, GRUB's gfxmenu code currently lacks support for the additional menus we use in our CD boot loader, and we also have a custom facility to display a splash screen before the main boot menu which bypasses the boot menu if a key is not pressed within a certain amount of time.

Adding these facilities in gfxmenu will probably increase its size by a moderate amount; but gfxmenu is already a module, and is already too big to fit into the MBR embedding region, so the next plausible limit on its size will be bigger than we need to worry about.

Splash screen

It should be possible to hook a splash screen into the existing hidden-timeout code.

In gfxboot-theme-ubuntu, the menus are typically as follows:

We do not need to provide all these features in precisely the same form, so it's worth looking at the underlying requirements of each menu.

New gfxmenu facilities

[Note that all of this is subject to discussion with upstream.]

We will clearly need to be able to define a menu bar, with keys bound to particular menus. Rendering of each menu is up for discussion, although there are often more entries than will fit vertically on the screen (particularly in the case of the language menu), and so we will need either a scrolling menu or a grid; the latter may be easier to use. The menu entry names should of course be configurable.

To implement the actions associated with each menu, the simplest approach would seem to be to bind a function to be called when an entry is selected. This could set variables for substitution into the boot parameters, as well as more sophisticated actions such as changing the keyboard map.

The F6 menu will require checkbox widgets.

CD changes and other issues

We will need to run GRUB code as the images are built, which is likely to be tricky; we may have to fish the necessary pieces out of .debs in the archive, or, more plausibly, have the debian-installer build process build appropriate GRUB images for us. To start with, we will only tackle this for BIOS-based systems, as handling EFI as well will require care due to mutual conflicts between grub-pc and grub-efi-*.

usb-creator will need to detect whether the ISO image it is copying to the USB stick contains GRUB or ISOLINUX, and install the appropriate boot loader to the stick. In order to support running usb-creator in non-Ubuntu environments where it is difficult to change the GRUB image in use, the GRUB image on the CD will need to contain the union of all modules necessary to boot from either CD or USB.

We should review the BIOS workarounds present in ISOLINUX and GRUB, and check whether any additional hacks need to be ported over to GRUB.

It will be worth providing a loopback.cfg so that other GRUB instances can easily chain to Ubuntu CDs.

Test/Demo Plan

We will prepare small test images for wide testing (including in our certification laboratory) before committing to this change. After that, everyone will be testing it!



FoundationsTeam/Specs/MaverickCDBoot (last edited 2010-09-29 17:13:42 by robbie.w)