Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: External drive boot issue UEFI

  1. #1
    Join Date
    May 2007
    Location
    EU
    Beans
    56
    Distro
    Ubuntu

    External drive boot issue UEFI

    Hi everyone, I tried to search these fora but I couldn't seem to find an answer, so I apologize if this has already been dealt with.

    I've got a Huawei Matebook D (Ryzen 5, 8/256), so since my internal disk (well, M2) is small I didn't want to dual boot from the same drive. I've got an older M2, slapped into an USB 3.1 gen 2 ext case or whatever it's called these days, and installed 21.04 on it. While installing I took particular care not to place GRUB on the internal (Windows) drive. My idea was to press F12 during startup, select the correct disk, and then just go.
    Seems pretty straightforward, right? By the way, both Ubuntu and Windows boot in UEFI mode.
    The "problem" arises when I skip the F12 key-press, or the external Ubuntu drive is disconnected: I get a GRUB prompt. Switch off, restart, go through the F12 routine, select the internal (and at this point *only*) disk drive and Windows boots just fine. Ubuntu itself presents no problems whatsoever.
    As I said, I took real care not to install the GRUB bootloader on the main drive, so that if I wanted to boot Hippo (I need it to test for printers/scanners and various possible issues in office environments) I'd like to be able to boot a bit more easily. I mean, I *know* that if I wanted to boot Ubuntu I'd have to choose manually the startup disk, but why do I get a GRUB prompt even when the disk is disconnected and GRUB shouldn't be there at all on my internal disk *in the first place*?

    I'm really at a loss here, so any help would be appreciated.
    It's an annoyance, nothing more, but I still can't understand *why* this happens...

    PS: fast-boot in Windows is disabled.

    Thanks a lot to everyone!

    Cheers

  2. #2
    Join Date
    May 2007
    Location
    EU
    Beans
    56
    Distro
    Ubuntu

    Re: More 21.04 weird stuff

    Erasing the ubuntu EFI directory from Windows makes booting Ubuntu impossible, either via BIOS (it doesn't show at all) or F12 "select boot disk" but at least GRUB has gone. It shouldn't be there at all. Sometimes I miss LILO. And I hate UEFI.

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

    Re: External drive boot issue UEFI

    Moved to your own thread, since other thread is for that users issues.
    Unless contributing the OP's issues, you should start your own thread with your issue.

    Issue is somewhat similar.
    With UEFI you have to have an ESP on the external drive.
    And the Ubiquity installer makes it just about impossible to do that.
    Very old bug report with multiple work arounds.

    Posted work around to manually unmount & mount correct ESP during install #55 or( #23 & #26)
    https://bugs.launchpad.net/ubuntu/+s...y/+bug/1396379
    Others suggest disconnecting all other drives physically or logically in UEFI settings, so install drive is first drive.
    Or removing boot flag/esp flag from first drive, so only ESP is install drive. (I have not had that work, but others have.)
    Or if you have ESP on second or external drive, you can just reinstall grub, either manually or using Boot-Repair's advanced mode & full reinstall of grub to correct drive.

    Remove esp flag from Windows before install to second or external drive - Tim Richardson
    https://askubuntu.com/questions/1698...056079#1056079

    If you have a working install, create an ESP - efi system partition FAT32 100MB or larger. And then copy /EFI/ubuntu & /EFI/Boot from internal drive to external drive. External drives always boot from /EFI/Boot/bootx64.efi. But full install of grub needs /EFI/ubuntu files also.
    You also have to edit fstab with external drive's UUID, oras a major update or grub reinstall will just reinstall grub to ESP specified in fstab.
    Or reinstall grub manually or with Boot-Repair choosing the externals drive's ESP.

    If you need detail instructions based on your install:

    Lets see details, use ppa version with your live installer (2nd option) or any working install, not Boot-Repair ISO:
    Please copy & paste the pastebin link to the Boot-info summary report ( do not post report), do not run the auto fix till reviewed.
    https://help.ubuntu.com/community/Boot-Repair &
    https://sourceforge.net/p/boot-repair/home/Home/

    See also link in my signature below.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #4
    Join Date
    Mar 2011
    Beans
    1,705

    Re: External drive boot issue UEFI

    And do add yourself to the https://bugs.launchpad.net/ubuntu/+s...y/+bug/1396379 's "Does this affect me?" list. It'll never get fixed until the heat gets turned up.

  5. #5
    Join Date
    May 2007
    Location
    EU
    Beans
    56
    Distro
    Ubuntu

    Re: External drive boot issue UEFI

    Quote Originally Posted by ubfan1 View Post
    And do add yourself to the https://bugs.launchpad.net/ubuntu/+s...y/+bug/1396379 's "Does this affect me?" list. It'll never get fixed until the heat gets turned up.
    Done!

    Sorry,it's 6.30am and I slept very little. So my brain is not fully functional yet. One quick question though: what if I lost three hours of my time on this Earth physically disconnecting the internal hard drive, then boot from USB stick and install Ubuntu on the external drive? Would that work? Would future upgrades to Ubuntu pollute the internal Win hd with GRUB?

    I promise I'll dig deep into the details mentioned, right now it's just too early. Plus, /me hungry!

  6. #6
    Join Date
    Mar 2011
    Beans
    1,705

    Re: External drive boot issue UEFI

    Grub-install works just fine, it installs to where you tell it, and upgrades should be fine. Just the Ubuntu installer suffers from TMC (Too Much Code) and thinks it is so smart it can ignore user input.

  7. #7
    Join Date
    May 2007
    Location
    EU
    Beans
    56
    Distro
    Ubuntu

    Re: External drive boot issue UEFI

    Quote Originally Posted by oldfred View Post
    Moved to your own thread, since other thread is for that users issues.
    Unless contributing the OP's issues, you should start your own thread with your issue.
    Sorry, it just happened so many times that after searching a while and couldn't find anything 100% pertinent I'd reply to a thread that seemed to be about 90% so. It seemed more polite, and moderators made sure I understood that!
    Won't happen again!

    With UEFI you have to have an ESP on the external drive.
    And the Ubiquity installer makes it just about impossible to do that.
    (...)
    Others suggest disconnecting all other drives physically or logically in UEFI settings, so install drive is first drive.
    Yes, that's what I mentioned in my last post, but my main worry is that after a simple update/upgrade everything would return as it is now: both systems unbootable, Win with a simple workaround, Ubuntu "unreachable". Unless having an ESP on the external HD somehow prioritize it over the ESP on the internal (W10) HD. Maybe unmounting it before an update? Or skipping GRUB/Kernel upgrades altogether?

    Posted work around to manually unmount & mount correct ESP during install #55 or( #23 & #26)
    https://bugs.launchpad.net/ubuntu/+s...y/+bug/1396379
    I'll try to take a look at it but it seems a bit out of my league--I wouldn't want to end up with both systems theoretically working, data still intact but everything basically out of reach...

    Or removing boot flag/esp flag from first drive, so only ESP is install drive. (I have not had that work, but others have.)
    Hmmm, that'd mean (I think) fiddling with BIOS at every boot, toggling UEFI vs Legacy. Windows complains A LOT when installed in UEFI mode and then you switch to Legacy (have to re-authenticate with P-i-t-A 2FA MS Account for example)...

    At this point--well, in a coupla months at least since installing Ubuntu is easy as a cuppa, while reinstalling Windows is a Nightmare from Whatever Street you live in--wouldn't it be easier to just disable UEFI in BIOS and then trying the same procedure in "Legacy mode"? No OS should bother about ESPs, right?

    Well, at the time they said M$ wanted UEFI to make it harder for Linux users, especially dual booters--it seems like they have succeeded, and no amount of WSL can fix that, I need to test stuff natively.

    Remove esp flag from Windows before install to second or external drive - Tim Richardson
    https://askubuntu.com/questions/1698...056079#1056079
    I'll check it out, but I fear W10 won't be happy (well, it never is anyway)...

    If you have a working install, create an ESP - efi system partition FAT32 100MB or larger. And then copy /EFI/ubuntu & /EFI/Boot from internal drive to external drive. External drives always boot from /EFI/Boot/bootx64.efi. But full install of grub needs /EFI/ubuntu files also.
    You also have to edit fstab with external drive's UUID, or as a major update or grub reinstall will just reinstall grub to ESP specified in fstab.
    I haven't had to deal with fstab since Slackware in 2004, it's been a bliss ever since... I'll leave it as my last resort.

    Thanks for all the precious info! Cheers!

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

    Re: External drive boot issue UEFI

    You only have to change boot/esp flags once during install, then after install restore boot flag to internal drive's ESP.

    Your /etc/fstab has the mount of the ESP where grub reinstall will go with a major update. That just needs to be the correct ESP.

    Most do not want to disconnect a drive, so the other workarounds are available.

    Major grub updates or Windows updates will normally reset that system to be default or first in UEFI boot order. So you may have to change boot order on occasion.

    Check current order & hex number of each entry:
    sudo efibootmgr -v
    Change boot order with efibootmgr, some require all 4 hex char others 1 is ok.
    sudo efibootmgr -o 0,1,2
    see also
    man efibootmgr
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #9
    Join Date
    Apr 2021
    Location
    etc-apt-sources.list
    Beans
    24
    Distro
    Ubuntu 20.04 Focal Fossa

    Cool Re: External drive boot issue UEFI

    Quote Originally Posted by arkeo View Post
    what if I lost three hours of my time on this Earth physically disconnecting the internal hard drive, then boot from USB stick and install Ubuntu on the external drive? Would that work? Would future upgrades to Ubuntu pollute the internal Win hd with GRUB?
    i have a desktop with fossa on the internal sata hdd & this my primary rig for work & play & everything else.

    on the same desktop i have a portable seagate connected via usb on which i keep testing various operating systems.

    i do not want the fossa messed up even the slightest so what i do is disable sata controllers in the bios when i am trying out operating systems on the portable seagate.

    formatting, installing, uninstalling no matter what i do on the portable seagate the fossa on my internal sata hdd remains untouched.

    when i need fossa i enable the sata controllers in the bios & boot in to it. this saves me the trouble of manually connecting / disconnecting drives.

    hope this is useful for you.

  10. #10
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: External drive boot issue UEFI

    Quote Originally Posted by arkeo View Post
    What if I lost three hours of my time on this Earth physically disconnecting the internal hard drive, then boot from USB stick and install Ubuntu on the external drive? Would that work? Would future upgrades to Ubuntu pollute the internal Win hd with GRUB?
    Disconnecting and reconnecting the internal drive

    I think the time lost for physically disconnecting and reconnecting the internal drive is a small fraction of those three hours, probably less than one hour. And you must do the other work anyway.

    This is the most reliable way to make things work, when you want to install a complete Ubuntu system into an external system in UEFI mode. There are shortcuts, ways to turn off the automatic [re]direction of the EFI system partition into the internal drive, and they work in some computers, but maybe not in yours.

    There is a very detailed description in this link.

    But if you are happy with Ubuntu 20.04 LTS, you can simply clone a compressed image of an already installed system into your external drive according to this link.
    Last edited by sudodus; May 30th, 2021 at 08:58 PM.

Page 1 of 3 123 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
  •