On Thu, 20 May 2010 18:35:54 +0100 Colin Watson <cjwat...@ubuntu.com> wrote:
> I would like to convert Ubuntu CDs to boot using GRUB for Ubuntu > 10.10. > > This is a bit ambitious. We're currently using ISOLINUX with SuSE's > gfxboot extensions, and extensive theming to offer various custom > menus. A number of the facilities we depend on there aren't yet > present in gfxmenu, and while I can probably get away without all of > them I don't think I'll be able to strip it all the way down to the > point of a single boot menu. > > Nevertheless, I think this is worth pursuing for various reasons: > we're probably going to need to use GRUB to support EFI-based > machines anyway; maintaining gfxboot-theme-ubuntu is really no fun at > all; and I'd like to see GRUB get to the point where it can handle > these requirements easily. Judging from the images on the front page > of http://grub.gibibit.com/, I gather that this was at least > considered as a goal for gfxmenu! It certainly was one of the goals. In the past, boot loaders have been second-class citizens from an appearance and usability standpoint, but I would like to see that change. GRUB should eventually have mouse support as well, but at the very least it should have a flexible and beautiful graphical interface. I think that the rEFIt menu <http://refit.sourceforge.net/screen.html> is nice looking and GRUB should be able to provide such a simple and clean interface. > I've written up a brief description of our needs here: > > https://wiki.ubuntu.com/FoundationsTeam/Specs/MaverickCDBoot > > I think that the extensions we'd need in gfxmenu amount to: > > * Supplementary menu support, with menus bound to keys How do you envision these supplementary menus? Are they pop-up menus spatially separate from the main boot menu? > * Either scrolling menus or grid menus, preferably grid Would this grid be a grid of boot menu entries, like the rEFIt screen shot I linked to above? > * The ability to bind functions to menus to process selections Currently menu items each run the code defined by the GRUB 'menuitem' command. Would you want something different to happen that can't be implemented this way? > * Checkbox widgets Should checkbox widgets be able to be part of a menu? How should checkboxes by selected/deselected? By navigating to them and pressing Enter, or via a dedicated hotkey? Currently the "boot menu" is itself a widget that displays menu items, but menu items are not widgets themselves. If you want arbitrary widgets to be selectable with the arrow keys we should figure out how best to handle it. > Needless to say I'm willing to take on the bulk of the work here, but > I'm very new to gfxmenu and I would greatly appreciate review from > those who've spent more time thinking about it and hacking on it. In > particular, I'd appreciate thoughts on how this kind of thing might > best be represented in extensions to the theme format. There are different possible approaches to setting up special menus. One possibility is to create the various menus/menu items in grub.cfg and then simply have the theme set up the menu widget which will then use the menu data defined in grub.cfg to create/navigate the menu tree. Another possibility is to explicitly instantiate widgets in the theme for specific purposes. For instance, you could create checkbox widgets and somehow associate each one with a GRUB environment variable name, which would be set according to the checkbox state. The language chooser could be implemented as a special widget, or perhaps a better option would be to create a generic "choice" widget which gets its list of possible choices from a file included by grub.cfg and sets a GRUB environment variable when the selected value is changed. (Note that environment variables can then have a "hook" defined to take some action when the value is changed.) How could GRUB script code define option names/values for a choice box? The issue is that you normally want some internal value for each choice and a label to display to the user for the choice. It seems kind of a kludge but if you had a choice box given the name "language" then it might get its possible choices from an environment variable called "language_options", defined in grub.cfg (or more likely in a file included in grub.cfg) something like set language_options="en English de Deutsch fr Francais" and so on. It would be nice if we could avoid using magic text characters like space and newline but since GRUB script doesn't have good data structures, it's simplest to use plain text, unless I'm missing something. (Lua makes defining and using such data structures fantastically easy...) Another thought: I think it would be really fantastic to do some of the more complex widget work in Lua. I have created some test widgets that are written 100% in Lua and do animation, etc. It makes it much easier to do things like manipulating lists, and creating widgets with customized behavior. Regards, Colin _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel