Score:0

Trying to reinstall Ubuntu on an external NVME drive but getting error when booting - Alert! uuid does not exist. Dropping to a shell!

ua flag

Hello everyone.

(Editing this question to include more details)

I'll try to describe my issue without making this a super ultra-long thread. Long story short: I've always wanted to have the freedom of having an external fully functional OS that I can take with me wherever I go and, if needed, simply plug anywhere and have everything I need on the go. After much research, I've ended up with Ubuntu and, after following some extremely complicated guides, I managed to get a functional external NVME drive with Ubuntu 20.04 LTS and life was good. That is, until I decided to upgrade my laptop to an Asus one and the wi-fi simply wasn't detected. I tried many things and, among the recommendations, was the upgrading of the kernel, which I did, but didn't quite work out. I, then, set my sights on upgrading Ubuntu to v 21 (non-LTS). This worked, but broke a LOT of stuff and the wifi still wasn't working. I tried digging for resolutions, but couldn't figure out what to do (I'm a newbie in Linux, forgive me).

I, then, found that you could reinstall Ubuntu on top of a current install and restore Linux to a functional state. I've followed the instructions and did everything I did back when I installed Linux on the external drive for the first time, but now, when I try to boot, I'm getting an error I never got before (probably due to UEFI boot dramas and grub settings).

I've checked fstab and the UUID indicated there matches my nvme and matches the /, /home and boot partitions.

When I boot, however, I'm faced with the below error (the XXXXX is my UUID, which I've hidden on purpose, but they do match my /etc/fstab, I've double checked).

Gave up waiting for root device. ALERT! UUID:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX does not exist. Dropping to a shell!

I'm at a loss here, as I'm a newbie in Linux, but I've already learned how to dig into fstab and fix the UUID, which is an issue I've had with my first try at this external install.

Since this is preventing me from booting from the external device, I'd like to ask for assistance with figuring out what else I should be doing to make sure that the device boots properly.

I'm sure there's something else that needs to be done to fix this, but I've fought so hard to partition the NVME (due to alignment dramas) the first time, that I don't want to repartition and just continue to use the current partitioning setup without having to format the partitions again. I'm happy to reinstall Ubuntu 21.X again, if necessary, but as long as it doesn't require reformatting.

I'm at a complete loss, though, as the UUID indicated by the message above is EXACTLY what's on fstab and I even did a search through grub.cfg file located under the boot folder of the EFI partition and the UUID is the same there, too. I've compared them perfectly with what's shown under Disks and the numbers match them exactly.

Thank you all and I'd highly appreciate it if you could help me out with what to do next here.

EDIT: I have an EFI/boot partition created in the NVME and I had already followed the guide suggested by a member, by unflagging the main drive's boot partition and leaving only the external NVME tagged as boot ESP before installing.

EDIT2: I'll try to gather the info to help answer the following post (I'm a newbie, so will try to run these tools and paste it here):

"Please copy & paste the pastebin link to the Boot-info summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install, not Boot-Repair ISO (unless 21.10) help.ubuntu.com/community/Boot-Repair & sourceforge.net/p/boot-repair/home/Home Ubuntu's Ubquity installer only wants to install to first drive. bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 – oldfred"

EDIT3: In response to the above: https://ibb.co/PgFJVWW https://ibb.co/nCFmGKL

EDIT 4 (pastebin with boot-repair report results): https://paste.ubuntu.com/p/455Jq5JrKH/

EDIT 5: I have removed the laptop from the equation and got an intel NUC, with the NVME drive removed completely, booted from scratch and performed the Ubuntu install again, but leaving the /home partition untouched. I have followed this guide: https://askubuntu.com/a/1324342/1384077. I have also followed these steps:

" • Do not reboot or unplug the target USB. • open Nautilus using sudo -H nautilus • Copy the boot and the EFI folders from the Ubuntu ISO file to the boot,esp partition sdx3. • Copy grub.cfg from partition sdx4 /boot/grub/ to partition sdx3 /boot/grub/ overwriting the grub.cfg file. • Re-Install GRUB: sudo -i mount /dev/sdd4 /mnt mount /dev/sdd3 /mnt/boot/efi grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi --removable /dev/sdd reboot "

After following the above, I have rebooted the system normally and still got the same error. I have used boot-repair to try to identify what may be wrong now, as there's no longer a device that I can't remove (in the laptop I was working before) and now there's no excuse to have grub on any other disk, apart from the USB (which is simply an enclosure running an SSD chip).

(pastebin with boot-repair report results): https://paste.ubuntu.com/p/mRgThXDzt6/)

Final EDIT: After trying absolutely everything I've managed to find online, following guides to reinstall Ubuntu, repair Grub, completely format the boot partitions and recreate them, nothing worked, so I ended up giving up, after wasting several days of troubleshooting and wiped the whole drive, recreated the partitions and reinstalled Linux following one of the guides I found online. It's now booting properly and I've tested with 2 different machines (secure boot off) and it's working.

Thanks to everyone for the attempts to help, and especially @oldfred for being so helpful, but it just didn't do the trick for me.

Thanks all again.

