Creating by hand EFI multiboot live USB key

Motivations

During the project "Tremplin des sciences" we deployed RaspberryPi nano computers and weatherstations in lower secondary schools of Lyon area we faced many problems due to low compentencies and knowledge of the linux ecosystem. We needed an easy way to boot a linux OS on any computer to interact easily with the RaspberryPi or check their microSD condition. In another side of my life I am contributing to install parties with colleagues and it is usefull and efficient to be able to demonstrate the differences between various linux distributions, display managers and window managers.

In both cases we need an USB EFI multiboot linux live key, here is the way to produce "by hand" such a key. I have choosen to produce this key step by step and not relying on various "automatic tools" because I feel that they often do what they believe is good for me instead of what I want to get, you will find many user friendly tutorials with such tools on the web but if you want o master the process keep on reading !


Table of contents

  1. What we have obtained
  2. Setting up the USB key
  3. Making USB key bootable with rEFInd
  4. Adding live images in partitions and fine tuning

Downloads

  1. rEFInd binaries
  2. rEFInd bootable image
  3. Debian buster
  4. Debian bullseye
  5. ubuntu
  6. linux Mint
  7. Manjaro

1. What we have obtained

The following image is a picture of the laptop screen when booted on the external USB key. The following images and tools are available :

  • debian-gnome stable (buster) live
  • debian-gnome testing (bullseye) live
  • linuxMint 19.3-cinnamon live
  • ubuntu-19.10-desktop live
  • manjaro-gnome-19.0.2 live
  • information on rEFInd
  • EFI shell
  • rEFInd boot menu order
  • rEFInd installer
  • shutdown
  • reboot
  • setup

Écran de boot

2. Setting up the USB key

We need a bootable USB key, we will prepare an UEFI 64bit only key that will be used with EFI capable computers only ; if you need legacy boot with BIOS see this tutorial.

2.1 Creating partitions

The number of operating systems that can be installed depends on the size of the key. Live images are around 3 Gb each, to be prepared to any possible evolution we decided to build partitions of 5Gb plus an EFI partition of 100Mb. We built 5 partitions for distributions, one EFI partition and a partition to have persistence for some of the linuxes.

To create partitions we used gdisk on a clean USB key. Everything is erased on the key during this operation, be sure to make copies of the files you want to keep before starting the procedure. On our computer the USB key got mounted on /dev/sdg it might be on any value /dev/sdb, /dev/sdc, /dev/sdd, depending on your computer configuration. In the following lines we will use sdX to avoid any mistake by copy/paste operation. The partition number will be added after the X

sudo gdisk /dev/sdX
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present

# Create GPT partition table
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): Y

# Create EFI partition
Command (? for help): n
Partition number (1-128, default 1): 
First sector (34-30277598, default = 4096) or {+-}size{KMGTP}:     
Last sector (4096-30277598, default = 30277598) or {+-}size{KMGTP}: +100M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed type of partition to 'EFI System'

# Create microsoft partition (one for each distribution according to the room on the key)
Command (? for help): n
Partition number (2-128, default 2): 
First sector (34-30277598, default = 106496) or {+-}size{KMGTP}: 
Last sector (106496-30277598, default = 30277598) or {+-}size{KMGTP}: +5Gb
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 0700 
Changed type of partition to 'Microsoft basic data'

# Create ext4 partition for persistence
Command (? for help): n
Partition number (7-128, default 7): 
First sector (34-30277598, default = 8495104) or {+-}size{KMGTP}: 
Last sector (8495104-30277598, default = 30277598) or {+-}size{KMGTP}: 
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'

Écriture de la table de partitions
Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sdX.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.

2. Checking and formatting partitons

To check the structure and format the partitions use gparted

sudo gparted

Format the 6 first partitions in FAT32 and the last one in EXT4, provide labels for the 5 partitions that will receive live images, in our example we have choosen :

* Buster
* BullsEye
* Linux Mint
* Mageia
* Manjaro
* Ubuntu

It was not possible to get an operational Mageia, we were not able to find any grubx64.efi but we kept it in the structure.

We have now the necessary structure for our multiboot key.

