Score:0

Laptop boots to grub command line after installing to external hard drive

pk flag

I recently installed ubuntu to a 1TB external hard drive. I made sure to partition correctly and I chose the correct grub location, but it still somehow installed grub onto the base hard drive. There is now an ubuntu option in the boot order and I had to manually move it down one to boot. I would love the ubuntu boot order to stay there but only boot to grub when the external hard drive is plugged in. If that isn't possible I'm fine with manually selecting to boot it in the f12 menu. I just want it to be somewhat hidden and easy to access. If the ubuntu option is at the top of the boot order it boots to the grub command line with no option to boot to windows. I can choose windows bootloader and ubuntu when the external hard drive was plugged in but when it isn't it stays at the command line.

Nate T avatar
it flag
I have a feeling the target pc is not yours?? I did the same thing on my company-owned work laptop at almost the same time this question was originally posted XD. Technically, I didnt add anything to that pc, just changed a bit in the bios settings. The owner is scared to touch linux even for servers, and I cannot stand working on Windows.
Score:2
cn flag

Ubuntu's Ubiquity only installs to ESP on first drive, usually your internal drive.

You need an ESP - efi system partition on external drive, reinstall grub to external drive and make that default with Windows as second in UEFI boot order.

Use gparted to create ESP, FAT32 100 to 500MB with esp, boot flags. Then use Boot-Repair to reinstall grub using advanced mode.

https://help.ubuntu.com/community/Boot-Repair

Advanced mode screens, choose install & external drive's ESP.

https://sourceforge.net/p/boot-repair/home/Home/

Please add to this bug which shows several work arounds when installing to external drive.

Posted work around to manually unmount & mount correct ESP during install #55 or( #23 & #26)

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+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, also shown in bug report.

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

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

Change boot order using efibootmgr

Nate T avatar
it flag
alternatively, op could change over to legacy boot in BIOS settings, couldn't he/she? Does legacy boot support boot from external?
oldfred avatar
cn flag
Legacy boot may work for external. May have to change UEFI settings. And now some new systems are UEFI only (UEFI class 3). https://support.lenovo.com/us/en/solutions/ht510878-legacy-bios-boot-support-removed-in-lenovo-2020-products Several others also.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.