Dual Boot Debian Versions - EFI

Kernels & Hardware, configuring network, installing services

Dual Boot Debian Versions - EFI

Postby k829king » 2020-07-26 11:57

What steps should I take to dual boot multiple Debian versions on the one EFI system?
I currently have a Buster based version BUT it has a mess/mixture of Backports packages (as a result of following some instructions to get an updated kernel).
** I need to keep it running as is for now as my main workspace.
I've got plenty of unallocated space on the main drive so would like to install a fresh copy of Buster and avoid backports and over period of time I will install everything I need to make it my main space.
And I would also like to install Bullseye or Sid.
If I can use the one swap space for all would be preferable.
On a previous unit I tried to have Deb 9 and 10 dual boot but had issues with Grub and the swap space.
k829king
 
Posts: 59
Joined: 2018-08-26 09:47

Re: Dual Boot Debian Versions - EFI

Postby p.H » 2020-07-26 12:57

Issues with swap and GRUB are to be expected.

1) Shared swap :
Warning : if you mark an existing swap area "use as swap" in the Debian installer, it will be reformatted with a new UUID. If an existing Debian installation uses the UUID to identify the swap (default with a swap partition), it will have trouble.
Things to know :
- Hibernation must be used with extreme caution when using a shared swap : make sure the system which is booted next is the one which went into hibernation.
- On GPT (recommended with EFI boot), a swap partition is used automatically even if not defined in fstab when no swap is explicitly defined. So my advice is to mark the existing swap partition "do not use this partition"
- By default, a swap area in an LVM logical volume is identified by its LVM device name (stable, unlike partition device names), not its UUID, so it does not matter if its UUID changes.

2) GRUB
Any installation of a Debian instance will use the same name "debian" in the EFI partition and in the EFI boot entries in UEFI NVRAM.
Note that the Debian installer installs a GRUB flavour which is signed for UEFI secure boot (grub-signed). This flavour is hardcoded to use the directory name "debian" in the EFI directory and won't work if installed with another name using
Code: Select all
grub-install --bootloader-id <name>

You could use a separate EFI partition for each installation so that each one can have its own "debian" directory but the latest installation (and re-installation or upgrade) will still overwrite the unique "debian" EFI boot entry in UEFI NVRAM.
If you do not use secure boot, the unsigned flavour of GRUB can be installed with any name.

If you want GRUB to be managed by your main Debian instance, you have to reinstall it from that instance each time after installing a new instance. You could skip the installation of GRUB to avoid this, but it has issues too due to the missing /boot/grub/grub.cfg.
p.H
 
Posts: 1422
Joined: 2017-09-17 07:12


Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable