0

I accidentally changed my GRUB options to boot from memtest instead of the correct linux kernel. Holding shift, esc, arrow keys, and every other combination will not bring up the GNU GRUB as desired. Is there any other option besides reinstalling and starting over with a new linux version?

kiri
  • 28,246
  • 16
  • 81
  • 118

1 Answers1

0
  1. You need to boot from a LiveCD/USB.
  2. Locate your original root partition using GParted. take note of it's name (e.g.: /dev/sda1).
  3. Run these commands, replace $PARTITION with your partition (noted above)

    sudo mkdir /mnt 
    sudo mount "$PARTITION" /mnt
    sudo -H gedit /mnt/etc/default/grub
    
  4. A text editor will open the GRUB configuration file. Correct any problems, e.g.: GRUB_DEFAULT, then save and close the window.

  5. Run these commands in a terminal:

    for i in sys proc run dev; do sudo mount --bind "/$i" "/mnt/$i"; done
    sudo chroot /mnt
    update-grub
    exit
    
  6. At this point your GRUB should be fixed.

kiri
  • 28,246
  • 16
  • 81
  • 118