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.

  • Have you tried creating a FAT32 partition where sda1 was and rerunning boot repair? – PonJar Jul 9 at 9:39
  • yes, I created the fat32 partition while running boot repair, but that didn't work. – Mohit Malik Jul 9 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 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 ? – Mohit Malik Jul 9 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 at 10:43

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.

| improve this answer | |
  • So you did not delete root partition? Just EFI? – Archisman Panigrahi Jul 9 at 13:00
  • yes, the EFI was deleted. – Mohit Malik Jul 9 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 – Archisman Panigrahi Jul 9 at 13:04
  • yeah, done. thanks. – Mohit Malik Jul 9 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.