lsblk -f  /dev/sdg 
NAME   FSTYPE FSVER LABEL       UUID       FSAVAIL FSUSE% MOUNTPOINT
sdg                                                                                 
├─sdg1 vfat   FAT32 EFI         *********  195,9M     1% /media/vidal/EFI
├─sdg2 ext4   1.0   buster      *********  770,4M    75% /media/vidal/buster
├─sdg3 ext4   1.0   bullseye    *********  938,1M    71% /media/vidal/bullseye
├─sdg4 ext4   1.0   linuxmint   *********    1,8G    48% /media/vidal/linuxmint
├─sdg5 ext4   1.0   mageia      *********    1,1G    65% /media/vidal/mageia
├─sdg6 ext4   1.0   manjaro     *********     1G    68% /media/vidal/manjaro
├─sdg7 ext4   1.0   ubuntu      *********    1,1G    67% /media/vidal/ubuntu
└─sdg8 ext4   1.0   persistence *********    4,2G     0% /media/vidal/persistence

3. Making USB key bootable with rEFInd

To get all the capabilities we need on our key we will download two files from rEFInd website :

sudo mkdir Refind
cd Refind
http://sourceforge.net/projects/refind/files/0.13.2/refind-bin-gnuefi-0.13.2.zip/download
http://sourceforge.net/projects/refind/files/0.13.2/refind-flashdrive-0.13.2.zip/download
unzip refind-flashdrive-0.13.2.zip
unzip refind-bin-gnuefi-0.13.2.zip
sudo gparted

We are going to use files from refind-bin-gnuefi-0.13.2/refind/drivers_x64/ which provide the necessary drivers

ls -1 refind-bin-gnuefi-0.13.2/refind/drivers_x64/
btrfs_x64.efi
ext2_x64.efi
ext4_x64.efi
hfs_x64.efi
iso9660_x64.efi
LICENSE_GPL.txt
LICENSE.txt
reiserfs_x64.efi

and files from the image from inside refind-flashdrive-0.12.0 :

 7z l refind-flashdrive-0.12.0/refind-flashdrive-0.12.0.img

.../...
   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2021-03-13 19:49:56 D....                            EFI
