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
3.2.0-24-generic
Milosz Galazka's Picture

About Milosz Galazka

Milosz is a Linux Foundation Certified Engineer working for a successful Polish company as a system administrator and a long time supporter of Free Software Foundation and Debian operating system. He is also open for new opportunities and challenges.

Gdansk, Poland https://sleeplessbeastie.eu