Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

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

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

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

    Bucky Ball this is a tough one, but this is only a shot in the dark now.
    Some Windows8 computers come with a locked ESP that prevents writing outside the /EFI/Boot and /EFI/Microsoft folders, thus preventing the creation of a /EFI/ubuntu folder.

    This leads to a "Read-only" error when trying to install grub-efi.

    *** WORKAROUND***:
    • 1) via Gparted create another EFI partition (FAT32, 200MB, located in the first 100GB of the disk)
    • 2) move the 'boot' flag on it
    • 3) make Ubuntu use this new ESP (eg via Boot-Repair --> Recommended Repair).

    EDIT: OK just tried this myself with Boot-Repair from within a Ubuntu Live USB, I had to unmount using gParted (right-click on each partition -> unmount) which made the key icons disappear., and then ran Boot-Repair, it then succeeded in repairing my system (using Recommended Repair).
    FTR:But then again I could never get to a "Locked-ESP" situation on my end. I just intentionally hosed my system for testing this.
    Last edited by 1fallen; July 19th, 2019 at 08:49 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

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

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

    Apologies for the belated reply and thanks for the input all. I couldn't seem to login to the forums for a day, even though staff tell me it looked like I was logged in from their end.

    In any case, I meandered down another path in the meantime. Booting from the Boot Repair USB, I had a look at my fstab file and commented out every entry but the OS partition (sda5), swap and the efi partition (sda2).

    On booting Ubuntu this time, while I still got the 'can't access resource' message briefly, it went through to a login screen and I could login (the Ubuntu recovery option also works and I can move the cursor). Once I got to a desktop though, things were nasty. My Ubuntu settings seemed to be intact, but WAN not connected, even though it says I'm connected to the LAN and getting a good speed. Consequently, can't report directly from that machine.

    When I click on one of the partitions in the file manager that is not mounted by fstab at boot, the partition mounts but I also get the message that the partition is already being used. I'll check the exact wording of that message later. Maybe this has something to do with my issue and explains why, when I removed the entries for those partitions from fstab, I could boot to Ubuntu.

    If those partitions are already in use from boot, removing their entries from fstab allows Ubuntu to boot. From this, I might assume that this is not a problem with either EFI (because I get to the grub menu) or the Ubuntu partition (because Ubuntu boots), but with Ubuntu trying to mount busy, or 'locked', partitions at boot. So maybe we are heading down the wrong track with EFI experiments.

    I will fiddle around with fstab a bit more either later tonight or tomorrow and see what I come up with. Been a bit busy so haven't been able to get stuck in as I'd like. I mention this experiment in case it might give anyone a clue as to what's going on.
    ___

    @1fallen

    *** WORKAROUND***:

    1) via Gparted create another EFI partition (FAT32, 200MB, located in the first 100GB of the disk)
    2) move the 'boot' flag on it
    3) make Ubuntu use this new ESP (eg via Boot-Repair --> Recommended Repair).

    Yes, I was going to try this and the main reason I didn't was that I have an existing 300mb partition at the beginning of the drive (sda1) which is labelled 'Recovery' in Gparted. I'm guessing this partition has something to do with Win recovery. Not sure I need that as if I want to reinstall Windows, I'd do it from scratch as using Win recovery would wipe everything on the drive (from what I believe).

    Another reason is, in light of my experiments with fstab, the problem seems to be with the partitions Ubuntu's fstab is attempting to mount being busy at boot rather than with EFI or the Ubuntu partition.

    Just to refresh, this all started when I resized a couple of partitions and created an NTFS partition on one of the hard drives. My guess is that this has created confusion for Ubuntu and maybe it's looking for the wrong, or wrong sized or type, partition(s)?
    ___

    Any and all thoughts on any of this appreciated. In the meantime, I'll take a closer look at the other suggestions, experiment a little more with fstab and the messages from the unmounted partitions, and get back to this thread soon.

    Thanks again, people.

    @ubfan1: Yes, I had seen that thread suggesting this could be a sign of hardware failure. Thought I'd nut out how to run smart tools soon and see what that coughs up. The SSD is about five years old so it's possible I guess. Hoping not.
    Last edited by Bucky Ball; July 21st, 2019 at 06:06 PM.

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

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

    Update: fixed ... I think. A simple oversight on my part so sorry to waste everyone's time. Would have been nigh on impossible for anyone else to guess this was the cause from the info given.

    After booting successfully by changing my fstab to just the OS, EFI and swap partitions, I began to uncomment the other partitions in fstab one by one.

    Then it hit me. At the bottom of the fstab was this line. I'd commented it out with the others and still hadn't put two and two together.

    Code:
    # /mnt/Win7Virt
    # UUID=a5d96e1a-164b-4523-b0e7-67fa10e0fd73 /mnt/Win7Virt     ext4    errors=remount-ro 0     1
    When I deleted a partition and resized and created others before the chaos, this is the partition I deleted. It doesn't exist. Must have been the issue as I uncommented the rest, rebooted and back to normal.

    So the problem appears to have been that Ubuntu fstab was trying to mount a partition that no longer existed and throwing a 'Locked-ESP'. Or was it? There were also these two entries.

    Code:
    UUID=A869-5E57  /boot/efi       vfat    umask=0077      0       1
    #UUID=A869-5E57 /boot/efi       vfat    defaults        0       1
    This is how they are now. I originally had the hashtags the other way around. Not sure if this made any difference and unsure why I have two EFI entries.

    For some odd reason I had connection to the router but not the internet and had to change the nameserver in /etc/resolv.conf to the same as my laptop (from 127.0.0.53 to 127.0.1.1) to get there, but that is another story.

    Thanks all for all the input and sorry to lead us up the garden path. Guess I'm a little out of practice as all my machines pretty much 'just work'.

    Solved.

    (PS: Thanks oldfred, I will delete those boot infos from EFI.)
    Last edited by Bucky Ball; July 22nd, 2019 at 10:28 AM.

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

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

    Back with 14.04 and before the mount of the ESP used defaults. After that they changed to 0077 which is no permissions to write into it.

    I change mine as I use ESP to have copies of my /EFI/ubuntu and the UEFI update files for my UEFI.
    But I think they changed it to 0077 for security reasons and am thinking I maybe should change back to 0077 and only use partition from live installer or another FAT32 for UEFI updates.

    Boot-Repair automatically changes the mount of the ESP also to defaults. It then may save its reports into that partition or into /var/logs.
    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.

  5. #15
    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 further info, oldfred.

Page 2 of 2 FirstFirst 12

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
  •