2021-03-13 19:49:56 D....                            EFI/boot
2021-03-13 19:49:56 D....                            EFI/tools
2021-03-13 19:49:56 ....A        34678        34816  EFI/boot/refind.conf
2021-03-13 19:49:56 D....                            EFI/boot/drivers_x64
2021-03-13 19:49:56 D....                            EFI/boot/drivers_aa64
2021-03-13 19:49:56 D....                            EFI/boot/icons
2021-03-13 19:49:56 ....A        34513        34816  EFI/boot/refind.conf-sample
2021-03-13 19:49:56 D....                            EFI/boot/drivers_ia32
2021-03-13 19:49:56 ....A       243712       243712  EFI/boot/bootaa64.efi
2021-03-13 19:49:56 ....A       269888       270336  EFI/boot/bootia32.efi
2021-03-13 19:49:56 ....A       254216       256000  EFI/boot/bootx64.efi
2021-03-13 19:49:56 ....A        63688        65536  EFI/boot/drivers_x64/btrfs_x64.efi
2021-03-13 19:49:56 ....A        24392        24576  EFI/boot/drivers_x64/hfs_x64.efi
2021-03-13 19:49:56 ....A        22600        24576  EFI/boot/drivers_x64/ext2_x64.efi
2021-03-13 19:49:56 ....A        22088        22528  EFI/boot/drivers_x64/iso9660_x64.efi
2021-03-13 19:49:56 ....A        25224        26624  EFI/boot/drivers_x64/reiserfs_x64.efi
2021-03-13 19:49:56 ....A        17992        18432  EFI/boot/drivers_x64/LICENSE_GPL.txt
2021-03-13 19:49:56 ....A         2094         4096  EFI/boot/drivers_x64/LICENSE.txt
2021-03-13 19:49:56 ....A        23048        24576  EFI/boot/drivers_x64/ext4_x64.efi
2021-03-13 19:49:56 ....A        23136        24576  EFI/boot/drivers_aa64/hfs_aa64.efi
2021-03-13 19:49:56 ....A        60832        61440  EFI/boot/drivers_aa64/btrfs_aa64.efi
2021-03-13 19:49:56 ....A        21696        22528  EFI/boot/drivers_aa64/ext2_aa64.efi
2021-03-13 19:49:56 ....A        24096        24576  EFI/boot/drivers_aa64/reiserfs_aa64.efi
2021-03-13 19:49:56 ....A        17992        18432  EFI/boot/drivers_aa64/LICENSE_GPL.txt
2021-03-13 19:49:56 ....A         2094         4096  EFI/boot/drivers_aa64/LICENSE.txt
2021-03-13 19:49:56 ....A        22176        22528  EFI/boot/drivers_aa64/ext4_aa64.efi
2021-03-13 19:49:56 ....A        20896        22528  EFI/boot/drivers_aa64/iso9660_aa64.efi
2021-03-13 19:49:56 ....A        11658        12288  EFI/boot/icons/os_frugalware.png
2021-03-13 19:49:56 ....A         6192         8192  EFI/boot/icons/os_artful.png
2021-03-13 19:49:56 ....A         1418         2048  EFI/boot/icons/vol_internal.png
2021-03-13 19:49:56 ....A         2479         4096  EFI/boot/icons/func_about.png
2021-03-13 19:49:56 ....A        13776        14336  EFI/boot/icons/os_chakra.png
2021-03-13 19:49:56 ....A         9754        10240  EFI/boot/icons/os_void.png
2021-03-13 19:49:56 ....A        15008        16384  EFI/boot/icons/os_centos.png
2021-03-13 19:49:56 ....A         3446         4096  EFI/boot/icons/tool_part.png
2021-03-13 19:49:56 ....A         3018         4096  EFI/boot/icons/tool_memtest.png
2021-03-13 19:49:56 ....A         3872         4096  EFI/boot/icons/os_win8.png
2021-03-13 19:49:56 ....A        10391        12288  EFI/boot/icons/os_chrome.png
2021-03-13 19:49:56 ....A        12854        14336  EFI/boot/icons/os_mandriva.png
2021-03-13 19:49:56 ....A         5555         6144  EFI/boot/icons/os_arch.png
2021-03-13 19:49:56 ....A        10097        10240  EFI/boot/icons/os_linux.png
2021-03-13 19:49:56 ....A         5980         6144  EFI/boot/icons/os_freebsd.png
2021-03-13 19:49:56 ....A         7229         8192  EFI/boot/icons/os_clover.png
2021-03-13 19:49:56 ....A        10574        12288  EFI/boot/icons/os_mac.png
2021-03-13 19:49:56 ....A         3772         4096  EFI/boot/icons/func_firmware.png
2021-03-13 19:49:56 ....A         1761         2048  EFI/boot/icons/func_csr_rotate.png
2021-03-13 19:49:56 ....A         8480        10240  EFI/boot/icons/os_crunchbang.png
2021-03-13 19:49:56 ....A         8763        10240  EFI/boot/icons/os_fedora.png
2021-03-13 19:49:56 ....A        11686        12288  EFI/boot/icons/os_unknown.png
2021-03-13 19:49:56 ....A         5072         6144  EFI/boot/icons/os_devuan.png
2021-03-13 19:49:56 ....A        12270        12288  EFI/boot/icons/os_ubuntu.png
2021-03-13 19:49:56 ....A         2208         4096  EFI/boot/icons/func_exit.png
2021-03-13 19:49:56 ....A         1346         2048  EFI/boot/icons/arrow_right.png
2021-03-13 19:49:56 ....A         3785         4096  EFI/boot/icons/tool_netboot.png
2021-03-13 19:49:56 ....A        13817        14336  EFI/boot/icons/tool_rescue.png
2021-03-13 19:49:56 ....A        10041        10240  EFI/boot/icons/os_redhat.png
2021-03-13 19:49:56 ....A         4313         6144  EFI/boot/icons/tool_windows_rescue.png
2021-03-13 19:49:56 ....A         9202        10240  EFI/boot/icons/os_slackware.png
2021-03-13 19:49:56 ....A        14836        16384  EFI/boot/icons/os_network.png
2021-03-13 19:49:56 ....A         9025        10240  EFI/boot/icons/os_xenial.png
2021-03-13 19:49:56 ....A        14608        16384  EFI/boot/icons/os_trusty.png
2021-03-13 19:49:56 ....A         7231         8192  EFI/boot/icons/os_refind.png
2021-03-13 19:49:56 ....A         7668         8192  EFI/boot/icons/os_systemd.png
2021-03-13 19:49:56 ....A         5620         6144  EFI/boot/icons/os_legacy.png
2021-03-13 19:49:56 ....A        14399        16384  EFI/boot/icons/os_hwtest.png
2021-03-13 19:49:56 ....A         2423         4096  EFI/boot/icons/vol_optical.png
2021-03-13 19:49:56 ....A         4507         6144  EFI/boot/icons/tool_apple_rescue.png
2021-03-13 19:49:56 ....A         2010         2048  EFI/boot/icons/tool_shell.png
2021-03-13 19:49:56 ....A         4398         6144  EFI/boot/icons/func_install.png
2021-03-13 19:49:56 ....A         5177         6144  EFI/boot/icons/tool_fwupdate.png
2021-03-13 19:49:56 ....A         4846         6144  EFI/boot/icons/mouse.png
2021-03-13 19:49:56 ....A        10547        12288  EFI/boot/icons/os_xubuntu.png
2021-03-13 19:49:56 ....A         9377        10240  EFI/boot/icons/os_debian.png
2021-03-13 19:49:56 ....A         6246         8192  EFI/boot/icons/os_linuxmint.png
2021-03-13 19:49:56 ....A        12873        14336  EFI/boot/icons/os_kubuntu.png
2021-03-13 19:49:56 ....A         1974         2048  EFI/boot/icons/tool_mok_tool.png
2021-03-13 19:49:56 ....A        12379        14336  EFI/boot/icons/os_netbsd.png
2021-03-13 19:49:56 ....A         1892         2048  EFI/boot/icons/vol_net.png
2021-03-13 19:49:56 ....A         5830         6144  EFI/boot/icons/os_haiku.png
2021-03-13 19:49:56 ....A         8484        10240  EFI/boot/icons/os_refit.png
2021-03-13 19:49:56 ....A         1344         2048  EFI/boot/icons/vol_external.png
2021-03-13 19:49:56 ....A         2760         4096  EFI/boot/icons/func_shutdown.png
2021-03-13 19:49:56 ....A         6349         8192  EFI/boot/icons/README
2021-03-13 19:49:56 ....A         6572         8192  EFI/boot/icons/os_opensuse.png
2021-03-13 19:49:56 ....A         1890         2048  EFI/boot/icons/os_manjaro.png
2021-03-13 19:49:56 ....A         6565         8192  EFI/boot/icons/os_win.png
2021-03-13 19:49:56 ....A         2602         4096  EFI/boot/icons/func_reset.png
2021-03-13 19:49:56 ....A         1392         2048  EFI/boot/icons/arrow_left.png
2021-03-13 19:49:56 ....A         7549         8192  EFI/boot/icons/os_gentoo.png
2021-03-13 19:49:56 ....A         5371         6144  EFI/boot/icons/os_zesty.png
2021-03-13 19:49:56 ....A        16482        18432  EFI/boot/icons/os_elementary.png
2021-03-13 19:49:56 ....A         6572         8192  EFI/boot/icons/os_suse.png
2021-03-13 19:49:56 ....A         6958         8192  EFI/boot/icons/os_bionic.png
2021-03-13 19:49:56 ....A         7783         8192  EFI/boot/icons/os_mageia.png
2021-03-13 19:49:56 ....A        11232        12288  EFI/boot/icons/os_lubuntu.png
2021-03-13 19:49:56 ....A         3766         4096  EFI/boot/icons/boot_win.png
2021-03-13 19:49:56 ....A         9077        10240  EFI/boot/icons/boot_linux.png
2021-03-13 19:49:56 ....A        11777        12288  EFI/boot/icons/vol_efi.png
2021-03-13 19:49:56 ....A        13342        14336  EFI/boot/icons/os_uefi.png
2021-03-13 19:49:56 ....A         6930         8192  EFI/boot/icons/func_bootorder.png
2021-03-13 19:49:56 ....A          213         2048  EFI/boot/icons/transparent.png
2021-03-13 19:49:56 ....A         7161         8192  EFI/boot/icons/func_hidden.png
2021-03-13 19:49:56 ....A         7668         8192  EFI/boot/icons/os_gummiboot.png
2021-03-13 19:49:56 ....A        59456        61440  EFI/boot/drivers_ia32/btrfs_ia32.efi
2021-03-13 19:49:56 ....A        23360        24576  EFI/boot/drivers_ia32/reiserfs_ia32.efi
2021-03-13 19:49:56 ....A        22784        24576  EFI/boot/drivers_ia32/hfs_ia32.efi
2021-03-13 19:49:56 ....A        17992        18432  EFI/boot/drivers_ia32/LICENSE_GPL.txt
2021-03-13 19:49:56 ....A         2094         4096  EFI/boot/drivers_ia32/LICENSE.txt
2021-03-13 19:49:56 ....A        21184        22528  EFI/boot/drivers_ia32/ext4_ia32.efi
2021-03-13 19:49:56 ....A        20608        22528  EFI/boot/drivers_ia32/ext2_ia32.efi
2021-03-13 19:49:56 ....A        20224        20480  EFI/boot/drivers_ia32/iso9660_ia32.efi
2021-03-13 19:49:56 ....A       792064       792576  EFI/tools/gdisk_x64.efi
2021-03-13 19:49:56 ....A        32384        32768  EFI/tools/gptsync_ia32.efi
2021-03-13 19:49:56 ....A       922272       923648  EFI/tools/shellx64.efi
2021-03-13 19:49:56 ....A       810496       811008  EFI/tools/shellia32.efi
2021-03-13 19:49:56 ....A        31688        32768  EFI/tools/gptsync_x64.efi
------------------- ----- ------------ ------------  ------------------------
2021-03-13 19:49:56            4555179      4669440  110 files, 7 folders

