[websites/linux-kde-org] content: Add documentation on switching between KDE Linux and another OS easily
Hadi Chokr <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 12fd93fd8b5688541a9d599650df552d4124ded0 by Hadi Chokr. Committed on 31/07/2026 at 14:35. Pushed by ngraham into branch 'master'. Add documentation on switching between KDE Linux and another OS easily Co-authored-by: Nate Graham <[email protected]> Signed-off-by: Hadi Chokr <[email protected]> M +1 -0 content/docs.md A +104 -0 content/docs/dual-boot.md https://invent.kde.org/websites/linux-kde-org/-/commit/12fd93fd8b5688541a9d599650df552d4124ded0 diff --git a/content/docs.md b/content/docs.md index cad2d6c..b0eed46 100644 --- a/content/docs.md +++ b/content/docs.md @@ -15,6 +15,7 @@ Life on a cutting-edge image-based OS can be unfamiliar! This page contains info * [Install on a device](install) * [Install in a virtual machine](install-vm) * [Install using Ventoy](ventoy) +* [Switch between KDE Linux and another operating system (“dual-boot”)](dual-boot) ## Apps & system updates diff --git a/content/docs/dual-boot.md b/content/docs/dual-boot.md new file mode 100644 index 0000000..684a214 --- /dev/null +++ b/content/docs/dual-boot.md @@ -0,0 +1,104 @@ +--- +authors: + - SPDX-FileCopyrightText: 2026 Hadi Chokr <[email protected]> +SPDX-License-Identifier: CC-BY-4.0 + +title: "Switch Between KDE Linux and Another Operating System" +scssFiles: [/scss/main.scss] +hideMeta: true +--- + +If you have KDE Linux installed alongside another Linux-based operating system, you can normally reach both of them through your computer’s firmware boot menu — the one you get by pressing a key such as <kbd>F12</kbd> while the machine starts up. + +That works, but it means catching a key press within a second or two on every restart. This page describes how to add an entry for each system to the *other* system’s boot menu, so you can switch between them from a menu that waits for you. + +{{< section class="text-center warning-bubble" >}} +This page does **not** explain how to install two operating systems side by side. It assumes you already have both installed and working, both installed in UEFI mode, and sharing the same EFI System Partition (ESP). Note that [installing KDE Linux to anything other than an entire disk](install/#4-explore-the-live-session-and-install-kde-linux) is known to fail under certain circumstances and is not a formally supported configuration yet. +{{< /section >}} + + +## Which system am I typing this on? +Each section below is labelled with the system its commands belong on, because the two are not interchangeable: + +- **On KDE Linux**, administrator commands use <code>run0</code>, as everywhere else in this documentation. +- **On the other system**, they most likely use <code>sudo</code> instead, and file locations vary by distribution. + +Running a command on the wrong system will at best do nothing. + + +## If the other system also uses systemd-boot +There is usually nothing to set up. systemd-boot finds entries by looking at the ESP, so if both systems write to the same one, both should already appear in the same menu. + +To check, run the following **on KDE Linux or the other system**: + +<pre> +bootctl list +</pre> + + +## If the other system uses GRUB +GRUB and systemd-boot do not see each other automatically, so an entry has to be added on each side. + +### Add KDE Linux to GRUB’s menu +*Do this **on the other system**, the one that uses GRUB.* + +Add the following to <code>/etc/grub.d/40_custom</code>, below the lines that are already there: + +<pre> +menuentry "systemd-boot" --class systemd { + insmod part_gpt + insmod fat + insmod chain + search --no-floppy --file --set=root /EFI/systemd/systemd-bootx64.efi + chainloader /EFI/systemd/systemd-bootx64.efi +} +</pre> + +Nothing in there needs to be adjusted: <code>bootctl</code> always installs systemd-boot at that same path, whichever distribution it was run on. + +Then make the file executable and regenerate GRUB’s configuration: + +<pre> +sudo chmod +x /etc/grub.d/40_custom +sudo grub-mkconfig -o /boot/grub/grub.cfg +</pre> + +Some distributions name these differently — for example <code>grub2-mkconfig</code> and <code>/boot/grub2/grub.cfg</code> on Fedora and openSUSE. Check what your distribution uses. + +### Add GRUB to KDE Linux’s menu +*Do this **on KDE Linux**.* + +For this direction you first need to know where GRUB lives on the ESP. There is no single answer: every distribution picks its own directory name there, so this has to be looked up rather than copied. + +To find it: + +<pre> +run0 find /boot -name 'grub*.efi' 2>/dev/null +</pre> + +Take the result and drop everything before <code>/EFI</code>. If you get <code>/boot/EFI/debian/grubx64.efi</code>, the path you want is <code>/EFI/debian/grubx64.efi</code>. + +If Secure Boot is enabled, look in that same directory for <code>shimx64.efi</code> and use that path instead, if there is one. Not every distribution ships one. + +Now open a text editor, create a file called <code>grub.conf</code> in your home directory, and put this in it: + +<pre> +title GRUB ([name for the other OS goes here]) +efi [path to the EFI file goes here, e.g. /EFI/debian/grubx64.efi] +sort-key zz-grub +</pre> + +Replace the part in the first line with whatever you would like the entry to be called in the menu, and the part in the second line with the path you just looked up. Then move the file into place: + +<pre> +run0 mv ~/grub.conf /boot/loader/entries/grub.conf +</pre> + +<code>bootctl list</code> should now show it, and it will appear at the bottom of the boot menu on the next restart. + + +## Notes +- If each menu’s default entry is the *other* bootloader, give at least one a non-zero timeout, or you will bounce between them like in a particle accelerator. So avoid doing that. +- A shared ESP holds kernels for both systems, so it can fill up. <code>df -h /boot</code> is worth a look if updates start failing. +- Updates on either system can change the firmware boot order or remove entries. If something changes unexpectedly, <code>efibootmgr -v</code> and <code>bootctl list</code> are good places to start looking. +- If the two systems have separate ESPs, the GRUB side may still work, but the systemd-boot side generally will not, since it can only load files from its own ESP.