Ceci est une ancienne révision du document !
WARNING: This is not something to try on your daily driver or on any system with valuable data. Rather use a non-critical system or at least a spare hard drive.
AVERTISSEMENT : Ce n'est pas quelque chose à essayer sur votre driver quotidien ou sur tout système contenant des données précieuses. Utilisez plutôt un système non critique ou au moins un disque dur de rechange.
I had done several multi-boot setups using Linux before this, both with and without Windows. All of these booted using the traditional legacy BIOS and a MBR (ms-dos) partitioning scheme on the hard disk. If I remember correctly, the most was only four distros. I decided it was time to get up-to-date using UEFI booting and GPT partitioning. My original idea was to use the top ten distros as listed on Distrowatch. However, I decided to modify this as I specifically wanted to include ‘Linux From Scratch’ and a BSD variant. I tried both FreeBSD and GhostBSD, but I wasn’t happy with the way they installed and decided not to complicate this article with either of them. If any readers are also BSD fans, I haven’t given up on them and am trying them on a separate hard disk. I excluded Linux Mint from the list as I was already using this as my main distro on another desktop system. Manjaro and Antergos were dropped as I wanted to try Arch for the first time, but then I found out that Arch needs an internet connection during installation which was not an option for me. So BSD and Arch were replaced by Slackware and Ubuntu MATE which I had on hand. It may be prudent to select only one Ubuntu-based distro as they can overwrite one another’s menu entries.
J'avais fait plusieurs installations multi-boot en utilisant Linux avant cela, avec et sans Windows. Toutes ces dernières ont démarré à partir du BIOS legacy classique et du schéma de partitionnement MBR (ms-dos) depuis le disque dur. Si je me souviens bien, on pouvait installer seulement quatre distributions. J'ai décidé qu'il était temps de se mettre à jour en utilisant le démarrage via l'UEFI et le partitionnement GPT. Mon idée initiale fut alors d'utiliser les dix premières distributions listées sur Distrowatch. Cependant, j'ai décidé de modifier ceci car je voulais, en particulier, inclure 'Linux From Scratch' et une variante d'une système BSD. J'ai essayé FreeBSD et GhostBSD, mais je n'étais pas satisfait de la façon dont ils se sont installés et j'ai décidé de ne pas compliquer cet article avec l'un ou l'autre. Si certains lecteurs sont aussi des fans de BSD, sachez que je n'ai pas renoncé à les essayer sur un disque dur séparé. J'ai exclu Linux Mint de la liste car j'utilisais déjà cette distribution comme distribution principale sur un autre PC de bureau. Manjaro et Antergos ont été abandonnés car je voulais essayer Arch pour la première fois, mais j'ai découvert qu'Arch avait besoin d'une connexion Internet pendant l'installation, ce qui n'était pas une option que j'avais envisagé. BSD et Arch ont donc été remplacés par Slackware et Ubuntu MATE que j'avais sous la main. Il peut être prudent de ne sélectionner qu'une seule distribution basée sur Ubuntu car elles peuvent écraser les entrées du menu de l'autre.
Create Partitions
Créer des partitions
Once you have chosen what distros you want to install, decide what order (if any) you would like to see them in on your final GRUB menu. This determines which distro goes on which partition. Full Circle being a magazine about the Ubuntu family, I naturally chose Ubuntu as my primary distro, controlling the GRUB menu, and appearing first. After that, the distros appear in order by partition number, but if you go to extremes like me, note that partitions sdX10 and above will appear before any partitions with single numbers below 10.
Don’t forget to first backup any files you might want to keep. Booting from a Live USB containing Ubuntu 17.10, I opened GParted and created a new partition table of type “gpt” on my hard drive, effectively wiping any data on the drive. I then proceeded to create 13 new partitions, all set by default as “Primary Partition”. The size of /dev/sda1 was set at 512 MiB and formatted as FAT32. The next 11 partitions (/dev/sda2 through /dev/sda12) were all sized at 20480 MiB (20 GiB), and formatted as ext4 with the exception of /dev/sda3. This was formatted as a swap partition. The remaining space on the hard drive (/dev/sda13) was set as ext4 and labelled as “common”. This was reserved for holding user files to be accessed from any of the 10 distros. After applying the changes, I went back to sda1 and changed the flag to esp, which deleted the previous msftdata flag and also added a boot flag.
I chose 20 GiB as the partition size for each distro as this should be adequate to hold the base installations and allow for additional software to be installed. Remember user files are being stored on a separate partition. I know 20 GiB is probably overkill for a swap partition, but I didn’t know beforehand what the requirements of each of the 10 distros were. If they needed a swap partition, what size should I use? Some distros including Ubuntu now use a swap file by default (rather than a partition), but will use a swap partition if one already exists.. If I later needed to move partitions around, a swap partition of the same size as the distro partitions might also make things easier.
Installing Distros
Installer des distributions
Now you can start installing all your chosen distros. It shouldn’t matter in what order you install them. I went with alphabetical, and so started with Debian on sda10. I would suggest you write down which distro goes on which partition so you can refer to it later. I did decide to leave the primary distro (Ubuntu for me) until last so that it would end up in control of the GRUB menu. I would also suggest you install all the distros before logging into any of them. See post-installation configuration below. After I downloaded the .iso file for each distro, I burnt the image to a USB stick. I used the dd command, but you can also use the Startup Disk Creator in Ubuntu. So, after you have finished partitioning, reboot with a Live ISO of your first distro.
Make sure you boot each distro/installer in UEFI mode. Usually this can be achieved by pressing F8, F11 or F12 during the boot sequence to get a UEFI Boot Menu. Select the option for your live media that begins with UEFI. Start the installer, and when you reach the partitioning stage, select “Something else” or “Manual Partitioning”. Do not use automatic or guided installation. The EFI System Partition on sda1 should automatically be used without explicit selection. Make sure it will not be reformatted. Confirm sda3 as the swap partition. Check your reference list and mount the desired partition (sda2-sda12) for each distro as “/” (slash) – that is as the file system root.
If you can, choose not to install a bootloader/GRUB, except of course for your primary distro, where it should be installed to /dev/sda. For all of the 10 distros, I used the same username and password, just to make it easier to remember when logging in. My list of partitions is shown above.
Installation Comments
The times it took me to install each distro using USB 2,0 sticks are given as a guide in the table above. This does not include the time taken to download .iso files and to create LiveUSBs from those same files. It also does not include time for reading installation guides and manuals. As they say, your mileage may vary.
Debian 9.2 KDE
Debian 9.2 avec KDE
I tried both the graphical and text-based installers. Both are very different from the Ubiquity one used by Ubuntu and its flavours/derivatives. There are a lot more steps and questions, but they are easy to follow. By default GRUB is taken over.
elementary 0.4.1 Loki
elementary 0.4.1 Loki
Nothing worthy of comment.
Sans commentaire
Fedora Workstation 26
Fedora 26
Again the Fedora installer is very different to Ubiquity. I suggest you download the Installation Guide for more information. It is possible to install without GRUB. Fedora Workstation 27 is now available.
Linux From Scratch
Linux From Scratch
I described how to do this in a previous article (see FCM#120, April 2017, page 50). Since then, LFS has been updated to version 8.1. The install time in the table above is how long it took to restore a backup image to the partition using Clonezilla. The actual time it took to create and compile a fully working LFS system was about 1.5 days. I have already installed many additional packages from the BLFS book, and I intend to take it further by installing X-Windows and KDE, but that is still work-in-progress. I didn’t need to install GRUB for LFS as it can be booted from the GRUB menu of the primary distro. On the LFS website, there is a hint document which goes into great detail about booting a stand-alone installation of LFS using UEFI.
openSuSE 42.3 Leap
openSuSe 42.3 Leap
Beware! OpenSuSE .iso files can be very large. The one I chose was 4.6 GB and installed some 2196 packages. It is possible to install without GRUB.
Slackware 14.2
Slackware 14.2
Slackware is a distro that is, by design, conservative in its choice of software. For example, it still uses KDE4. There are no Live disc images, only ones for the installer. The installer image boots using GRUB2, but this is not available for the installed distro itself. By default, ELILO is used instead, with an option to create an entry in the UEFI boot menu. The original LILO can also be installed. The installer is ncurses-based but is easy to follow. Lots of documentation is available in the installer .iso file and also on the website. The 64-bit installer image is 2.8 GB and includes much more than the usual choice of software. Apart from KDE4, you can also choose from xfce, fluxbox, blackbox, wmaker, fvwm2, and Tab Window Manager desktops. A full installation uses about 10.6 GB (9.88 GiB).
Solus 3 Budgie
Solus 3 Budgie
This one threw me for a bit. Luckily, the installer is easily the quickest at under 6 minutes. After installing, if you reboot into your primary distro (Ubuntu in my case), and run sudo update-grub, Solus(3) is detected, but it does not get added to the GRUB menu. Only after some digging around in the Solus forums did I realise that to boot Solus you have to select the option to boot from another device/disc (i.e the UEFI boot menu - F8 on my system), and then select Linux Boot Manager. If desired, you can add a custom entry to the GRUB menu: In your primary distro, as root, cd to /etc/grub.d. Then, edit the file 40_custom by appending the following lines (do not delete the first two lines):
menuentry “Solus 3 Budgie” {
insmod part_gpt insmod fat set root="hd1,gpt1" chainloader /EFI/goofiboot/goofibootx64.efi
}
Note the root (hd1) should point to the correct hard disk, and gpt1 should point to your EFE System Partition (e.g. sda1). Then run sudo update-grub to add the custom entry to your GRUB menu.
Ubuntu-Mate 17.04
Ubuntu-Mate 17.04
Installs similar to Ubuntu. Takes over GRUB.
Installation similaire à Ubuntu. Prend le contrôle de GRUB.
Zorin 12.2 Core
Zorin 12.2 Core
Installs similar to Ubuntu. Takes over GRUB.
Installation similaire à Ubuntu. Prend le contrôle de GRUB.
Ubuntu 17.10
Ubuntu 17.10
What needs to be said? Try the new Gnome-based desktop that has replaced Unity. On my system, Wayland was used by default with no discernible effects, as it should be.
After I had finished all the installations, I rebooted once more from my LiveUSB (Ubuntu) and opened GParted. I labelled each partition with the name of the relevant distro to make it easier to find my way around later on. See screenshot.
Post-Installation Configuration
Configuration post-installation
At last. You can now remove all live media and reboot your system. If all has gone well it will boot into the distro you installed last (i.e. your primary distro [ubuntu]). If not, you will probably get a GRUB menu that will allow you to choose your primary distro.
Swap partitions
Partition Swap
If you were impatient and logged into some of your newly installed distros before all the installations were completed, you may have experienced some slow boot-ups. This is caused when the distro can not find the swap partition as listed in /etc/fstab. For some reason, although the various installers all seem to recognise an already existing swap partition, most of them go on to reformat it, changing the UUID of the partition in the process. This can be remedied by updating the fstab files to show the swap partition by device name (e.g. /dev/sda3), by label (e.g. swap), or the best method, by the current UUID of the swap partition. I did this in conjunction with the next section. The UUID can be found by running sudo blkid in a terminal.
Mounting the “common” partition
Montage de la partition commune
In each distro, you need to create a mount point for the common partition. First, in a terminal in your primary distro, use the command sudo mkdir -pv /mnt/common. Then, still as root, edit the /etc/fstab file. If necessary, correct the line containing the swap partition as described in the previous section. Add an additional line for the common partition similar to:
UUID=0400f1d8-651c-4e8a-baab-db25e9f8e34d /mnt/common ext4 defaults,noatime 0 0
UUID=0400f1d8-651c-4e8a-baab-db25e9f8e34d /mnt/common ext4 defaults,noatime 0 0
Use the command mount -av to mount the common partition immediately. These commands will need to be repeated later for each distro.
Still in your primary distro, and using your own username, enter:
sudo mkdir -pv /mnt/common/paul/{Documents,Downloads,Pictures,Music,Videos}.
sudo mkdir -pv /mnt/common/paul/{Documents,Downloads,Pictures,Music,Videos}.
Then:
Puis:
sudo chown paul: /mnt/common/paul/*.
sudo chown paul: /mnt/common/paul/*.
This needs to be done only once.
Cela ne doit être effectué qu'une seule fois.
In each distro, delete the Documents, Downloads, Pictures, Music, Videos sub-folders in your home directory. Then create links to the common folders using ln -sv /mnt/common/paul/Documents /home/paul/Documents. Repeat this link creation for the other sub-folders you created earlier. In each distro, check your user ID (UID) using the command id. Normally, if you are the first user on the system (the administration user as opposed to the root user), you will have a UID of 1000. However some distros start human user UIDs from 500. If all the UIDs are the same, you will be able to access the user files stored in the “common” partition from all of the distros. I put sample files into each of the common folders, and checked that I could access them from each distro.
Checking boot mode
Contrôle du mode de démarrage
If you want to double-check how your system has booted, enter the command ls /sys/firmware/efi. If the directory exists and has files in it, you have successfully booted in UEFI mode.
Conclusion
Conclusion
Congratulations if you have got this far! Well done. Now all you have to is configure each of your newly installed distros to your heart’s content. Enjoy!
Félicitations si vous êtes arrivé jusqu'ici ! Bien joué. Maintenant, tout ce que vous avez à faire est de configurer chacune de vos distributions nouvellement installées avec ce qui vous est cher. Amusez-vous bien !