Next: , Previous: , Up: System Configuration   [Contents][Index]


6.2.12 GRUB Configuration

The operating system uses GNU GRUB as its boot loader (see overview of GRUB in GNU GRUB Manual). It is configured using a grub-configuration declaration. This data type is exported by the (gnu system grub) module and described below.

Data Type: grub-configuration

The type of a GRUB configuration declaration.

device

This is a string denoting the boot device. It must be a device name understood by the grub-install command, such as /dev/sda or (hd0) (see Invoking grub-install in GNU GRUB Manual).

menu-entries (default: ())

A possibly empty list of menu-entry objects (see below), denoting entries to appear in the GRUB boot menu, in addition to the current system entry and the entry pointing to previous system generations.

default-entry (default: 0)

The index of the default boot menu entry. Index 0 is for the entry of the current system.

timeout (default: 5)

The number of seconds to wait for keyboard input before booting. Set to 0 to boot immediately, and to -1 to wait indefinitely.

theme (default: %default-theme)

The grub-theme object describing the theme to use.

grub (default: grub)

The GRUB package to use.

terminal-outputs (default: 'gfxterm)

The output terminals used for the GRUB boot menu, as a list of symbols. These values are accepted: console, serial, serial_{0-3}, gfxterm, vga_text, mda_text, morse, and pkmodem. This field corresponds to the GRUB variable GRUB_TERMINAL_OUTPUT (see Simple configuration in GNU GRUB manual).

terminal-inputs (default: '())

The input terminals used for the GRUB boot menu, as a list of symbols. The default is the native platform terminal as determined by GRUB at run-time. These values are accepted: console, serial, serial_{0-3}, at_keyboard, and usb_keyboard. This field corresponds to the GRUB variable GRUB_TERMINAL_INPUT (see Simple configuration in GNU GRUB manual).

serial-unit (default: #f)

The serial unit used by GRUB, as an integer from 0 to 3. The default value is chosen by GRUB at run-time; currently GRUB chooses 0, which corresponds to COM1 (see Serial terminal in GNU GRUB manual).

serial-speed (default: #f)

The speed of the serial interface, as an integer. The default value is chosen by GRUB at run-time; currently GRUB chooses 9600 bps (see Serial terminal in GNU GRUB manual).

Should you want to list additional boot menu entries via the menu-entries field above, you will need to create them with the menu-entry form. For example, imagine you want to be able to boot another distro (hard to imagine!), you can define a menu entry along these lines:

(menu-entry
  (label "The Other Distro")
  (linux "/boot/old/vmlinux-2.6.32")
  (linux-arguments '("root=/dev/sda2"))
  (initrd "/boot/old/initrd"))

Details below.

Data Type: menu-entry

The type of an entry in the GRUB boot menu.

label

The label to show in the menu—e.g., "GNU".

linux

The Linux kernel image to boot, for example:

(file-append linux-libre "/bzImage")

It is also possible to specify a device explicitly in the file path using GRUB’s device naming convention (see Naming convention in GNU GRUB manual), for example:

"(hd0,msdos1)/boot/vmlinuz"

If the device is specified explicitly as above, then the device field is ignored entirely.

linux-arguments (default: ())

The list of extra Linux kernel command-line arguments—e.g., ("console=ttyS0").

initrd

A G-Expression or string denoting the file name of the initial RAM disk to use (see G-Expressions).

device (default: #f)

The device where the kernel and initrd are to be found—i.e., the GRUB root for this menu entry (see root in GNU GRUB manual).

This may be a file system label (a string), a file system UUID (a bytevector, see File Systems), or #f, in which case GRUB will search the device containing the file specified by the linux field (see search in GNU GRUB manual). It must not be an OS device name such as /dev/sda1.

device-mount-point (default: "/")

The mount point of the above device on the system. You probably do not need to change the default value. GuixSD uses it to strip the prefix of store file names for systems where /gnu or /gnu/store is on a separate partition.

Themes are created using the grub-theme form, which is not documented yet.

Scheme Variable: %default-theme

This is the default GRUB theme used by the operating system, with a fancy background image displaying the GNU and Guix logos.


Next: , Previous: , Up: System Configuration   [Contents][Index]