YouTube Videos

FILTERS:
ALL
Dual Boot MultiBoot
3 Fast MultiBoot USB3 Sticks
Bootmenus
Desktop Screenshots
Dualboot Kubuntu 16.10 & Win-10 USB3
Dualboot Android-x86 Linux USB
Dualboot Windows Linux USB
Dualboot Win-10 and Kubuntu 16.04
Dualboot Win XP and RemixOS
Grub2 Multi-Bootmenus
How Repair GPT Boot Failures?
Linux MultiBoot Grub1
Linux MultiBoot Grub2
Mount Linux in Windows
Mount Windows in Linux
Moving Windows XP Installation
MultiBoot & Backup
MultiBoot - Recap
MultiBoot - Device Mixups
MultiBoot USB-Stick
MultiBoot USB3 Extreme
Ranish Partition Manager
Ranish PM - Recap
Android
Android-x86
Backup Cloning
Chromecast
Linux
Messaging IM SMS
Misc. Soc Media
Music Jazz MPB
Remote Controls
Screen Recording
Smart-TV IPTV
USB Flash Drives
Windows

Krister's Blog
krister at hallergard dot com


Last Updated:
2014-01-16

Linux MultiBoot with Grub2

I bought my desktop PC in 2010 and it uses BIOS-MBR (which is now being replaced by UEFI-GPT). I have installed the Ranish Partition Manager replacing the IPL(Initial Program Loader) of the MBR (Master Boot Record), and it can set the boot flag to any of the primary partitions (makes the partition active). To each partition I have installed its own partition MBR (PBR), so that it can be independently booted via its own bootloader menu.
View Video 4 min

From 2010 on most distros install the Grub2 bootloader. My PC using BIOS-MBR does not necessarily require the sofistictation of Grub2, which is needed for UEFI-GPT devices.
Here is Linux Kubuntu's boot menu on partition sda3 at its very first boot: Not very pretty and the text is too small to read, at least for me. The first thing upon the first boot is to fix that.

I usually take a backup copy of the initial configuration file /boot/grub2/grub.cfg (or /boot/grub/grub.cfg depending on distro).



Bootmenu Linux Kubuntu on sda3
at its very first boot
Here is the bootmenu at the next boot after having applied edits:
  • Start a rooted text editor and open /etc/default/grub
    unhash the line #GRUB_GFXMODE=640x480
  • Open a file manager and copy a background picture
    to /boot/grub2/ (or /boot/grub/ depending on distro)
  • Enter "update-grub" in a rooted terminal
In Ubuntu you can download background pictures by installing "grub2-splashimages".

If you like most people are happy with having only one boot menu on the very first partition, you can stop reading here!

When the bootmenu of a partition has been changed, I will have to update all the other boot menus for one or several of these reasons:
  • a new kernel has been updated
  • the distro has been upgraded/updated to another version
  • if the partition has been formatted, the UUID (universally
    unique identifier) has been changed

Bootmenu on sda3 after GFXMODE edit.
Click here to see with new background!
Below are my own, very personal edits to avoid these constant updates of all the other bootmanagers, especially after every kernel update. Also I prefer to have the menu in partition order, and I also like to have some pretty colours.

Open a rooted file manager and navigate to folder /etc/grub.d/
  • copy the file 40_custom and name the copy 09_custom
  • untick the "is executable" permissions of 30_os-prober, which means that this script doesn't take part in the "grub-update"
  • open your backup copy of the initial /boot/grub/grub.cfg in a rooted text editor. In section /etc/grub.d/30_os-prober copy everything before the present partition to /etc/grub.d/09_custom and everything after the present partition to /etc/grub.d/40_custom
  • Still in the text editor erase all (or most) submenus of /etc/grub.d/09_custom and 40_custom
  • Edit /etc/grub.d/09_custom and 40_custom further: remove the version info in the menuentry descriptions
  • Enter "update-grub" in a root terminal
After these edits "update-grub" will only update its own partition and its own advanced options. If prefering to use the advanced options of any other distro/partition, I now will have select that distro in the initial Ranish partition list.

Also the order the partitions appear on the menu has now changed.

If a partition has been formatted, e.g. for a fresh installation, I usually restore the previous UUID, so that I don't have to update grub2 on all the other partitions for that reason.
Here are some more optional changes: the bootmenu is now in partition order, so it might be a good idea to review which partition should be the default. And change the text colours: to make the menu clearer and prettier:
  • Start a rooted text editor and open /etc/default/grub again
    change GRUB_DEFAULT= from 0 to e.g. 4 here for Kubuntu sda3
    change GRUB_TIMEOUT= from 10 to perhaps 6
  • open /etc/grub.d/05_debian_theme and find line 122
    # echo " true" - replace with the three lines:
    echo " true"
    echo " set color_highlight= blue/light-green"
    echo " set color_normal=yellow/black"


    Bootmenu Linux Kubuntu on sda3
    after further cosmetic edits