0

I was using ubuntu 18 with windows 10. When I tried to boot ubuntu one day, the GRUB menu disappeared and GRUB command line was displayed. I tried to solve this but always got an error - failure reading sector, so I decided to delete the ubuntu partition from windows and then reinstall ubuntu. Now when I am trying to reinstall, the ubuntu installer does not detect windows OS and only gives Erase disk and install ubuntu option. I created the bootable usb from rufus with GPT partition scheme for UEFI target system. I make my own partition scheme by clicking on 'Something else' as suggested in some tutorials. The installer crashes with following message:

Executing 'grub-install/dev/sda' failed. This is a fatal error.

When I open Gparted from ubuntu live usb I get an Error.

After I click ignore for a few times Gparted opens and shows 2 ESP with boot flag.

I am able to use windows without any problem. When I run SMART check on my disk using crystaldiskinfo, I get a caution.

I have already disabled secure boot, fast boot and enabled legacy boot from BIOS menu.

I have no idea how to proceed now. Please help.

  • You do not want legacy boot as then grub will not install in UEFI boot mode. Did Windows turn fast start up back on. It does that with updates. That would explain the red ! on sda1 & sda3. The error on sda2 is normal as that is required to be unformatted & gparted does not like that. http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions & https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation – oldfred Apr 24 '20 at 17:48
  • Fast startup is off. I was initially installing with legacy boot disabled and there was same problem. I read an answer that told to enable legacy mode and so I did it. I still have grub installed and it shows in boot menu even when I format ubuntu partition from windows disk management. Could that be a possible issue? – Aniket Jain Apr 24 '20 at 18:18
  • Some older Dell needed legacy on, but you still had to boot in UEFI mode. Most systems need Legacy/CSM/BIOS mode off to even have UEFI boot. UEFI remembers boot entries even after system is uninstalled.And ESP may still have /EFI/ubuntu folder, but that only boots to a grub error if no actual install to boot into. Only use Windows to shrink NTFS partitions. For everything else use gparted as it will correctly show Linux partitions. – oldfred Apr 24 '20 at 20:13
  • I tried to remove /EFI/ubuntu folder from partition with boot flag through diskpart. I was able to do it for sda6. But for sda1 diskpart gave unknown filesystem error. I am getting confused with 2 esp partitions, one of which has unknown filesystem. Is there any way I can safely get rid of one of the boot flagges esps? – Aniket Jain Apr 25 '20 at 07:53
  • It looks like because ninstaller could not see sda1 it created a second ESP. Most UEFI only work with one ESP per device although technically UEFI allows more. I have seen users have a second FAT32 partition, but one ESP and grub reading boot files from second FAT32. Or yes you need to remove one ESP, but from gparted & installer need to see sda1. It may need chkdsk or from Linux fsck. sudo fsck.vfat -t -a /dev/sda1 But make sure Windows fast start up is off, Windows will turn on with updates, which you may not see. – oldfred Apr 25 '20 at 14:07
  • So nothing worked and I decided to reinstall both windows and ubuntu for a clean partition. I ran windows recovery, but recovery failed and windows was unable to install Restoration Incomplete. So I reinstalled windows from a usb and it worked well. I tried to intsall ubuntu again, same error. Also, ubuntu is not able to prepare a failure report saying the most common cause is hardware problem. I ran long DST and Short DST tests on hard disk, both failed. Does this indicate a hard disk failure? If yes, why does windows not have a problem with it and seems to work well. – Aniket Jain Apr 26 '20 at 17:00

0 Answers0