To add a Debian entry to the GRUB bootloader on an Arch Linux system, you must configure grub-mkconfig to detect other operating systems by editing /etc/default/grub. Set the GRUB_DISABLE_OS_PROBER=false variable, as modern GRUB versions disable OS detection by default for security reasons. After saving the configuration, run sudo grub-mkconfig -o /boot/grub/grub.cfg (or the EFI equivalent path) to regenerate the menu.
Understanding the OS Prober Security Feature
The primary reason Debian fails to appear in the Arch GRUB menu is not a broken installation or incorrect partitioning, but a deliberate security feature introduced in recent versions of GRUB. Theos-prober tool is responsible for scanning disks for other operating systems and generating menu entries. However, due to vulnerabilities where malicious bootloaders could exploit the probing process, upstream GRUB developers disabled this functionality by default in many distributions, including Arch Linux.
When you install Debian alongside Arch, the Debian installer correctly configures its own bootloader. If Debian was installed after Arch, it might have overwritten your Arch GRUB configuration. If Arch was installed last, it likely reset the configuration without probing the Debian partition. You do not need to reinstall GRUB manually or edit complex scripts. The solution lies in re-enabling the automatic detection mechanism through the main configuration file. This approach is safer and more maintainable than creating custom static entries, which break every time the kernel updates. For more context on GRUB behavior changes, see our article on Fixing Boot Issues with Bootloader (Grub) on Arch Linux.
Enabling OS Detection in Arch Linux
To resolve the missing Debian entry, you need to modify the default GRUB environment variables. This process involves editing a single text file that controls how GRUB behaves during configuration generation. First, open the GRUB default configuration file using your preferred text editor with root privileges. In Arch Linux, this file is located at/etc/default/grub. Use a command such as:
sudo nano /etc/default/grub
Once the file is open, locate the line that begins with GRUB_DISABLE_OS_PROBER. It may be commented out with a hash symbol (#) or set to true. You must change this value to false. If the line does not exist, you can add it manually. The final line should look exactly like this:
GRUB_DISABLE_OS_PROBER=false
This setting tells GRUB to allow the os-prober utility to scan for other operating systems despite the default security restrictions. Save the file and exit the editor. It is critical to ensure there are no trailing spaces or syntax errors in this line, as they will prevent GRUB from loading correctly.
Regenerating the GRUB Configuration
After enabling the OS prober, you must apply the changes by regenerating the GRUB configuration file. Simply rebooting will not work because the current running GRUB configuration remains unchanged until explicitly updated. Run the following command in the terminal:sudo grub-mkconfig -o /boot/grub/grub.cfg
On UEFI systems, the output path might differ slightly depending on your mount points, but /boot/grub/grub.cfg is the standard location for most Arch installations. If your system uses a separate EFI System Partition mounted at /efi, the command would be:
sudo grub-mkconfig -o /efi/grub/grub.cfg
During execution, grub-mkconfig will invoke os-prober. You should see output indicating that it has detected the Debian installation. Look for lines mentioning "Debian GNU/Linux" in the terminal output. If successful, the new GRUB configuration file will contain a section for Debian, complete with the correct kernel paths and initramfs images.
If you encounter warnings about secure boot, note that disabling OS prober does not affect Secure Boot status. However, if Secure Boot is enabled, ensure that your Debian kernel is signed or that you have enrolled the necessary keys, although this is less common in dual-boot setups where one OS is primarily used for development. For issues regarding video modes in GRUB, check our guide on Grub Not Showing Support for Possible Video Modes on Debian 12.
Verifying the Installation
Reboot your computer to verify that the Debian entry now appears in the GRUB menu. Select the Debian option to ensure it boots correctly. If Debian fails to boot, the issue is likely related to kernel parameters or filesystem mounting rather than the GRUB entry itself. Check the Debian system logs for errors. In rare cases,os-prober might fail to detect Debian if the partition types are obscure or if the Debian installation is on a logical volume within LVM. In such scenarios, manual entry creation via /etc/grub.d/40_custom might be necessary, but this should be a last resort. Most standard ext4 or btrfs partitions are detected automatically once the prober is enabled.
Frequently Asked Questions
Will enabling os-prober expose my system to security risks?
Yes, theoretically, because it allows the bootloader to execute code from other partitions. However, the risk is minimal on trusted local drives compared to network-exposed services. The security community recommends keeping this disabled unless you actively need multi-boot capabilities, in which case the convenience outweighs the theoretical risk.How do I update GRUB after installing a new kernel in Arch?
You should always runsudo grub-mkconfig -o /boot/grub/grub.cfg after kernel updates to ensure the new kernel is available in the boot menu. Many users automate this with hooks, but manual execution guarantees that both the Arch and Debian entries reflect the latest system state accurately.
What if os-prober still does not find Debian?
Ensure that the Debian partition is formatted with a supported filesystem like ext4 or btrfs. If Debian is on a logical volume manager (LVM) setup, you may need to activate the volume group first. You can test detection manually by runningsudo os-prober to see if it outputs the Debian path before regenerating the full config.
Can I use rEFInd instead of GRUB for dual-booting?
rEFInd is an excellent alternative for dual-booting Arch and Debian because it automatically detects kernels without needing OS prober hacks. It provides a graphical interface and handles multiple operating systems seamlessly. Installing rEFInd replaces the need for manual GRUB configuration entirely.Does this method work for Windows dual-boot as well?
Yes, enablingGRUB_DISABLE_OS_PROBER=false works for any operating system detected on your disk, including Windows 10 or 11. This is the same fix applied when adding Windows to an existing Linux installation. See our related guide on Dual Boot Windows 10 and Arch Linux on Lenovo T430 with GRUB for similar configurations.