We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Manually add menu entry to GRUB2 menu on Arch Linux

Learn how to – Manually add menu entry to GRUB2 menu on Arch Linux.

As I’ve made Arch Linux my Primary OS, I was faced with a task of adding a Menu Entry to GRUB2 so that I could boot into my secondary OS ( Gentoo), by just selecting which one to boot to on Grub2 menu. This will work for any Linux distribution you want to dual boot with Arch Linux.

First, check the UUID of the root partition that belongs to Linux os you would like to add to grub entry. Use blkid command:

sudo blkid

Uuid for the root partition of my Gentoo is 242a7abb-3547-4504-a9f8-bfbc479a3f0e
Now mount root partiton for that Linux system and check the name of executable Linux kernel under /boot directory.
Once you have that two information that we need, we can now configure Grub menu entry.

sudo vim /etc/grub.d/40_custom

Then add the following lines according to your specifications.

menuentry "Gentoo Linux" {
    search --set=root --fs-uuid 242a7abb-3547-4504-a9f8-bfbc479a3f0e
  linux /boot/vmlinuz-* root=UUID=242a7abb-3547-4504-a9f8-bfbc479a3f0e rw  quiet
}

Replace 242a7abb-3547-4504-a9f8-bfbc479a3f0e with root partition’s uuid for one you’re adding, and /boot/vmlinuz-* with the location of your executable linux file.

Then update grub to generate a new grub.conf file.

sudo grub-mkconfig -o /boot/grub/grub.cfg

That’s all. You should see the entry on grub menu when you reboot, You may also look at:

Cart

Your Cart is Empty

Back To Shop