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=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:
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".
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.
- 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-grubit 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.
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
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.