1

I used a mini.iso to install a minimal LUbuntu 18.04 on a 4GB USB flash drive. I basically just followed the steps and only selected the core and minimal LUbuntu packages.

At the end of the install, it claimed that it had detected "Windows Vista" on the main drive, and wanted to install a boot loader so I could pick which OS to boot. This is odd as this machine never had Vista, it came with Windows 8 which was later upgraded to Windows 10. I rejected this suggestion though because I'm only going to connect the USB flash drive when I want to boot from it, and it seems rather weird to have a menu to select a way to boot that may not be present. So instead I told it to install the boot loader to the USB drive itself.

However, after doing so, when I try to boot from this device from legacy mode (i hit a key to get a list of boot devices, then select the USB drive), I just get a black screen with a flashing cursor in the upper left corner of the screen. I waited around ten minutes for it to boot or do anything, so I am pretty sure it wasn't just being slow. Hitting ctrl+alt+del doesn't reboot the system, once it hangs like this I have to actually cycle power to try to boot again.

I also tried booting with secure boot (EFI) which I just assumed should work since the full Live USB loader works, but when I do this it doesn't even try to boot, the BIOS screen with drive selection just flashes and nothing happens.

What did I do wrong (if anything) and how do I fix this so I can boot the USB flash drive? When I mount the drive on another machine I see one partition that I can mount. If possible, I would like it to boot in EFI mode so I don't have to manually switch to legacy mode every time I want to use the drive. Also, if I don't have to start over from scratch that would be nice, as I've already wasted several hours trying to install in various ways that failed before I even got this far.

Update: In looking at the partition on the USB flash drive I installed LUbuntu to, I noticed that the "boot" flag was not yet, which seemed really weird. I tried setting it, but this did not fix the issue.

Update 2: I found a tool called "Boot Repair" which I thought might be helpful. But when I tried to run it in a VM with my USB flash drive attached, it refuses to fix my USB flash drive because I'm not booted from a live USB.

Michael
  • 1,135
  • Give this a try. This looks like what you want to do. https://askubuntu.com/questions/740253/how-to-install-grub-in-an-external-hard-drive – Tyler Chambers Jul 03 '18 at 23:26

1 Answers1

0

This is how I fixed the issue. First, I booted to a Live USB image. Along the way I found the switching between legacy boot and UEFI / Secure boot had a weird glitch. I recalled that I originally ran the Live USB image in secure boot, but in legacy mode it still ran, but with a different looking menu. But when I switched back to secure boot in anticipating of making Ubuntu work with that, my attempt to boot the USB flash drive initially did not work - at first it just ignored my attempt, then it rebooted back to the POST and tried to boot into windows. On the third attempt it finally brought up the original LUbuntu menu and I was able to boot into Live mode.

Once booted I opened a terminal. I installed and Boot-Repair with the following commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

When boot-repair had started, I clicked on "Advanced options", and then on the "GRUB location" tab. I found that there was already a "Separate /boot/efi partition" line referring to /dev/hda1. After doing a bunch of research it appeared that it was okay to use the already existing Windows created partition, so I left this option checked. It wanted me to disabled secure boot, but I ignored this and pressed on. It then gave me some commands to copy/paste into a terminal. (I'm not sure why it couldn't run them itself...) After letting them finish running I clicked to continue and got more commands to copy/paste. When this was all done and boot-repair was finished, I rebooted. Now when I go to the BIOS boot device list, there is a new "ubuntu" option - I have to select it instead of the actual device ubuntu is installed on, but it works and boots!

When I went back to boot into Windows, I discovered that ubuntu had been placed above the normal windows boot, so with the USB flash drive removed, it dropped me into Grub. So I had to go into the BIOS to change the order.

(Note: When Windows started it wanted to go into automatic repair and claimed it may take over an hour to repair the disk, but after about 20 minute it was done and had booted successfully, after which I was able to boot back into LUbuntu)

Michael
  • 1,135
  • This should show the two screens you get booting live installer. One is BIOS and the other is grub or UEFI boot. And then you get grub after installed, if more than one system installed. Shows install with screen shots. Both BIOS purple accessibility screen & UEFI black grub menu screen https://help.ubuntu.com/community/UEFI the mini ISO did not used to be UEFI bootable. Is it now? User usually just used server installer that is UEFI bootable and installed desktop of choice, or just GUI of choice without full desktop applications. – oldfred Jul 04 '18 at 03:36