antsys
February 4th, 2013, 03:07 PM
Hello,
This may help if you bump into this problem.
When installing Ubuntu 12.10 on a HP Pavilion g7-2242sf, I had this error.
An error occurred during the repair.
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].************
Quick answer and work around : the problem is not that the partition is locked, the problem comes from the grubx64.efi file that is corrupted in the the EFI partition, at place /EFI/ubuntu/grubx64.efi.
Just suppress this file, then make a Boot Repair reparation : the whole repair should then be a success, and the dual boot should work.
(if you don't know how to suppress this file, see here after, the explanation).
************
More explanation.
I installed the Ubuntu 12.10 version with the "other way" option, with reduction of the Windows8 partition, and creation by hand the Ubuntu partition and the Swap partition.
All goes fine, ... but no boot on Grub, to choose between Ubuntu or Windows.
Windows starts directly.
So I tried the BootRepair, as explained nicely here :
https://help.ubuntu.com/community/UEFI
To do that, I stated Ubuntu from the installation USB Key, and the installed the BootRepair, as explained in the internet page of Boot Repair :
https://help.ubuntu.com/community/Boot-Repair
Just copy and past the two given lines in a Terminal window, and you can use Boot Repair with the LiveUbuntu from the USB key.
But I got the error : "Locked-ESP detected. You may want to retry after creating a /boot/efi partition...."
It appear, after searching, reinstalling, looking closely at the boot files and so... that the grubx64.efi file was corrupted.
I guess that when Ubuntu tried to installed, there is a bug that makes this file not be properly set.
I have tried to install several times, with another EFI partition, etc... the problems comes when the EFI partition is made by Windows8 : then, the grubx64.efi file is not properly installed by Ubuntu.
Then, Boot Repair cannot rewrited or manipulated it, when doing the reparation with the Grub2 files etc...
So, the idea is to remove the corrupted file.
The trick is to make the EFI partition a simple usual partition, remove the file, then put it back to it's "boot" partition role.
To do so :
- boot with Ubuntu (live version, from the USB key), and use GParted to change the flag of the EFI partition : remove the boot flag.
- shut down the pc, remove the USB key, and boot with windows 8 (the removal of the boot flag does not prevent windows to boot).
- within windows 8, call the partition tool (search for "partition" in the control panel or in the parameters setting search tool).
- in the partition tool, select the EFI partition, and give it a Drive letter (you can do it because it is not anymore marked as a "boot" partition).
- then open a File Navigator, and go to the Drive of the partition : you can see the EFI folder, and navigate down to the file : /EFI/ubuntu/grubx64.efi
- suppress the file.
- shut down the computer
- restart with Ubuntu (live version, from the USB key), and use GParted to change the flag of the EFI partition : set back the boot flag.
- install the Boot Repair tool (see here above, and the link to the Boot Repair page).
- proceed to the repair : choose your settings and option, etc...
- the process should be sucessfull, and the Ubuntu Grub panel appear when starting.
then try first to boot with Ubuntu, and then shut down and try to boot with Windows 8.
It should work fine.
SEE HERE UNDER the other post : this is incomplete
There certainly other ways to do this file delete, but this one was the one I did when trial and error...
You can also mount the EFI partition within Linux and make the delete from there...
Hope it helps,
Antoine Herzog
This may help if you bump into this problem.
When installing Ubuntu 12.10 on a HP Pavilion g7-2242sf, I had this error.
An error occurred during the repair.
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].************
Quick answer and work around : the problem is not that the partition is locked, the problem comes from the grubx64.efi file that is corrupted in the the EFI partition, at place /EFI/ubuntu/grubx64.efi.
Just suppress this file, then make a Boot Repair reparation : the whole repair should then be a success, and the dual boot should work.
(if you don't know how to suppress this file, see here after, the explanation).
************
More explanation.
I installed the Ubuntu 12.10 version with the "other way" option, with reduction of the Windows8 partition, and creation by hand the Ubuntu partition and the Swap partition.
All goes fine, ... but no boot on Grub, to choose between Ubuntu or Windows.
Windows starts directly.
So I tried the BootRepair, as explained nicely here :
https://help.ubuntu.com/community/UEFI
To do that, I stated Ubuntu from the installation USB Key, and the installed the BootRepair, as explained in the internet page of Boot Repair :
https://help.ubuntu.com/community/Boot-Repair
Just copy and past the two given lines in a Terminal window, and you can use Boot Repair with the LiveUbuntu from the USB key.
But I got the error : "Locked-ESP detected. You may want to retry after creating a /boot/efi partition...."
It appear, after searching, reinstalling, looking closely at the boot files and so... that the grubx64.efi file was corrupted.
I guess that when Ubuntu tried to installed, there is a bug that makes this file not be properly set.
I have tried to install several times, with another EFI partition, etc... the problems comes when the EFI partition is made by Windows8 : then, the grubx64.efi file is not properly installed by Ubuntu.
Then, Boot Repair cannot rewrited or manipulated it, when doing the reparation with the Grub2 files etc...
So, the idea is to remove the corrupted file.
The trick is to make the EFI partition a simple usual partition, remove the file, then put it back to it's "boot" partition role.
To do so :
- boot with Ubuntu (live version, from the USB key), and use GParted to change the flag of the EFI partition : remove the boot flag.
- shut down the pc, remove the USB key, and boot with windows 8 (the removal of the boot flag does not prevent windows to boot).
- within windows 8, call the partition tool (search for "partition" in the control panel or in the parameters setting search tool).
- in the partition tool, select the EFI partition, and give it a Drive letter (you can do it because it is not anymore marked as a "boot" partition).
- then open a File Navigator, and go to the Drive of the partition : you can see the EFI folder, and navigate down to the file : /EFI/ubuntu/grubx64.efi
- suppress the file.
- shut down the computer
- restart with Ubuntu (live version, from the USB key), and use GParted to change the flag of the EFI partition : set back the boot flag.
- install the Boot Repair tool (see here above, and the link to the Boot Repair page).
- proceed to the repair : choose your settings and option, etc...
- the process should be sucessfull, and the Ubuntu Grub panel appear when starting.
then try first to boot with Ubuntu, and then shut down and try to boot with Windows 8.
It should work fine.
SEE HERE UNDER the other post : this is incomplete
There certainly other ways to do this file delete, but this one was the one I did when trial and error...
You can also mount the EFI partition within Linux and make the delete from there...
Hope it helps,
Antoine Herzog