Ubuntu - How to add custom grub entry?

Edit /etc/grub.d/40_custom file to add custom entry in grub2 menu (this is just an example):

menuentry "Live" {
 set root='(hd0,1)'
 linux /boot/vmlinuz-3.2.0-24-generic boot=live toram=fs.squashfs
 initrd /boot/initrd.img-3.2.0-24-generic

After applying changes update grub configuration:

# update-grub

To print kernel release use uname command:

$ uname -r
Milosz Galazka's Picture

About Milosz Galazka

Milosz is a system administrator working for a successful Polish company and a long time supporter of Free Software Foundation and Debian operating system.

Gdansk, Poland https://sleeplessbeastie.eu