Linux Add Boot Option In Grub2

You can add boot option for Grub2 for Ubuntu by editing the 40_custom file.

sudo gedit /etc/grub.d/40_custom

Append the following line

menuentry "Ubuntu Mymod" {
 recordfail
 insmod ext2
 set root='(hd3,1)'
 linux /boot/vmlinuz-2.6.32-21-generic-pae root=UUID=c01e7d24-fc8c-4498-86a2-ad0ea8d1d4ec ro quiet splash acpi=off noapic nolapic
 initrd /boot/initrd.img-2.6.32-21-generic-pae 
}

Modify for your own use e.g. the set root if it’s located different or match the system by disabling some of the boot options like ““acpi=off noapic nolapic

Last we need to set the permission with chmod and update. Add permissions:

sudo chmod +x /etc/grub.d/40_custom

Update the boot loader

sudo update-grub
Posted in Linux, Tips and Tricks Tagged with: , , ,