0

I had the latest version of Ubuntu on my hard drive and deleted windows 8 with gpart. I noticed a partition called boot efi and it was fat32 so I assumed it was another partition associated with windows and deleted it.

Then, I got a BIOS error about not having an OS, so I installed an old version of Ubuntu. Now it loads right away into the old version I just installed but I can't get it to load my new Ubuntu version which is the one I had alongside windows 8. How do I make an efi file to load the one that has all my work on it?

There's an efi file for this new install of an old version of Ubuntu so it loads into that right away. 438.91GB is my main Ubuntu version I was using before all this happened. See pic:

enter image description here

2

2 Answers 2

1

If you installed another UEFI boot with its efi boot files and you have the same version of grub, you can just edit the grub.cfg in the efi partition with the new UUID.

Back up ESP - Efi System Partition before making any changes. You can just copy files back and it should work. Otherwise you have to run repairs to restore efi boot files.

In your /boot/efi/EFI/ubuntu should be a small grub.cfg. This is mine, which has the UUID of the main install and drive, partition of that install. Change to your main install's UUID and partition number.

search.fs_uuid 45de38c8-6748-4634-b207-628d9aa8b42b root hd0,gpt3 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

To see UUIDs

sudo blkid -c /dev/null -o list
0

Oldfred's and ubfan1's suggestions are both worth heeding. Here's another option: Install my rEFInd boot manager. Unlike GRUB, it scans for boot loaders and Linux kernels every time it boots, so you don't have to worry about having every OS and every kernel in a configuration file. You can test rEFInd before installing it by using the CD-R or USB flash drive version (images for both are available on the downloads page).

Note that rEFInd will pick up both your Ubuntu installations' kernels, so the menu may be a little confusing. You can clarify it by setting appropriate partition labels or, once you know your old installation is booting correctly, deleting the new installation's partition. Of course, by now you realize you should not delete your EFI System Partition (ESP), which is identified in GParted as having its "boot flag" set -- /dev/sda1 in your case.

You must log in to answer this question.

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