I would like to have dual boot of two Linux distributions on my laptop. One stable (Mint 18 that I found to work well with Yoga 3 Pro) and one that would be probably changing often; I want to try different distributions like Fedora or OpenSuse, without destroying my stable working environment.
I wonder how I should do partitioning of boot partitions here. I would like to do it in the easiest possible way that would allow removing the second Linux installation easily.
I was thinking about having two boot partitions, one for each Linux. During installation of the main Linux, I could choose to put the boot loader into the MBR, and for second one into the proper partition. But then I would have to update Mint's grub every time I install a new test distribution; would that be a good solution? Also, I am not sure if I can have two EFI partitions.
What would be the most stable and safe option here?
Update 1
First of all, I did more research and realized that I was confused about a few things. I didn't know that Device for boot loader installation
[1] option during Mint installation is completely ignored during installation in UEFI mode [2] (1). Also poor naming in Ubuntu installer (2) made me believe that ESP
is doing the job of /boot
partition, not the MBR
.
Knowing that I am thinking of following partition scheme (256GB SSD drive):
Scheme:
/dev/sda1 EFI System Partition fat32 /boot/efi 512MB (ESP partition)
/dev/sda2 ext2 /boot 512MB (boot for Mint)
/dev/sda3 ext2 512MB (boot for other)
/dev/sda4 lvm2 ( / for each Linux, shared home, swap )
And then during installation of each Linux I would make 4 mounting points of correct partitions:
/boot/efi
/boot
/
swap
Is that reasonable? And do I understand correctly that option for choosing Device for boot loader installation
during Mint installation is redundant in EFI mode and I should not worry about it anymore? And do I understand correctly that now shared ESP
will just have a config to start loading GRUB
from a boot
partition it got set up as default?
Update 2
I am going with a scheme I proposed above. However, creating partitions /dev/sda1
- /dev/sda3
through GParted
resulted in some errors in the Mint installer. I repeated the process by destroying these partitions and creating them again from a Mint installer and it went smoothly. /dev/sda4
I created before running Mint installer in GParted
and created local volumes from terminal. This tutorial on LVM was very helpful on that [4].
Update 3
After installing Mint, I proceeded with installing Fedora (3); after that, the system by default booted into Fedora, but in the BIOS I was able to choose Ubuntu or Fedora and each of them worked well.
I change the BIOS to boot first from Mint, and then from Mint I executed:
sudo grub-mkconfig -o /boot/grub/grub.cfg
which allows me basically to boot both Linuxes now.
Because I made the assumption that the other Linux is for testing purpose I more or less achieved what I wanted. If I remove Fedora
and install in its place for example OpenSuse
I could probably simply execute the above command again to obtain the stable boot system.
Comments
(0) I am keeping that question updated all the time just in case someone may find it useful in the future.
(1) I did installation on a different computer some time ago that had two hard drives (separate devices). /dev/sda
was fully meant for Windows 10 and I wanted to install Mint on /dev/sdb
. Despite the fact that I selected Device for boot loader installation
as /dev/sdb
it found ESP on the other drive and used that partition for booting.
(2) EFI System Partition (ESP)
is named in Mint (Ubuntu) installer as
EFI boot partition
[3].
(3) I had to be super careful with choosing mount points and partitioning her.
Links:
[1] http://i.stack.imgur.com/Pj1wt.png
[2] https://ubuntuforums.org/showthread.php?t=2309806&p=13422658#post13422658
mint installer
(a tool none of us here have deep knowledge of and that changes often) together with a hand made installation path. A distro installer does not cover all possibilities a user may want to install a linux in, if it did it would be almost impossible to maintain. You are more likely after making the partitions and GRUB/mounts yourself and then completely disregard (turn off) the installers bootloader/UEFI config. Trying to use two installer's botloader/UEFI config is asking for trouble.grub-mkconfig
, it is much simpler than playing around with UEFI. Good luck with your testing machine.