0

I have change the GRUB_DEFAULT from 0 to 2 in /etc/default/grub and since then I cant launch Ubuntu 14.04 anymore. While booting, the computer restart after 5-10 seconds and then, it enter the BIOS setup.

How can I restore the grub now? My only option to launch ubuntu is through the tryout on a usb flash drive I used to install it in first time.

Help would be really appreciated!

4
  • Can you get to the screen where you select Ubuntu , Advanced Settings for Ubuntu, and memtest ? Can you enter it if you hold shift key ? Mar 22, 2015 at 1:36
  • no it restart and enter the BIOS before that Mar 22, 2015 at 1:47
  • 1
    You will have to boot a live CD and fix it. boot-repair will probably fix it for you
    – Panther
    Mar 22, 2015 at 1:53
  • @bodhi.zazen yup, cuz he cant even get to recovery mode Mar 22, 2015 at 1:56

1 Answer 1

1

Since you cannot enter Advanced Options menu during boot and then into recovery mode, you will have to recover your system through live USB or cd. Load it, enter tty1 by pressing CtrlAltF2 or open terminal in the live-session (Try Ubuntu option).

Next mount your Ubuntu partition with

sudo mount /dev/sdax /mnt, where x is the number of your Ubuntu partition, (use lsblk command to identify it by size, most likely it is 3 or 5).

Next, sudo chroot /mnt. At this point you should be able to navigate to /etc/default/grub and edit it back to normal.

Refer to this guide for more info:https://help.ubuntu.com/community/LiveCdRecovery

4
  • in case you need read write permissions for the mounted partition, command mount -o remount,rw / should help you with that Mar 22, 2015 at 1:58
  • Thanks a lot, with your help I have restored my original grub file but ubuntu was'nt still booting, so I used boot-repair and it have fixed the problem. Mar 22, 2015 at 14:06
  • 1
    It wasn't booting, because after you edit the grub file, you have to do update-grub command. Glad you got the system back,though ! Mar 22, 2015 at 19:42
  • yes I did forgot that! Mar 23, 2015 at 0:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .