2

I deleted /dev/sda1 partition of Ubuntu 20.04 by mistake, now when I try to boot, system is not able to detect the OS, is there any way to fix this ? This the image of disks using live usb the partition which I delted another partition which contains all the files

I have tried various approaches mentioned in various articles including using boot repair, but nothing fixed it.

6
  • Have you tried creating a FAT32 partition where sda1 was and rerunning boot repair?
    – PonJar
    Jul 9, 2020 at 9:39
  • yes, I created the fat32 partition while running boot repair, but that didn't work. Jul 9, 2020 at 9:40
  • I think this link should provide the answer. askubuntu.com/questions/1028375/deleted-ubuntu-efi The answer below will leave you with two installations which I wouldn’t recommend
    – PonJar
    Jul 9, 2020 at 9:49
  • @PonJar I tried this but in the step of installing grub grub-install /dev/sda I am getting error grub-install: error: /boot/efi doesn't look like an EFI partition Any idea how to fix this ? Jul 9, 2020 at 10:32
  • I think an EFI partition needs to be marked as ESP. You should be able to do that with GParted. My EFI partition is flagged “boot, esp”
    – PonJar
    Jul 9, 2020 at 10:43

1 Answer 1

1

Thanks @PonJar for the link. Using askubuntu.com/questions/1028375/deleted-ubuntu-efi I was able to fix it. If you face this error grub-install: error: /boot/efi doesn't look like an EFI partition during grub installation step, just do mount /dev/sdaxy /boot/efi again. This will fix it.

3
  • So you did not delete root partition? Just EFI? Jul 9, 2020 at 13:00
  • yes, the EFI was deleted. Jul 9, 2020 at 13:03
  • Please edit the title of the question to "deleted EFI" instead of "deleted one of the partitions" as it may be more helpful to future users who might have the same problem Jul 9, 2020 at 13:04

You must log in to answer this question.

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