0

[NOTE: Even though the boot menu is messed up, since I can still get it to boot to the correct system with a workaround, I'm not freaking out about this problem. It's just annoying that I did this, and would like to get it fixed.]

I really appreciate the comments so far, but I am just not getting it somehow, and I'm also not convinced that I'm communicating effectively enough to make sure others know what I'm even dealing with.

So..... Would anyone be willing to mirror back to me what they think I'm trying to say?


OK....I'm an idiot. Whew! Glad that's out of the way. lol

I have a mini PC running Ubuntu 20.04 LTS Desktop (I've been using Linux, including Ubuntu, for a very long time, but I'm still pretty much a noob when it comes to what's actually going on under the hood. I know...remember above?).

I have a USB flash drive with Ubuntu on it that I use to install Ubuntu on other computers (it's what I used to install it on this mini PC).

I wanted to 'Install' Ubuntu onto another flash drive so that I could use it for some testing on a completely different system (I just needed a bootable Linux OS of some sort, and I figured this should work just fine).

So, I shut the mini PC down, plugged both USB flash drives (the one I use to install Ubuntu, and the new, blank one) into the mini PC, and turned it on.

At the boot menu, I selected to boot to the USB flash drive that I use for installing Ubuntu.

I went through the whole process of choosing options for how and where to install Ubuntu (especially making sure to choose the flash drive for where to install....since that was the whole point), and told it to go do it.

Well, as I'm sure many/most of you know, what I ended up with is basically my same, old Ubuntu system, on this mini PC with what appears to be all of my old settings, etc, but now, it's somehow tied to this other USB flash drive (i.e. when I turn the mini PC on without that flash drive plugged in, it goes to a grub prompt, and that's it, whereas, with that flash drive plugged in, I get two Ubuntu OS choices; the first one does nothing (or whatever it does, it isn't a bootable option as far as I can tell), and the second one boots up to the old Ubuntu system.

QUESTIONS:

  1. What the #5$@ did I do, and why wasn't that the right choice?

  2. How do I get it all back to 'normal' so that I don't need to have that flash drive plugged in?

  3. How do I accomplish what I was originally trying to do? Would I need to do the same install process, but while having the mini PC's SSD disconnected?

EDIT1: I just looked at the partitions in 'Disks', and it looks like it's actually configured properly in there. So, perhaps I just need to edit the grub menu. I got a GUI tool for that for now. Will report back...

EDIT2: OK...no. Without some study, it's not immediately obvious what I need to do in the grub menu. I'm also not 100% sure that that's all I need to do.

EDIT3: I tried Boot-Repair, but it failed to restore my boot menu.

Obviously, my ignorance about what goes on under the hood is holding me back on this. So, since it's working fine once I get it booted via workaround, I think I'm probably going to just let it sit in its current condition until I learn enough about Linux to be able to fix it myself.

However, if anyone has any input, I will listen, and give things a try as I understand the instructions well enough to follow along.

Thanks, guys. I really appreciate your attempts to assist me.

  • Very old bug if UEFI. Grub only installs to first drive usually internal drive. If you have ESP on full install flash drive, reinstall grub into it and boot internal drive's Ubuntu and reinstall grub from it. Or copy all files from ESP on internal drive to external. External will boot from /EFI/Boot/bootx64.efi like installer, not an ubuntu entry like internal. Posted work around to manually unmount & mount correct ESP during install #55 or( #23 & #26) https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 – oldfred May 24 '21 at 02:40
  • @oldfred First, thank you for responding. Also, sorry for being such an old noob. I'm trying. lol

    I see a folder named ESP in var/lib/grub on the flash drive that I told it to install Ubuntu to.

    When you say to "reinstall grub", I didn't 'install' it (I mean, not directly, or knowing it lol). So, is there anything special I need to know, or should I just go find out how to install it, and then do that while keeping your comments in mind so that I do it correctly?

    – ubuntoid May 24 '21 at 04:13
  • @oldfred Also, I need a bit more detail to know what's what in some of your comments. When you say, "internal drive", do you mean the SSD that holds the main Ubuntu system? When you say, "external drive", do you mean the USB drive that I told the installer to install Ubuntu to? – ubuntoid May 24 '21 at 04:26
  • You need an ESP on flash drive. Since Ubiquity install only installs to first drive's ESP, it does not create one on any second drive. http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu You do not have to reinstall, just use gparted to shrink a partition by 100MB make FAT32 partition & esp,boot flags. Then copy /EFI/Boot & /EFI/ubuntu from SSD's ESP. Once you know it works, you want to edit /EFI/ubuntu/grub.cfg with UUID & drive of SSD install. https://askubuntu.com/questions/792413/how-to-set-grub-from-second-linux-distribution-as-default-in-uefi-boot – oldfred May 24 '21 at 14:05
  • @oldfred I still don't understand what "an ESP" even is. – ubuntoid May 24 '21 at 21:18
  • Link above shows creation of a FAT32 partition and then giving it esp flags. The ESP - efi system partition is required for UEFI boot. UEFI/gpt partitioning in Advance, new versions use swap file so swap partition optional: http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu But you only need to use gparted to shrink any partition by 100MB, create FAT32 partition and give it esp,boot flags. Then copy files from internal drive's ESP. All external drives boot from /EFI/Boot/bootx64.efi, but full grub needs /EFI/ubuntu folder also. – oldfred May 25 '21 at 02:31
  • @oldfred OK. Thank you. Unfortunately, I'm finding it difficult to even follow along with what you're trying to say. I know it's me. Not your fault at all.

    I tried to ask some clarifying questions above so that I could better understand what you mean by some of the terms you have been using. If you'd be willing, I would love to hear your responses to those clarifying questions.

    – ubuntoid May 25 '21 at 03:48
  • This is a question and answer site. Ubuntu Forum is better for this type of question and detail responses. First create a 100MB FAT32 partition on external flash drive using gparted. Then post this above, so we can confirm it is correct. sudo parted -l If you have Boot-Repair, post the link to its report. It tells you to post the link if you have issues. – oldfred May 25 '21 at 14:33
  • OK. Thank you. haha...somehow, this is the place I thought was the Ubuntu forum (I just haven't been paying enough attention). lol I will do both things you suggested...I'll go there, but I will also post link to the Boot-Repair log (I need to go run it again, but will be back with that...). – ubuntoid May 26 '21 at 01:57
  • Here is the URL for the Boot-Repair... https://paste.ubuntu.com/p/jhBrvbZ2MM/

    [Note: I enabled root, logged in as root, and performed the Boot-Repair while logged in as root. I do not run as root any other time.]

    – ubuntoid May 26 '21 at 04:35
  • It is missing all the info after repair which shows configuration. It does say it reinstalled grub. I do not know LVM type installs, so someone else would have to see if configuration is correct. – oldfred May 26 '21 at 13:19
  • OK, thanks. I will go to the forum, and see if anyone can assist. Thank you, very much. – ubuntoid May 26 '21 at 16:07

1 Answers1

0

Seems you have been messed up your bootloader (so the local disk has no bootloader, the USB has two). If you have a backup of the original operating system's bootloader, you can try this:

  1. Restore the bootloader on the original disk
  2. Remove the local disk and plug in two USBs
  3. Install Ubuntu on USB
Emoji
  • 577
  • Thanks. If there is some automated mechanism for making backups of the bootloader that I wouldn't have needed to set up, there may be a backup. However, I have never intentionally done a bootloader backup.

    The original Ubuntu OS is still pretty much fully in place as it was before. Is there a chance what is needed may be there somewhere?

    – ubuntoid May 24 '21 at 06:01
  • I just remembered that I do have a full backup image of the drive where the actual, original system is. I saved the backup with Rescuezilla. I know how to perform a complete restore, but not sure about the bootloader. Is that easy? I will go study, but if you have any specific instructions, or a link, I would be in your debt. – ubuntoid May 24 '21 at 18:19