Solving "Invalid Partition Table" at startup on Ubuntu

Solving "Invalid Partition Table" at startup on Ubuntu

TLDR; Creates an EFI partition of size 100MB or 200MB recommended of type fat32 and add the following flag boot, esp

How it started

I bought my DELL computer and by convention, it came with Windows OS by default. Afterwards, I installed Ubuntu 20.04 alongside Windows. But after a few weeks of using the system, I figured that I will not be needing Windows anymore and I needed more space to put my files, so I just boot my ubuntu and deletes all the partitions that the computer comes with(excluding my Ubuntu of course). After that time I start encountering a problem:

The Problem

First off, there's the weird black screen with "Invalid Partition Table_" text during boot time. While the screen will usually go away and the boot will continue if I press any key, it will however stay there forever if I didn't notice and will actually warm up the computer(the degree might even reach the boiling point :) ).
Oh and before I forget the system initially boots up at a maximum of 20 seconds pre-problem era, but after the problem, it reaches up to 2 minutes 15 seconds to boot (that's a 675% increase in boot time).

The Solution

After a lot of googling and trials(including BIOS updating from DELL guide and other solutions), this is what I did to solve all the two problems.

1st The Ubuntu booting

I boot into a live Ubuntu on my computer and used Boot-repair to update my grub

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

2nd The "Invalid Partition Table_" infinity screen

What caused this is a partition named EFI that I deleted while removing windows, and the EFI partition is basically the first file the UEFI grabs when booting to start the operating systems on a drive(usually 100MB or 200MB is recommended), and because I deleted that the BIOS doesn't know exactly how to handle the situation and therefore get stuck at that screen.

How I handled it

I created a 200MB partition on my ubuntu using gparted as a fat32 type and formated it, afterward I set the following flags on the partition boot, esp.

How it ended

Well, like before, the computer now loads at a maximum of 20 seconds and the black screen is gone(for good). I am usually a person that will like to see the architecture of everything I use, even though I figured this problem, I know there is a tendency of me breaking another thing again(hopefully not and don't worry I only experiment on my personal belongings).

The END. See you again on another blog post ๐Ÿ˜Š