oldfred avatar
cn flag
Do you have ESP - efi system partition on NVMe drive? You may be booting from a different grub? Please copy & paste the pastebin link to the Boot-info summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install, not Boot-Repair ISO (unless 21.10) https://help.ubuntu.com/community/Boot-Repair & https://sourceforge.net/p/boot-repair/home/Home/ Ubuntu's Ubquity installer only wants to install to first drive. https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379
ar flag
Does this answer your question? [Installing Ubuntu in a external hard drive and NOT placing GRUB of my C: hard drive](https://askubuntu.com/questions/327229/installing-ubuntu-in-a-external-hard-drive-and-not-placing-grub-of-my-c-hard-dr)
newtolinux avatar
ua flag
Apologies, @oldfred. I've followed your steps and created a separate boot disk with boot-repair and when proceeding with the basic initial boot-repair options, I'm faced with the following (edited in the original question): I get the error, after following all the steps, that grub is still present and seems like it cannot be removed/fixed. As such, it seems like there's no option to generate a report at the end, since the process can't proceed. Happy to try alternatives as well. Thanks.
newtolinux avatar
ua flag
Thank you, @user68186. I have found that very same topic when doing a Google Search before posting here and followed the guidelines there, but to no avail. Sorry, but it seems like it's something else.
oldfred avatar
cn flag
You run the report separately from running updates. And you do not want to remove grub unless you can fully reinstall it. That does require Internet access. This shows the screen you should initially see and you just want the Create Boot-Info Summary. https://sourceforge.net/p/boot-repair/home/Home/
newtolinux avatar
ua flag
@oldfred apologies for the Noobishness. Here you go: https://paste.ubuntu.com/p/455Jq5JrKH/ Thank you!
Score:1
cn flag

You have installed grub twice to drive shown as sdb. And have /EFI/ubuntu in the NVMe drive. Only one is updated with reinstall. Only one of those should work. Review entries in UEFI boot menu. Report does not show any UEFI entries for ubuntu nor UEFI:external drive's label. Also external drives lose UEFI entry when disconnected. Then you boot external just like live installer choosing the UEFI:external drive entry which then must be updated to work. I would set that is default for grub updates in fstab.

Once in BIOS boot mode as you have grub in gpt's protective MBR and a bios_grub partition and you have an ESP with /EFI/ubuntu & /EFI/Boot folders. Both of those you would have to select from UEFI boot menu just as you boot live installer. The Ubuntu entry in UEFI is from the ESP on the NVMe drive. With 3 grub installs you have a 1/3 chance of selecting the correct one.

How you boot install media, UEFI or BIOS is then how it installs or Repairs. So you want to always boot in same boot mode.

External drives only directly boot in UEFI mode from /EFI/Bootx64.efi just like how you boot installer. The ubuntu entry in UEFI would be from NVMe drive's grub. And UEFI should show a BIOS boot entry.

If always booting external drive from "ubuntu" entry in UEFI, that would be version in internal drive's ESP. You can use Boot-Repair's advanced mode to choose an install and then choose drive to install grub. If you disconnect external drive, this entry will probably stop working. Then you need a valid entry on external drive.

And/or if you want to be able to boot external drive from other systems, you need current grub in external drive's ESP. Again you can use Boot-Repair. I would just be sure to not use BIOS mode to boot, so that grub is never used.

If for some reason you have an old BIOS system and want external to boot it, you can reinstall grub's BIOS version grub-pc and install that. Its just that only one version is updated with reinstall or major update of grub & then they may get out of sync.

Otherwise always boot in UEFI boot mode to make repairs or updates. You will need to review /EFI/ubuntu/grub.cfg, fstab and UUID and GUID/partUUID of UEFI boot entry & partUUID of UEFI boot entry to know which system is default boot and if it has correct entries. Boot-Repair shows all those or:

cat /EFI/ubuntu/grub.cfg
cat /etc/fstab
lsblk -e 7 -o name,fstype,size,fsused,label,partlabel,mountpoint,uuid,partuuid
sudo efibootmgr -v
newtolinux avatar
ua flag
Hello @oldfred. I have made a new attempt, this time completely eliminating the risk of competing with the internal disk (impossible to remove as it's a Surface Pro device). Please see my EDIT 5 for the details on everything I've followed so far, my new attempt at remediating this by reinstalling Ubuntu and the new pastebin after running boot-repair. It still doesn't work, but please keep in mind that I want this device to be bootable from any device, and I can't, for the life of me, recall (tried googling to death) where the original guide I followed is. Thank you.
oldfred avatar
cn flag
Ubuntu entry in UEFI is not a standard UEFI entry. It looks more like a default type entry after a drive is disconnected. Are you booting from UEFI boot menu and choosing UEFI:XXXX where XXX is external drive's name or label?
newtolinux avatar
ua flag
Hi @oldfred I haven't selected anything, I've simply removed everything and left only the USB device and allowed the USB to be booted first. Exactly as I was doing before I made the mistake of updating Ubuntu and breaking what took me so long to get working in the first place.
oldfred avatar
cn flag
Try going into UEFI boot menu and choosing the UEFI boot entry for the external drive.
newtolinux avatar
ua flag
Thanks @oldfred. I've edited the main question with the latest information, but long story short, it didn't work :( I ended up giving up, wiped the whole drive and started from scratch. Thankfully I had backed up my application data before trying the upgrade, so now I can reinstall everything again and hopefully restore the settings for the main apps I was using without too much drama. Thanks again.
oldfred avatar
cn flag
Did you put an ESP partition on external drive? And one of the work arounds needed with Ubuntu's Ubiquity per bug report? https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 Remove esp flag from Windows before install to second or external drive - Tim Richardson https://askubuntu.com/questions/16988/how-do-i-install-ubuntu-to-a-usb-key-without-using-startup-disk-creator Otherwise your boot entry is from internal drive's ESP and external will only boot from that internal drive entry.
newtolinux avatar
ua flag
Thank you again @oldfred. Yes, I have indeed followed the same steps I had followed in the past and selected the ESP partition as the bootable one. I have tested in 2 separate devices (1 laptop and 1 desktop) and it worked just fine. Thanks again!
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.