Create temporary folders to mount the partitions of the USB key

for i in 2 3 4 5 6 7; do sudo mkdir /mnt/disk$i; done

3.1 Creating and filling folders in EFI partition

mount EFI partition on /mnt/disk1 then create folders to host rEFInd

sudo mount /dev/sdX1 /mnt/disk1
cd /mnt/disk1
sudo mkdir -p EFI/BOOT EFI/TOOLS

We use upper case to keep in mind that EFI is a DOS like environment folder names do not make difference between lower and upper case

Fill the folders with the appropriate data

cd Refind 
cp refind-flashdrive-0.12.0/EFI/tools/*x64.efi /mnt/disk1/EFI/TOOLS
cp -r refind-bin-gnuefi-0.13.2/refind/drivers_x64 /mnt/disk1/EFI/BOOT
cp -r refind-bin-gnuefi-0.13.2/refind/icons  /mnt/disk1/EFI/BOOT
cp refind-bin-gnuefi-0.13.2/refind/refind.conf-sample  /mnt/disk1/EFI/BOOT
cp refind-bin-gnuefi-0.13.2/refind/refind.conf-sample  /mnt/disk1/EFI/BOOT/refind.conf
cp refind-bin-gnuefi-0.13.2/refind/refind_x64.efi /mnt/disk1/EFI/BOOT/bootx64.efi

The USB keyis now ready to boot but to get a multiboot key we have to configure rEFInd and provide live linux images.

3.2 Configuring rEFInd

To configure rEFInd we need to provide Ad-Hoc parameters in refind.conf configuration file to enable bootx64.efi find all the linux loaders we want to use. The following configuration file is an example corresponding to our situation; you will have to change the configuration according to the number and names of distributions. We have been able to install : * debian buster * debian bullseye * ubuntu * linuxMint * Manjaro (with a trick)

We keep a timeout that enable an automatic boot with the first bootloader debian buster in thiscase, we enable the mouse driver but it may not work in some computers in that case use the arrows to navigate between the possible choices the tabkey displays the possible option if some exists.Scanning "manual" enables to choose only the bootloaders choosen and not scan automatically all disks for bootloaders.

There is a menuentry for each linux distribution, after having many trouble in installing manual stanzas we relied on automatic scanning from refind. Icons displayed on the rEFInd homepage are copied from the EFI partition on the linux live partition

Here is the refind.conf file which has been tested :

#
timeout 20

use_nvram false

enable_mouse

showtools shell, bootorder, gdisk, memtest,  about, hidden_tags, reboot, exit, firmware, fwupdate

scanfor external, manual

Very simple config file to take full advantage of rEFInd autoscan capabilities

4. Adding live images in partitions and fine tuning

Last step is to copy on the USB key the live distributions we have choosen and prepared in the refind.conffile. We suppose al the live distributions you want to use have been dowloaded; for us we have the following images located at /date/IsoImages :

ls -1
debian-live-10.6.0-amd64-gnome+nonfree.iso
debian-live-testing-amd64-gnome+nonfree.iso
linuxmint-20-cinnamon-64bit.iso
Mageia-7.1-Live-GNOME-x86_64.iso
manjaro-gnome-20.1.1-201001-linux58.iso
ubuntu-20.04.1-desktop-amd64.iso

Each of these images will be copied on the USB key partitions /dev/sdX2, /dev/sdX3, /dev/sdX4, /dev/sdX5, /dev/sdX6. The situation is different for distributions of the debian family and others. We did not succed to add a Mageia distribution and used a dirty trick to force Manjaro in.

4.1 Dealing with the debian family

As we have seen previously in the configuration file we use the default grub loader for all the debian family images, we just have to copy the iso image contents on the choosen partition. For Buster image we have created the partition with the following parameters :

PARTUUID                             PARTLABEL            UUID
bfb2657a-1896-4783-a8fe-xxxxxxxxxxxx Buster               B475-####

By default on a debian system it is mounted on /media/user/B475-#### you may use this value or mount it on the hook you prepared at the beginning

sudo umount /dev/sdx2 
sudo mount /dev/sdx2  /mnt/disk2

It is possible to mount all the 5 partitions at once :

for i in 2 3 4 5 6 ; do sudo umount /dev/sdg$i; sudo mount /dev/sdg$i /mnt/disk$i; done
sudo 7z x /data/IsoImages/debian-live-10.6.0-amd64-gnome+nonfree.iso -o/mnt/disk2
sudo 7z x /data/IsoImages/debian-live-testing-amd64-gnome+nonfree.iso -o/mnt/disk3
sudo 7z x /data/IsoImages/manjaro-gnome-20.1.1-201001-linux58.iso -o/mnt/disk4
sudo 7z x /data/IsoImages/ubuntu-20.04.1-desktop-amd64.iso -o/mnt/disk5

Check that after uncompressing and copying the images the efi grub executables are in the correct folder : * debian buster -> /mnt/disk2/EFI/boot/grubx64.efi * debian bullseye -> /mnt/disk3/EFI/boot/grubx64.efi * ubuntu -> /mnt/disk4/EFI/BOOT/grubx64.efi * linuxMint -> /mnt/disk5/EFI/BOOT/grubx64.efi

Check that the initial grub.cfg that detects the partition and starts the booting process is in the same folder /EFI/boot/ or /EFI/BOOT, if another folder named debian exists beside the boot folder it must contain the same grub.cfg. The grub.cfg file must be in the form :

search --label --set=root LABEL_GIVEN_TO_THE_PARTITION
set prefix=($root)/boot/grub
source $prefix/x86_64-efi/grub.cfg

check that /boot/grub/x86_64-efi/grub.cfg exists and sends to the next step :

cat ../../boot/grub/x86_64-efi/grub.cfg
insmod part_acorn
insmod part_amiga
insmod part_apple
insmod part_bsd
insmod part_dfly
insmod part_dvh
insmod part_gpt
insmod part_msdos
insmod part_plan
insmod part_sun
insmod part_sunpc
source /boot/grub/grub.cfg

For debian images change the search mode of the partitiion by labelinstead of file replace the first line of /EFI/debian/grub.cfg

search --label --set root bullseye

The four images belonging to the debian family are ready to boot from rEFInd

4.2 Handling Manjaro case

"Manjaro" is said to be an "easy to use" linux Arch version, the boot process differs from debian; it is loaded directly through the vmlinuz and the initramfsfrom the distribution. The name of the rootfs is retrieved from options and by default the loader looks for it using by-labelmethod.

It is interesting to point out here that as long as the grub files (debian family) or initramfs and vmlinuz (Arch family) are provided in their default place, it is possible to reinstall or change the version of the distribution without changing anything else except the ̀Labels in the config files. There is no need to change the structure or the contents of the EFI partition and rEFInd configuration to change the version of any linux live distribution on the USB multiboot key.


Commentaires