Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Please move to a more appropriate forum if necessary.
Please see attached screenshots of BIOS startup settings.
I (you don't need to tell me how stupid I was) accidentally deleted /sda1 on an Ubuntu 16.04 machine resulting in damaged EFI Boot settings.
But I was smart, too, as I had a current backup.
Ran boot recover utility - no joy.
Re-installed the Ubuntu operating system but keep getting these horror messages when booting up so I'm pretty sure it's not a OS problem. Most certainly a BIO/EFI issue.
(the screenshot with the dark background pretty much says it all)
I can boot with Ubuntu usb and access drives, etc. but booting from the hard drive just doesn't work.
Tell me what you need to know to help me. Output of commands will be gladly provided.
Did you delete sda1 or the contents of sda1? If you deleted the contents of sda1 then need to reinstall grub using a live cd/usb. If the partition was deleted the will need to recreate the efi partition first then reinstall grub.
download the boot repair iso, boot it, and post the output of the boot-info summary.
To answer your question: I deleted the sda1 partition. Completely. Contents included. Then re-installed Ubuntu which created it's new geometry for that entire disk. But as you know, it won't boot.
Seems you have been bitten by the re-installation - see this bugzilla entry. Down the bottom (post #34) for a suggested solution.
Pretty ugly - I'm surprised a fixed iso hasn't been issued.
It looks like the boot files are there on the efi partition. The boot-info script recommends to reinstall grub. Have you tried to go into your bios setup and change the default boot to ubuntu? Run the following from the iso
Code:
sudo efibootmgr -n 0002
to change next boot to ubuntu. then reboot and see if ubuntu boots. If so then you can use efibootmanger to make the change permanent. If it doesn't boot then will need to reinstall grub from the iso as suggested at the bottom of the boot-info script
Tried sudo efibootmgr -n 0002 and rebooting. No joy.
I mounted sda1 and see that in EFI there is "Boot" and "ubuntu"
The ubuntu directory has the following files:
fw
fwupx64.efi
grub.cfg
grubx64.efi
mmx64.efi
shimx64.efi
The Boot directory has:
bootx64.efi
bootx64.efi.grb
I looked at the message #34 but honestly couldn't follow the procedure and hesitate to do anything unless I feel confident in knowing what it is doing.
Could I copy the files above from the ubuntu directory in the Boot directory?
Looking for solutions.
I don't know where boot-info script is as you refer to it, colorpurple21859
After running boot repair again the final message is:
"Please don't forget to make your BIOS boot on sda1/EFI/ubuntu/shimx64.efi file"
Indeed ubuntu is an option immediately after running boot repair (but only one time is it available.) After rebooting and choosing ubuntu, still same problem, though.
Indeed ubuntu is an option immediately after running boot repair (but only one time is it available.) After rebooting and choosing ubuntu, still same problem, though.
Boot into ubuntu from the iso
open a terminal
check to make sure /dev/sda1 in mounted on /boot/efi
Code:
mount -l |grep efi
reinstall grub
Code:
sudo grub-install /dev/sda
Last edited by colorpurple21859; 12-19-2018 at 08:53 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.