GRUB

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

Documentation

Official documentation:
https://www.gnu.org/software/grub/
http://www.gnu.org/software/grub/manual/
https://en.wikipedia.org/wiki/GNU_GRUB

See also (e.g. in Konqueror):
info:grub

Ubuntu: https://help.ubuntu.com/community/Grub2
Gentoo: https://wiki.gentoo.org/wiki/Grub2

Illustrated dual boot:
http://members.iinet.net/~herman546/index.html
Grub:
http://members.iinet.net/~herman546/p20.html

GRUB 2 bootloader - Full tutorial
http://www.dedoimedo.com/computers/grub-2.html

Gentoo:
https://wiki.gentoo.org/wiki/GRUB2
https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader

Files

Configuration files:
- http://linux.overshoot.tv/etc/grub.d
- /etc/default/grub

Notes

The official documentation is complete, but not very clear on certain points. Help us clarify them here. Hopefully, some of the clarifications here will eventually make their way into the official, upstream documentation.

For a Linux distribution installation, what would the required elements of a menuentry be?

menuentry "03- Gentoo Base System release 2.2 (on GPT drive)" --class gnu-linux --class gnu --class os {
        insmod ext2
        insmod part_gpt
        search --set=root --no-floppy --fs-uuid 992fd876-0472-4b49-98e0-802159049d57
        linux /boot/kernel-genkernel-x86_64-4.4.21-gentoo root=UUID=992fd876-0472-4b49-98e0-802159049d57
        initrd /boot/initramfs-genkernel-x86_64-4.4.21-gentoo
}

'root' is mentioned twice in the above entry.
The first time ("search --set=root...") is to tell grub which partition to boot. Here, it is set to search for the proper partition by UUID.
The second time is the 'root' parameter that the linux kernel expects. Similarly, we set it with the partition's UUID. Beware, the UUID only works with initramfs or initrd kernels.

Questions to be answered:
'insmod' loads grub modules. What is the list of such modules, and which ones to load, when?

GRUB_GFXMODE

Find your screen resolution:
http://linux.overshoot.tv/wiki/monitor

$ xdpyinfo  | grep 'dimensions:'
dimensions:    1920x1080 pixels (508x285 millimeters)

with package: http://linux.overshoot.tv/x11-apps/xdpyinfo

Find the colour depth:

# xwininfo -root | grep Depth
  Depth: 24

With package x11-apps/xwininfo

Use the above information to set GRUB_GFXMODE in /etc/default/grub:

# The resolution and colour depth used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
GRUB_GFXMODE=1920x1080x24

Theming

See also;
http://linux.overshoot.tv/wiki/plymouth

See also

Grub2 theme tutorial
http://wiki.rosalab.ru/en/index.php/Grub2_theme_tutorial

Issues related to this page:

ProjectSummaryStatusPriorityCategoryLast updatedAssigned to
Linux softwareConfigure grub for dual bootactivecriticalsupport request13 years 4 weeks
Linux softwareEasy selection of menu entry for grub-rebootactivenormalfeature request10 years 7 weeks