1

I am using boot-repair from a live ubuntu session to recover my OS and getting the error-

Locked-ESP detected. You may want to retry after creating a /boot/efi partition (FAT32, 100MB~250MB, start of the disk, boot flag). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot/efi partition:] option of [Boot Repair].

Here is the boot-repair output file for more details.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • well, it appears that sda is blank, what are you trying to do? – ravery Oct 15 '17 at 09:48
  • @ravery ,firstly the grub rescue appeared on the desktop and i found that os is present in sda2 by using the command ls(hd0,sda2) in grub rescue but i was not able to recover os from grub rescue because i was getting the error "file '/grub/i386-pc/normal.mod' not found" .That's why i am using boot-repair tool from a live ubuntu session and getting the error that i have posted as question . – GAURAV KUMAR RANA Oct 16 '17 at 04:49
  • bootrepair will not fix that, you have to install grub. PS missing grub modules also suggests that your OS partition is missing – ravery Oct 16 '17 at 05:08
  • @Rod Smith please have a look on the question . – GAURAV KUMAR RANA Oct 16 '17 at 09:40
  • @ravery i used sudo fdisk -l from the live session and this shows the type column of /dev/sda2 as Linux file system .Is it the partition with OS ? – GAURAV KUMAR RANA Oct 16 '17 at 10:04
  • did you look in it? – ravery Oct 16 '17 at 10:06
  • @ravery , yes . here is the link of the screenshot of the output of sudo fdisk -l . https://www.dropbox.com/s/9x1pmotrufrmren/Screenshot%20from%202017-10-16%2011-35-11.png?dl=0 – GAURAV KUMAR RANA Oct 16 '17 at 11:40

2 Answers2

0

this error has happened because of the AMI BIOS is blocking EFI database variables to be altered. however, AMI BIOS proposed to fix those variables by itself after grup-efi has been re-installed (aka boot-repair process). to recover, try to enter BIOS after the repair procedure and look for the boot page in it.

and another useful link:

how-can-i-reinstall-grub-to-the-efi-partition

Oleg Kokorin
  • 147
  • 1
  • 5
0

I suspect this is a hardware problem. From your Boot Repair output:

ERROR: asr: reading /dev/sda[Input/output error]
ERROR: ddf1: reading /dev/sda[Input/output error]
ERROR: ddf1: reading /dev/sda[Input/output error]
ERROR: hpt37x: reading /dev/sda[Input/output error]
ERROR: hpt45x: reading /dev/sda[Input/output error]
ERROR: isw: reading /dev/sda[Input/output error]
ERROR: isw: reading /dev/sda[Input/output error]
ERROR: isw: reading /dev/sda[Input/output error]
ERROR: jmicron: reading /dev/sda[Input/output error]
ERROR: lsi: reading /dev/sda[Input/output error]
ERROR: nvidia: reading /dev/sda[Input/output error]
ERROR: pdc: reading /dev/sda[Input/output error]
ERROR: pdc: reading /dev/sda[Input/output error]
ERROR: pdc: reading /dev/sda[Input/output error]
ERROR: pdc: reading /dev/sda[Input/output error]
ERROR: pdc: reading /dev/sda[Input/output error]
ERROR: pdc: reading /dev/sda[Input/output error]

It goes on like this for quite a while. Input/output errors are usually (but not always) indicative of failing hardware. This diagnosis is also consistent with the fact that Boot Repair thinks your /dev/sda doesn't have a valid partition table, but the OS thinks it does have a partition table. (Hypothetically, if the hard disk has become unreliable, the OS might have read the partition table and then Boot Repair might have been unable to do so a short time later. It could also be that the first sector is bad but the OS read the backup GPT data from the end of the disk. If Boot Repair doesn't look there, then this would explain why it thinks the disk has no partition table.)

You may want to run SMART tools on the disk to test my hypothesis. If the SMART results look bad, then the disk is having problems, and it may be time to replace it. (See shortly for a caveat, though.) Note that disks can sometimes fail while SMART seems to think they're OK, so a clean result on SMART doesn't necessarily mean the disk is really OK. On occasion, SMART will complain about read errors, but attempting to write to the affected sectors will cause the disk to remap the sectors, and everything will then work OK for a while. Despite these caveats, running SMART on the disk is worthwhile -- its results are usually helpful.

There can be causes of hardware failure other than a bad disk. A bad cable, or even just one that's not properly plugged in, is one example. On occasion, the disk controller circuitry on a motherboard will fail, in which case you'll need to add a plug-in disk controller card (if this is possible) or replace the motherboard.

If I'm right that this is failing hardware, you should stop using the computer immediately! Buy a replacement hard disk (if that's the failing component) and, once it's physically in your possession, hook it up to the computer along with the failing one. You can then use various recovery tools and procedures to copy the old disk's contents to the new one. Depending on how bad the failing disk is, you might be able to copy data with normal backup tools; or you might need to use something like ddrescue to recover data from failing hard disk sectors.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105