GRUB Bootloader Knowledge Base

Aus MattWiki

This article is my knowledge base for the Grand Unified Bootloader, also known as GRUB Bootloader, used in linux distributions like Debian or Fedora.

Following informations are based on Grub 2.xx

Update List of Operation Systems (on Debian)

To update the list of operating systems in GRUB2 for the operation systems installed on the current system use:

# update-grub2

Wichtig: Wenn mehrere GNU-OSes auf einer Festplatte installiert sind kann es sein, dass es auch mehrere GRUB-Loader gibt. Es muss also der richtige GRUB-Loader gefunden werden (sprich das Betriebssystem von dessen Festplatte/Partition muss geladen werden). Erst dort kann die aktualisierung statt finden.

Change Boot Order to Load Windows by Default (on Fedora)

For Dual Boot Installations:

Probably you don't want to specify a fixed boot order but rather always load the option selected the last time. This makes more sense as over time with installing updates and new kernel versions Grub boot loader gets more entries for every kernel version.

Therefore it is probably easier to always load the last selected option. For this:

sudo nano /etc/default/grub

Ad line at the bottom of the file:

GRUB_SAVEDEFAULT=true 

Rebuild grub.cfg with:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg 

Exception: when started Fedora and installed a kernel update the kernel update will become the first boot option and on reboot will be selected. This is probably what one wants when installing updates on fedora