Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Locked-ESP detected, can't boot Ubuntu

  1. #1
    Join Date
    Feb 2008
    Location
    Land of fire and drought
    Beans
    Hidden!
    Distro
    Xubuntu

    Locked-ESP detected, can't boot Ubuntu

    Hi all,

    I have Windows 8.1 and Ubuntu 16.04.6 installed on an SSD (/dev/sda) in EFI mode, 'secure boot' off in BIOS. All has been working fine for years. The computer is used as a DAW (Digital Audio Workstation) and, apart from the SSD, it has five other hard drives installed, not SSDs, regular WD Black HDDs.

    I needed to add a partition and change a few things around on a couple of the WD drives, NOT /dev/sda, the OS drive, and, whether coincidental or the cause, now I can't boot Ubuntu. The grub comes up, as usual, Windows boots from it normally, no problems, but Ubuntu won't boot. When I try to boot Ubuntu, I get this message.

    Code:
    can't request region for resource /dev/sda5
    /dev/sda5 is my Ubuntu OS partition.

    I have tried Boot Repair using 'Recommended Repair' and 'Advanced' option to make sure things are going to the correct place (the EFI partition is /dev/sda2). No dice. Same result when I try to boot Ubuntu.

    I have tried booting into Ubuntu recovery mode, it takes me to the recovery options that start with 'Resume', etc., but keystrokes on my keyboard have no effect so I can't do much from there.

    Everything on /dev/sda appears to be as it should be (Ubuntu is there, the shim is in the EFI partition, all looks normal to me), but I'm still in the same place.

    Here is the boot info.

    http://paste.ubuntu.com/p/NZ5pyr4mT9/

    And here is the report after running Boot Repair ... again.

    http://paste.ubuntu.com/p/jc6hm7bHP5/

    When that run finished, I am left with 'An error occurred during the repair' and this message, the same message I have received everytime I've run Boot 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].
    The first partition I have is /dev/sda1 and that is marked (in Gparted) as 'Basic data partition, ntfs, label = Recovery'. That partition is 300MiB. Not so sure about creating a /boot/efi partition over that, if that is what the instructions are asking me to do.

    I'm in the middle of recording some audio in Bitwig in Ubuntu. Bitwig runs on Windows too, but Windows can't access the EXT4 partitions my Bitwig projects are stored on, so this is bad timing. Besides that, I prefer Bitwig on Ubuntu.

    Any more info required, just ask. In the meantime, any ideas appreciated, thanks for your time and I'll keep digging.
    Last edited by Bucky Ball; July 18th, 2019 at 09:55 AM.

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Locked-ESP detected, can't boot Ubuntu

    Seen several locked ESP type issues.
    Some just need fsck, some need delete & recreate of ESP, and then new UEFI entries.
    Some systems also have an UEFI entry that somehow locks ESP to prevent writing.

    And newer Ubuntu installs have changed from mounting ESP with defaults to umask=0077. I believe they changed as defaults allowed full access by anyone which is not the Linux way. But Boot-Repair changed setting to defaults & I normally change mine. But found I have to reboot for change to work as just remounting does not. I may later go back and change to 0077 for security, but like having access.

    Using sda2 for ESP, is fine. Many installs use that as that seems to be a Windows default.

    I would first check UEFI for any type of setting related. What brand/model system?
    I see you have nVidia but use nouveau. I have older nVidia card GT620 and find little difference between nVidia & nouveau. And specs say my Intel driver has about same performance also.

    I would try dosfsck to see it that helps. Need to do from live installer so unmounted.
    Must be unmounted
    sudo dosfsck -t -a -w /dev/sda2
    The -a seems to help in clearing dirty bit
    https://bbs.archlinux.org/viewtopic.php?id=164185
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Feb 2008
    Location
    Land of fire and drought
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Locked-ESP detected, can't boot Ubuntu

    Thanks for that, Oldfred.

    I booted from the Boot Repair USB, opened a terminal and

    Code:
    sudo dosfsck -t -a -w /dev/sda2
    but unfortunately it didn't seem to do much because when I boot Ubuntu, takes me to a screen with

    Code:
    can't request region for resource [mem followed by a #] /dev/sda5 
    recovering journals: clean
    /dev/sda5 is my Ubuntu partition. At the same time, I have the 'Checking file systems' on screen with 'Press control+c to ignore and continue' until that ends and it goes to

    Code:
    Welcome to emergency mode!
    ... and instructions for various options. In other words, in the same place as I was.

    Everything seems to be okay until it tries to boot /dev/sda5, the Ubuntu partition, so wondering if I should run an fsck command on that. Seems to be an issue on that partition. I'm currently in Windows which I booted from the same grub menu screen I am trying to boot Ubuntu from, so the grub and boot process seems to be working ok from sda2. It tries to boot recovery and Ubuntu, but that's when the issues start.

    (Gets to recovery screen and options, but keyboard unresponsive there so can't do anything.)

    Brand/Model is a custom desktop. Has i7, 16Gb RAM, NVidia GTX 970 card. I occassionally use the machine for video editing in Ubuntu using Blender and last I looked, which was a couple of years ago, I was using the Cuda drivers.
    Last edited by Bucky Ball; July 18th, 2019 at 05:57 PM.

  4. #4
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Locked-ESP detected, can't boot Ubuntu

    Hello Bucky Ball,
    When this happened to me on 16.04, I solved the issue running Ubuntu from DVD or USB:
    Then Ran:
    Code:
    dosfsck -a /dev/"efipartition" #to fix the efipartition, remove ubuntu dir if necessary
    sudo mkdir /boot/efi
    sudo mount /dev/"efipartition" /boot/efi
    cd /boot/efi/EFI/
    rm -R ubuntu #if it's still there you must remove it
    Then i ran:
    Code:
    boot-repair #must be installed first
    After that, Ubuntu started to be available as a EFI option.
    Since then I refuse to dual boot windows. (In fact no windows period.)
    Hopefully oldfred will agree.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  5. #5
    Join Date
    Feb 2008
    Location
    Land of fire and drought
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Locked-ESP detected, can't boot Ubuntu

    Hi 1fallen.

    Thanks for that. Before I try it, do you mean I enter "efipartition" or /dev/sda2, my existing "efipartition"?

    Just checking.

    PS: I trying all this from a Boot Repair USB.
    Last edited by Bucky Ball; July 18th, 2019 at 06:14 PM.

  6. #6
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Locked-ESP detected, can't boot Ubuntu

    Quote Originally Posted by Bucky Ball View Post
    Before I try it, do you mean I enter "efipartition" or /dev/sda2, my existing "efipartition"?

    Just checking.
    Yep.>>my existing "efipartition"
    Quote Originally Posted by Bucky Ball View Post

    PS: I trying all this from a Boot Repair USB.
    I would think that would be ok, but I used my Live installer to do all this.
    PS: You know me, I'm not afraid of the nuclear approach. LOL
    EDIT: I have to go to work now, and I hope all goes well. (Fingers Crossed)
    Last edited by 1fallen; July 18th, 2019 at 08:34 PM.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  7. #7
    Join Date
    Mar 2011
    Beans
    1,632

    Re: Locked-ESP detected, can't boot Ubuntu

    Try removing the boot0003 entry from the boot order too with efibootmgr. The (bad?) entry seems to have been removed, but the boot order entry is still causing IO errors.

  8. #8
    Join Date
    Feb 2008
    Location
    Land of fire and drought
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Locked-ESP detected, can't boot Ubuntu

    @ubfan1: Thanks for the suggestion. Removed 0003 with 'efibootmgr -b 0003 -B' to no avail. Made no difference, although when I run efibootmgr now, the 0003 entry is no longer there. The following is what is there.

    Code:
    lubuntu@lubuntu:~$ efibootmgr
    BootCurrent: 0007
    Timeout: 1 seconds
    BootOrder: 0001,0000,0007,0008
    Boot0000* Windows Boot Manager
    Boot0001* ubuntu
    Boot0006  
    Boot0007* UEFI: SanDisk Cruzer Switch 1.26, Partition 1
    Tried running Boot Repair once more and still getting the 'An error occurred' and 'Locked-ESP' messages at the end. When I try to boot Ubuntu, still get the 'Can't request region for resource ... etc.'.
    ___

    @1fallen: Thanks for the clarification. Tried your instructions and still getting same error at the end of the Boot Repair about Locked-ESP.

    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].
    My current boot info after that Boot Repair run is here.

    http://paste.ubuntu.com/p/Sbs88DkmNY/
    Last edited by Bucky Ball; July 19th, 2019 at 07:36 AM.

  9. #9
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Locked-ESP detected, can't boot Ubuntu

    If you have run dosfsck and double checked that there is not a UEFI setting that somehow locks the ESP, you may need to do the brute force delete & create new. But will have to also delete all UEFI entries & create new as GUID/partUUID of ESP will change & UUID uses that to know which partition to boot from.

    You also are saving Boot-Repair logs into ESP. I would delete all but most recent.

    And back up ESP to know what entries you have and restore so you have files in "new" ESP.
    If you restore /EFI/Microsoft you can use efibootmgr to create new "Windows Boot Manager" boot entry. If not you have to use your Windows repair flash drive to fully reinstall Windows boot files & loader.

    And if you restore grub files to "new" ESP partition you can use efibootmgr to add new entries. Otherwise you have to do a full reinstall of grub, either manually or usually now easier with Boot-Repair.

    So first delete Boot-Repair logs & backup ESP.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #10
    Join Date
    Mar 2011
    Beans
    1,632

    Re: Locked-ESP detected, can't boot Ubuntu

    Take a look at https://askubuntu.com/questions/9650...d-esp-detected
    Might be bad hardware.
    Also see https://bugs.launchpad.net/ubuntu/+s...2/+bug/1091477
    Suggested to just make a new ESP, move the boot flag and files.
    Last edited by ubfan1; July 19th, 2019 at 04:30 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •