mintCast 155: GRUB Mysteries

Listen: mintcast155.mp3 or mintcast155.ogg

News:

The Main Topic: The Mystery of GRUB

  • James Eaton sent in a great link on the whole process of booting Linux. (infosecinstitute.com)
  • GRUB, the GRand Unified Bootloader. “GNU GRUB is a very powerful boot loader, which can load a wide variety of free operating systems, as well as proprietary operating systems with chain-loading.”
  • How does GRUB know what to boot? It reads /boot/grub/grub.cfg.
    • grub.cfg is written in GRUB’s built-in scripting language, which has a syntax quite similar to that of GNU Bash and other Bourne shell derivatives.
    • The program grub-mkconfig generates a grub.cfg file based on the scripts in /etc/grub.d and the /etc/default/grub file.
    • grub-mkconfig does have some limitations. While adding extra custom menu entries to the end of the list can be done by editing /etc/grub.d/40_custom or creating /boot/grub/custom.cfg, changing the order of menu entries or changing their titles may require making complex changes to shell scripts stored in /etc/grub.d/. This may be improved in the future.
    • The file /etc/default/grub controls the operation of grub-mkconfig. It is sourced by a shell script, and so must be valid POSIX shell input; normally, it will just be a sequence of ‘KEY=value’ lines, but if the value contains spaces or other special characters then it must be quoted.
    • ‘update-grub’ is a stub for running: ‘grub-mkconfig -o /boot/grub/grub.cfg’
  • Simple changes to try…
    • Change the default OS booted:
      • Change GRUB_DEFAULT in /etc/default/grub
      • Run ‘sudo update-grub’ to update /boot/grub/grub.cfg
    • Change the colors of the GRUB screen:
      • Edit /etc/grub.d/06_mint_theme to change these lines:
      • set menu_color_normal=white/black
      • set menu_color_highlight=white/light-gray
      • Run ‘sudo update-grub’
    • Add a background graphic: (Doesn’t work in Mint because of 06_mint_theme?)
      • Move one picture that is the same size as your screen resolution to /boot/grub/ (first one found is used?)
      • Run ‘sudo update-grub’
    • Change the order of the OS list:
      • Use the “maintenance-free Grub2 menu” article… (help.ubuntu.com)
      • Involves editing the scripts in /etc/grub.d
    • Recover your system if it won’t boot due to messed up MBR:
      • This can happen if you install Windows after installing Linux, but can also happen if you change hard drive settings or and or remove a hard drive (help.ubuntu.com)
  • GNU GRUB Manual 2.00~rc1. (gnu.org)
  • GRUB 2’s major improvements over the original GRUB. (help.ubuntu.com)
  • GRUB 2 bootloader – Full tutorial. (dedoimedo.com)
  • How to Configure the Linux Grub2 Boot Menu the Easy Way (Uses a program named “Grub Customizer” from a PPA). (howtogeek.com)

Featured Website and Tip:

  • How to measure the speed of your SATA devices from the command line. (linuxaria.com)

More Information:

Hosts:: Rob, Scott, James

Live Stream (Mondays at 8:00 p.m. Eastern): mintcast.org

Contact Us:

More Linux Mint info: website, blog, forums, community

Credits: Podcast Entry and exit music provided by Mark Blasco (podcastthemes.com). The podcast’s bumpers were provided by Oscar.

Linux Mint

The distribution that spawned a podcast. Support us by supporting them. Donate here.

Archive.org

We currently host our podcast at archive.org. Support us by supporting them. Donate here.

mintCast on the Web

This work is licensed under CC BY-SA 4.0

This Website Is Hosted On:

Thank You for Visiting