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.

  • From Boot-Repair run the Summary report and post above the link it gives, so we can see details. But it sounds like an UEFI install and now you are trying to boot or repair in BIOS mode. Report will give us details. – oldfred Apr 23 '15 at 3:47
  • paste.ubuntu.com/10869407 – angrato Apr 23 '15 at 3:54
  • You have an UEFI system with efi, /boot & LVM install partition with full drive encryption. I do not know LVM nor encryption, but with Boot-Repair or any manual repairs you must use pass phase to unencrypt partitions so you can update them. Be sure to always boot in UEFI mode especially when making repairs. – oldfred Apr 23 '15 at 15:20
  • OK, so knowing that that's trhe problem, how do I go about solving it? Let me state that I am almost completely ignorant as to what I'm doing here. – angrato Apr 23 '15 at 16:45
  • I followed this and got to the point where I can activate my partitions, but I don't know which of them should I mount in order to run install-grub and update-grub. – angrato Apr 23 '15 at 18:30
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.

  • Running it now, but when I choose sda1 as partition, i get "this seem not to be a root file system (no fstab found)". When i choose sda2, I get "Mount failed" and I can read in terminal mount: unknown filesystem type 'crypto_LUKS'. – angrato Apr 23 '15 at 2:51
  • BTW, i also get errors in Grub Customizer for both DEVICEMAP_FILE and OUTPUT_FILE (red "!" instead of green "V"). – angrato Apr 23 '15 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.