0

Is it at all possible for me to add a menu entry in this version of GRUB2? All solutions that I have been able to find online involve editing 40_custom, but gedit, vim, etc are all legacy GRUB commands and aren't found.

I looked through the documentation to no avail: http://www.gnu.org/software/grub/manual/grub.html#Command_002dline-and-menu-entry-commands

Problem:

  • my Ubuntu partition isn't showing in the menu options even though I can see the partition it using ls in the grub shell and ls -lh tells me it's a filesystem
  • I would really like to be able to access my Ubuntu again.
Rod Smith
  • 45,120
  • 7
  • 66
  • 108

1 Answers1

0

There are no menu items for Ubuntu because all copies of the Linux kernel have been deleted from /boot. You can reinstall the kernel as follows:

Boot your computer from an Ubuntu DVD or live-USB, then choose "Try Ubuntu". Once in the Ubuntu session, connect to the internet, open a terminal (Ctrl+Alt+T) and start from step 1 of the instructions at https://askubuntu.com/a/28100/425479.

Note that for step 2 the exact command in your case is:

sudo mount /dev/sda5 /mnt

For step 5, if you have problems with internet only during this step, open a different terminal and type in it:

sudo cp /mnt/etc/hosts /mnt/etc/hosts.old
sudo cp /etc/hosts /mnt/etc/hosts
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
exit

then try again.

By the start of step 7, Ubuntu will have been added to the Grub menu again, ready for the reboot.

Martin Thornton
  • 5,996
  • 12
  • 32
  • 43