GRUB Dual-booting Arch & Debian: Unable to Add Debian Entry
Dual-booting two Linux distributions on the same machine can be a challenging task, especially when it comes to configuring the bootloader. In this article, we will cover the process of dual-booting Arch Linux and Debian 12, with a focus on how to properly configure the GRUB bootloader to include both operating systems in the boot menu.
Prerequisites
Before we begin, it is assumed that you have successfully installed Arch Linux on one partition (e.g. /dev/sda3) and Debian 12 on another partition (e.g. /dev/sda4) on the same hard drive. It is also assumed that the ESP (EFI System Partition) is mounted at /boot on the Arch Linux partition (/dev/sda1).
Configuring GRUB
To add an entry for Debian in the GRUB bootloader, we need to edit the GRUB configuration file. This file is located at /boot/grub/grub.cfg on Arch Linux.
# nano /boot/grub/grub.cfg
Add the following entry at the end of the file:
menuentry "Debian" {
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
linux /vmlinuz-5.10.0-9-amd64 root=/dev/sda4 ro quiet
initrd /initrd.img-5.10.0-9-amd64
}
This entry tells GRUB to load the Debian kernel and initramfs from the /vmlinuz-5.10.0-9-amd64 and /initrd.img-5.10.0-9-amd64 files respectively, which are located in the root directory of the Debian partition (/dev/sda4).
Testing the Configuration
To test the new GRUB configuration, reboot the machine and select the "Debian" entry from the GRUB boot menu. If everything is configured correctly, the Debian operating system should load without any issues.
Troubleshooting
If you are unable to add the Debian entry to the GRUB bootloader, there are a few things you can check:
- Make sure the ESP is mounted at /boot on the Arch Linux partition.
- Check that the Debian kernel and initramfs files are located in the root directory of the Debian partition.
- Make sure the partition numbers in the GRUB configuration file match the actual partition numbers on your hard drive.
Dual-booting Arch Linux and Debian can be a complex task, but with the right configuration, it is possible to have both operating systems running smoothly on the same machine. By following the steps outlined in this article, you should be able to add a Debian entry to the GRUB bootloader and boot into Debian without any issues.
References
--endarticle--