Bug#488840: /usr/sbin/update-grub: linux boot flavours

Michal Suchanek <hramrach@centrum.cz> michal.suchanek at ruk.cuni.cz
Fri Jun 26 12:32:25 UTC 2009


Package: grub-efi
Version: 1.96+20080724-16
Followup-For: Bug #488840


I guess it's hard to configure dynamic number of flavours using just
shell variables.

One way is to have seperate numbered variables and generate the names in
the script in some way like this:


# Common options. This is the place to put stuff you want at all times
# like badmem
GRUB_CMDLINE_LINUX="<common stuff>"

# Default flavour (optional, empty values are used if not specified)
GRUB_CMDLINE_LINUX_DEFAULT_NAME="(with splash)"
GRUB_CMDLINE_LINUX_DEFAULT_APPEND="vga=<fancymode> splash quiet"

# Other flavours
GRUB_CMDLINE_LINUX_1_NAME="(single user)"
GRUB_CMDLINE_LINUX_1_APPEND="single"

GRUB_CMDLINE_LINUX_2_NAME="(safe mode)"
GRUB_CMDLINE_LINUX_2_APPEND="vga=normal nosplash noacpi noapic nolapic nosmp"

# Flavour 3 is empty so the script would stop here

The other way would be to pack all of the above into a single variable.
However, the kernel command line options are convoluted as they are
because they pack module options so writing and parsing such a varilble
would be very hard.

You can gettext away all the name parts if wanted.

Thanks

Michal





More information about the Pkg-grub-devel mailing list