Grub hell. Can I just delete the EFI partition and reinstall ubuntu?
What happens if I just delete the EFI partition and reinstall ubuntu?
I'm having problems reinstalling ubuntu and it has something to do with either grub or EFI or both. So can I just delete that partition and will the installer make a new one? Here's the story: I was having problems with python/django so out of frustration I decided to just reinstall ubuntu entirely. My /home directory was on the same partition as /. So before the reinstall I used gparted and resized the partition and made room for 100g for the new install. When I installed (18.04), In the installer I set the mount point for what *was* the old ubuntu as /home, and use the new empty partition as / I installed, when I rebooted it threw errors and dropped to cli. So I figured grub was trying to point at the /boot on the old install partition. (why didn't the installer tell grub to point to the new / partition? why would it tell grub to point to the /home/boot?) So I figured, I'll just hide every directory in what *was* the old install into a directory called (oldboot) so the installer can't even find a boot directory, and then I deleted the 100g partition and then I reinstalled 18.04 again. Now what happens is I get the emergency mode cli. (not the same prompt as before (and btw neither one is a grub prompt). This was was the "You are in emergency mode press Ctrl-D to login" prompt) So what's happening? Is this grub's fault? Maybe grub still hung up on something remnant? Or maybe it's looking at the EFI? How do I tell the installer to just delete grub entirely and reinstall it, instead of editing the current one? I don't understand what the installer and/or grub is doing to make it try to even look in the /home directory at all. How does this happen? This makes no sense. So what if I just delete the efi parition and try reinstalling again? |
Quote:
If your booting to a cli of some sort then the efi booting is working, could be something wrong with one of the kernel options in the /boot/grub/grub.cfg or mount points in your /etc/fstab. Quote:
|
Quote:
Also fyi I just tried this (the terminal version): https://www.howtogeek.com/114884/how...ntu-wont-boot/ And I got this: Code:
sudo grub-install --boot-directory=/mnt/ubuntu/boot /dev/sda I also looked there and the comments.... I have no idea what the hell they're talking about, ug I hate all thus boot grub uefi stuff it's hell! ok I'll be back with a photo in 20 minutes, thanks, rw |
You might find this AskUbuntu thread helpful: https://askubuntu.com/questions/8312...-efi-partition
|
OK it looks like a kernel problem looks like your theory was correct!
http://onehammer.com/IMG_20200207_212649.jpg http://onehammer.com/IMG_20200207_212755.jpg Btw I used to have 18.04.2 and now I'm installing 18.04.4. I can't imagine that'd make a difference? This pc is only like 3 years old- 4 cores, 16g, name brand; pretty vanilla. |
Quote:
|
I noticed a comment in the stackoverflow that @frankbell provided:
Quote:
So I tried installing grub-efi first and then the error changed now it does this: Code:
sudo grub-install --boot-directory=/mnt/ubuntu/boot /dev/sda @colorpurple- ok the efi parition was already there from the old installation, so I didn't flag anything. Should I delete it during the install and make a new one? And is the "flag" an option in the installer or do I do that in gparted? |
my touchpad has been acting screwy, so I had to edit post #6, it posted in the middle of typing somehow.
What I was attempting to say it appears your booting the installer in legacy mode, grub wasn't installed during the reinstallaion because a 1mb bios-grub partition doesn't exist. The when you reboot your still booting with the grub bootloader on the efi partition in uefi mode. |
If you had deleted the efi partition you wouldn't be booting at all except for the live iso. Use gparted to create a 1mb empty partition and flag as bios boot to boot in legacy mode.
|
Quote:
Quote:
Ok anyway what's the plan? Do I make a new partition? And/or do I need to expand the current one before another reinstall? |
The existence/non-existence of a /sys/firmware/efi directory indicates what mode a linux system is booted in.
|
Ok wow this is odd look at this (this is on the new install):
Code:
ubuntu@ubuntu:~/Downloads$ ls -al /mnt/ubuntu/sys/ |
I think your problem is you ran the installer iso in legacy mode when you did the re-install. Don't bother with creating a bios-boot parition. Disable legacy mode in the bios, boot the live iso, follow the steps in the link that frankbell posted.
|
Quote:
I'll try your way and the steps first since it's easier but I'm just wondering if a reinstall would work since the live disk isn't legacy mode anymore. |
It should if the efi partition is setup to be mounted at /boot/efi during the partitioning part of the installation.
|
All times are GMT -5. The time now is 08:41 PM. |