0

Whenever I boot my laptop, the grub terminal comes up and I have to input the following three lines to boot into my OS:

linux (hd0,msdos1)/vmlinuz root=/dev/sda1
initrd (hd0,msdos1)/initrd.img
boot

What options should I add to /etc/default/grub so that grub wouldn't need manual input at boot?

1 Answers1

1

This is not something you can change in /etc/default/grub, you need to add a new entry to the GRUB menu. Create a file /etc/grub.d/09_custom with these contents:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'Ubuntu' {
    linux (hd0,msdos1)/vmlinuz root=/dev/sda1
    initrd (hd0,msdos1)/initrd.img
}

Make it executable

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

and run sudo update-grub. This should add a new entry at the top of the GRUB config file, so when you reboot it should be booted automatically by default.

To reverse the changes, delete 09_custom and re-run sudo update-grub.

fkraiem
  • 12,813