I changed the boot from UEFI secure to Legacy with secure boot off to be able to do this.
First, reverse this action! You've complicated your boot path in a way that's likely to create more problems in the future. For more on why enabling the CSM (aka "legacy boot" support) is likely to cause problems, see my page on the subject:
http://www.rodsbooks.com/efi-bootloaders/csm-good-bad-ugly.html
With that done, there are several approaches to fixing your problem:
Option 1: Methodical Analysis and Repair
The first method is to analyze your current boot situation and, using what you learn, decide on a repair approach. The best tool for analysis is the Boot Info Script. When you run it from an emergency disk, it will generate a file called RESULTS.txt
, which contains lots of diagnostic information on your computer.
Combined with sufficient knowledge, RESULTS.txt
will probably tell you why the boot failed; however, note that first clause. To the uninitiated, the RESULTS.txt
file will be gibberish. Thus, if you lack that knowledge, you'll need to upload that file to a pastebin site, post the URL here or to some other forum, and hope that somebody can get back to you with an analysis and suggested repair.
Option 2: Use rEFInd to Boot and Repair
You can download the USB flash drive or CD-R version of my rEFInd boot manager, write it to a suitable medium, and boot from it. With any luck, this will work and enable you to boot. You can then run Boot Info Script to learn more or try to blindly re-install GRUB (with sudo grub-install
, perhaps followed by sudo update-grub
) or install rEFInd (via its Debian package or PPA).
One big caveat is that the rEFInd images I provide won't boot if Secure Boot is active, so if Secure Boot is active, you'll need to disable it, at least temporarily. (Alternatively, you could add Secure Boot support to a USB flash drive image, but that will require jumping through some extra hoops.)
Of course, rEFInd won't work if your Ubuntu installation has somebody vanished, but at least it won't do any harm in this situation.
Option 3: Use Boot Repair and Hope it Works
A third option is to use the Boot Repair utility, which installs a fresh copy of GRUB on the computer and reconfigures it. This tool usually works to fix boot problems; but in some cases it gets things wrong. It's also likely to fail in unpredictable ways if something really bad has happened to your installation (like if the Ubuntu partition has been deleted).
Summary
The safest approach is to methodically diagnose your problem and choose a repair based on what you learn. Using Boot Repair is a shot-in-the-dark approach that stands a good chance of working, but without knowing what's wrong, it's also hard to assess the dangers of using this tool. Using rEFInd is in-between these two approaches. Note that there are hybrids; for instance, you could use rEFInd to boot and then run Boot Repair to gain more information. You might also decide to run Boot Repair or install rEFInd after running the Boot Info Script.