5

I use Ubuntu 14.04 (alone, no dual boot) and today it installed a new kernel (3.13.0-49). For some reason, it did not work well with my system, the mouse did not respond, and neither did my network. So I booted using an older kernel (3.13.0-37) and it worked fine.

But every time I booted I had to press shift and choose the working kernel, so I looked around on how to configure my boot so it loaded the previous one.

Not knowing exactly what I was doing, i followed the steps on this thread, basically editing the /etc/default/grub file where it read GRUB_DEFAULT=0 to GRUB_DEFAULT=2. And then running sudo update-grub on Terminal.

Then I restarted my PC and all I got was the ASUS UEFI BIOS Utility. No Grub, no Ubuntu, no nothing. Holding shift or c did not do anything. I made a Live USB from a freshly downloaded .iso of Ubuntu and now I'm running Ubuntu from the USB drive. But I can't recover my old grub file (I did had it backed up before messing with it). I can access my HDD, with three partitions: sda1, where I think (as I am very ignorant in these matters) my PC boots from; sda2 (not sure what it is) and sda3, where most of my files are, but it is in a file system called "crypto_LUKS"

I got this by reading in the BootInfo summary from boot-repair.

I've tried solving the problem three different ways:

  1. using boot-repair recommended repair (like this) -- it says it finds the /boot, says it does the repairing, but after booting I just go back to my UEFI BIOS. If I choose "advanced options" I cannot see anything under the tabs "GRUB location", "GRUB options" or "MBR options".

  2. following these steps (answer #2) via terminal. After trying

    sudo mount /dev/sda1 /mnt and

    sudo grub-install --root-directory=/mnt /dev/sda

(with both sda1 and sda3), I get

Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
  1. editing the grub file in my sda3 (now in /media/ubuntu/5810cd14-bf74-4b7d-a312-81129f4bc7aa/etc/default) back to the way it was, which I managed to do using sudo su (the drive was read-only) -- but then when I try to run sudo update-grub it gives me the following error message: "/usr/sbin/grub-probe: error: failed to get canonical path of `/cow'."

What should I do? I really don't want to reinstall Ubuntu, all my files seem to be intact and all I need to do is get my system to boot! I can't believe I'm in all this mess by simply (and stupidly) editing a single character in a single file.


EDIT:

I combined oldfred's link about UEFI boot repairing with the other one I had posted, about encrypted partitions boot repairing and did get grup-install to run installing grub-efi-amd64.

Then I got an error message saying I should change my /etc/default/grub config file to include the line GRUB_ENABLE_CRYPTODISK=1. Did it and it did not work. Then I've seen here there's a bug, the correct line would be GRUB_ENABLE_CRYPTODISK=y.

Did it and got yet another error message I can't recall now. Got fed up after two days working on this and reinstalled Ubuntu with a fresh format. Working well since then, although booting is taking a little longer since then.

angrato
  • 86

1 Answers1

2

If you still have access to Linux, try using Grub Customizer. http://ubuntuhandbook.org/index.php/2014/04/install-grub-customizer-ubuntu-1404/ See if you can find your old Ubuntu partition, put it at the top of the list (it doesn't necessarily have to be at the top of the list. I just suggested the top so that it would boot automatically if you don't press any keys within 10 seconds) and save the file.

JC A
  • 21