0

My Ubuntu 16.1 crashed with a no operating system error. I tried to reinstall from the same start-up flash-drive I'd used to install the system in the first place. Got the "grub-efi-amd64singed" package not installed error and a no operating system error on reboot. The start-up drive still works on the try Ubuntu option.

From the try Ubuntu option I downloaded and made a new flash-drive, this time with ubuntu 17.4. I figured a brand new installation would solve the problem. Didn't. Same error. Could the error on the original flash-drive have corrupted the new Ubuntu download?

On Ask Ubuntu I found the following solution by L.D. James:

Upgrade and update your repository packages and cache. Run these commands:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade

Update:

Run these commands one by one:

$ sudo apt install --reinstall grub
$ sudo apt install --reinstall grub2-common
$ sudo apt install --reinstall grub-efi-amd64
$ sudo apt install --reinstall grub-efi-amd64-bin
$ sudo apt autoremove
$ sudo apt install grub-efi-amd64-signed

shareedit

edited Mar 26 at 14:28

answered Mar 18 at 12:10
L. D. James
12.8k31853

I tried it. The only irregularities I encountered were once during the upgrade it detected a difference between the coding or something from the software being installed and the local one on my computer, and gave me a list of options. (Sorry, I didn't keep a copy). I chose to keep the local version since I believe I have the newest ubuntu desktop (17.4).

Everything else seemed to work. Only problem is when I again tried to install Ubuntu 17.4 on my computer I get the same error. Again, I can still use the try Ubuntu version from the start-up flash-drive.

Seems strange to me that the problem persists. Has the fact that I'm only using "try Ubuntu" sabotaged the installation somehow? That is, when I run the above updates, how do I know where the missing grub-file is being reinstalled? I can't seem to find the flash-drive by using the cd command in order to be sure I'm installing the file in the right place.

Charles Green
  • 21,859

1 Answers1

0

Well, I somehow managed to reinstal Ubuntu on my hp Pavillion. Only problem is I'm not totally sure what fixed the problem. This is totally the worst answer in history, but as I say, something worked. I'll try to retrace my steps, but as I was working on a usb drive, everytime I restarted ubuntu my text files and bootinfo summaries were lost.

I was working from a USB drive with Ubuntu on it, but couldn't seem to install it on my computer. My inititial error was a missing grub error. I tried the above commands (Thanks to LD James above) but then I got a "can't find the efi partition error". (Thanks to Charles Green who suggested that right away.) I tried running boot-repair and/or making a boot-repair disk several times from several websites. In the end running boot-repair from the terminal was what worked. (sudo apt-get update then sudo apt-get install -y boot-repair && boot-repair). Got an no efi partition detected and was recommended to type these commands into a terminal: sudo chroot "/mnt/boot-sav/sda1" dpkg --configure -a sudo chroot "/mnt/boot-sav/sda1" apt-get install -fy sudo chroot "/mnt/boot-sav/sda1" apt-get purge -y --force-yes grub*-common grub-common:i386 shim-signed linux-signed* This seemed to do something because I got the same no efi message at first and then it looks as if it was purged.
Only trouble was I was scrambling here and I did a lot of other things at the same time. I think I retyped the above commands to reinstall the grub next.

I then got the following message:

Please typ the following command in a terminal:

sudo chroot”/mnt/boot-savsda1” apt-get install y –force-yes grub-pc linux-generic

So I did. Then I had to use tab, space and enter to choose where to install grub. It's a little embarrassing cause I didn't see which drive I chose. I pushed tab to go to the next option and it somehow just entered the first option, whatever it was. So, you'll just have to look at the list and pick what makes sense. Sorry, totally hopeless ... I know.

My source for this was: How can I dual-boot Windows 10 and Ubuntu on a UEFI HP notebook?. (Thanks to Michael Hoffman). Only I wasn't trying to dualboot and my system was different than his so mostly I just learned how to use boot manager to check if my partitions were in place. (sudo apt-get install efibootmgr then sudo efibootmgr).

This showed that I had the following boot info: Boot order 2001, 2002, 2003. Boot 0000 USB Hard Drive (UEFI) USB Flash Drive Boot 0003 Internal Hard Drive or SSD Boot 2001 USB Drive (UEFI) Boot 2002 Internal CD/DVD ROM (UEFI) Boot 3000 Internal Hard Disk or SSD

I really don't know what any of that means, but Michael Hoffman who wrote the answer said that if it isn't so messed up, and mine wasn't, then you could just move on to reinstall Ubuntu.

Here's where I Messed up, at least, as far as making this a usable answer goes.

When I got to the options for installation, I was uncertain which partition to install Ubuntu on, as I was uncertain where the reinstalled grub file got installed (see above.) So I just chose "erase the disk and install Ubuntu - warning this will destroy all files and all operating systems". I SHOULD have just erased Ubuntu and reinstalled it first, to see if the above steps worked. Instead I just erased the hard drive and reinstalled Ubuntu, presumably with all the right partitions. Whatever the case, this worked and I now have Ubuntu installed on my system. Only trouble is, I don't know if I could just have chosen erase disk and install Ubuntu in the first place, and saved all the above steps.

So, to make a long story short, if you're getting a missing grub error, try erasing the disk and installing an fresh copy av Ubuntu first, just in case.

Sorry, this is a terribly messy answer, but as I say ... it worked.