Tag Archives: triple boot

How-to dual-boot, triple-boot or multi-boot Linux with Windows in a simple way and be happy

How-to dual-boot, triple-boot or multi-boot Linux with Windows in a simple way and be happy…

In this instruction I will show you how easy it is to have several Linux systems installed on one computer together with for example Windows 10. The configuration is so simple a ten year old child can do it.

BACKGROUND
Ubuntu and all Linux systems based on Ubuntu (such as Linux Mint) uses Grub2 as boot manager. Also Debian and most other Linux systems use Grub2. Grub2 works differently from the old Grub Legacy.

UEFI BIOS and non-UEFI BIOS
The Extensible Firmware Interface (EFI) or its version 2.x variant, Unified EFI (UEFI) is a firmware type that is widespread on recent computers, especially those more recent than 2010Ubuntu wiki.

Configuring Grub2 – Example for non-UEFI BIOS computers
One of my computers, an Acer Aspire 5750G from 2010, has a 750 GB hard drive and an external USB hard drive of 1000 GB. On that computer I have Windows 10 and twelve (12) different Linux systems installed. Of those twelve systems three are Android-x86 systems (AndEX Nougat and AndEX Marshmallow). Below I will describe step by step how I configured Grub2 in the easiest way possible.

1. The computer was delivered with Windows 7 (now updated to Windows 10) preinstalled on /dev/sda2 and /dev/sda3. I immediately started up my computer from a Linux Mint Live DVD. Using GParted, I created seven new partitions on the internal hard drive and three on the external USB hard drive. After that I installed Mint on /dev/sda7 and Grub2 in MBR at the same time as the installer also suggested. Then I restarted my computer and checked that Mint (and Windows) could be started. Everything worked (as expected) fine. See the screenshots below showing how my partitioning looks like now.

The internal hard drive partitions
Note the 4 GB SWAP partition on /dev/sda6

The external USB drive partitions

2. Then it was time to install Arch Linux on /dev/sda8. When the installation prompted installation of Grub2 during installation, I chose to install Grub2 on /dev/sda8. Such an installation of Grub2 does not affect the existing Grub2 installation in MBR. I did it just the same to find out “start data” for Arch Linux. I then read these start data from Mint in the /mnt/sda8/boot/grub/grub.cfg file.

3. After that I started Mint on /dev/sda7 again. Now it was time to get a real “multiboot computer” using Grub2. This is how I did it:
A) In /etc/grub.d I deleted all files except 00_header, 05_debian_theme, 06_mint_theme, 40_custom and README. Said folder then looked like this.



B)
I edited the /etc/grub.d/40_custom file to look like this. Note that this is how my 40_custom file looks like now when I have installed totally twelve Linux systems. The start data for Arch Linux (see above) was already fixed by looking at the /mnt/sda8/boot/grub/grub.cfg file. I could do it in a similar way when I installed the other eleven Linux systems.

Since this instruction is a bit old (from July 7, 2017) you can also have a look at the 40_custom file as it is today (211212) on one of my other computers – link.

C) Finally, I ran the update-grub command. Then the /boot/grub/grub.cfg file (which is the file Grub2 “takes into account” at boot) was created/changed. This file (grub.cfg) should never be edited manually. Instead, edit the file 40_custom, as I showed above. Always use Leafpad or Mousepad (or a similar simple editor) when editing 40_custom. Never LibreOffice Writer or Word or the like of them. Study my present grub.cfg file. When I now start up my Acer Aspire the boot screen look like this.

My BIOS settings on my Acer Aspire look like this.

Configuring Grub2 – Example for UEFI BIOS computers
On another computer (laptop) Lenovo Z50 from 2015 I have Windows 10 installed together with three Linux systems. Ubuntu 17.04 and two Android-x86 systems. Since Windows 10 was installed in UEFI mode I also had to install Ubuntu 17.04 in UEFI mode to be able to configure Grub2 the way I describe above. I went into BIOS and changed the settings to look like this.

When I went into the boot menu in BIOS I could choose my USB stick. In this case Kingston DataTraveler – watch this screenshot.

So I started up Ubuntu 17.04 from the USB stick and installed it on a partition I had created in advance using GParted. Since my Lenovo already had a ESP (EFI System Partition) I installed Grub2 onto that partition. When I now start up my Lenovo the boot screen looks like this. (You can of course install many more Linux systems if you like. Just edit /etc/grub.d/40_custom the way I describe above).

IMPORTANT: Identifying if the computer boots the Ubuntu DVD/USB stick in UEFI mode
If the BIOS is set up to boot the DVD/USB stick in UEFI mode, then you will see the screen below.

If the BIOS is NOT set up to boot the CD in UEFI mode, or if the disk is not 64-bit, then you will see the screen below.


(ExTiX is based on Ubuntu)

Grub2 bootsplash
One of the benefits of Grub2 is that you can have a nice high resolution image as bootsplash/grub boot image. The image may have the same size as the resolution on your screen can handle, for example 1366×768. It is common with a regular image in jpg, png or tga format. Just place the image in /boot/grub and run the update-grub command. If you get the answer that the image is found in /boot/grub it will work. If not, try editing the /etc /default/grub file and add the line
GRUB_BACKGROUND = “/boot/grub/MyNicePicture.png”
Then run the update-grub command again (and restart the computer).

Have a look at my /etc/default/grub file.

Change the text – font and size – which Grub2 shows at boot

Run the following command:
grub-mkfont –output=/boot/grub/DejaVuSansMono.pf2 –size=24 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
(Maybe you’ll need to run the command (apt-get install ttf-dejavu first). Then edit the /etc/default/grub file and add the following line.
GRUB_FONT=/boot/grub/DejaVuSansMono.pf2
Run the update-grub command again. After rebooting, the Grub2 boot menu will surely look better (depending on how your boot image looks like).

40_custom on my Lenovo Z50 computer as of today (211212) – see above
Since this instruction is a bit old (from July 7, 2017) you can also have a look at the 40_custom file as it is today (211212) on my Lenovo Z50 laptop – link.

############################################

Good luck!

/exton

Read about my Android-x86 Systems – 10, Pie, Oreo, Nougat, Marshmallow, Lollipop and KitKat at
andex.exton.net – latest is AndEX 10 (with GAPPS) and AndEX Pie 9.0 (also with GAPPS)!
and

about my Android 11, 10, Pie, Oreo, Nougat, Marshmallow and Lollipop versions for Raspberry Pi 4 and 3/2 at
raspex.exton.se
– latest is RaspAnd 11 (with GAPPS) and RaspAnd Oreo 8.1 (also with GAPPS)!