Score:1

Multiple partitions with same UUID, grub error, cannot boot

pg flag

I'm quite new to Linux so I thank you in advance for your patience as I'm learning.

I'm running Ubuntu 20.04, and I recently got a grub error at startup -- this one: https://www.geeksforgeeks.org/how-to-fix-minimal-bash-like-line-editing-is-supported-grub-error-in-linux/ I followed the directions at the link above to fix it, and was able to get into the OS and everything was working fine. The next time I powered it up, however, I got the same grub error. Now:

grub > ls gives me (proc) (hd0) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1).

grub > ls (hd0) gives No known filesystem detected.

grub > ls (hd0,msdosX) where X is 1, 2, or 5, all say the exact same thing: Filesystem type fat, and they all have the exact same UUID and size.

grub > set shows root=hd0,msdos1 and prefix=(hd0,msdos1)/boot/grub.

I am not doing a dual-boot; I only ever installed Ubuntu as a single-boot. So I have no idea how I ended up with multiple partitions, no idea why the filesystem of msdos1 changed from ext* to fat, and no idea why they all ended up with the same UUID (which I'm guessing is the cause of, or at least related to, my boot problem).

Edit for clarification: I did look up ways to change the UUID, but the instructions I found required starting from within the OS, not from grub.

At this point I'm thinking I should just reinstall the OS. But my questions are:

  1. Before reinstalling, is there anything else to try?
  2. How might I have ended up with all these partitions, if I didn't make them explicitly, and how do I avoid recreating the same problem with the new install?
  3. Is there any way to rescue my files from here?

Thanks, MJ

guiverc avatar
cn flag
The UUID tells you the ID is supposed to be *unique* given the Unique in its name. if there are more than one partition/drive with the same UUID, what happens from there is *undefined* as its a condition that should never exist. You should correct that problem, as what you're asking about is hardware specific (inc. firmware) and may actually differ on just *reboot*, ie. why it's *undefined*, so unless your purpose is to *corrupt* your data - your should fix your issue, and have UNIQUE Unique Universal IDs as intended. (*based on your title, your question is unclear given title though*)
user1668737 avatar
pg flag
Thank you for your comment. That part I understand; there should not be three drives with the same UUID. However, I also don't know how to correct that. I looked up how to change them, but everything I found online required starting from within the OS, which I cannot do, because I cannot boot. Hence why I am considering reinstalling the OS. My specific questions are listed at the bottom, and numbered.
guiverc avatar
cn flag
Boot *live* media as you cannot boot any OS on a drive that contains a non-unique UUID. How you boot *live* media varies on device & firmware. An OS won't create a partition without a unique ID (UUID) so multiple identical UUIDs are usually the result of *operator* error (eg. *cloning a drive & not changing the ID, or not using only one *drive* with that *cloned* data drive at a time*).
user1668737 avatar
pg flag
Thanks for the clarification, @guiverc. Assuming I'm able to boot from a USB, should I delete these partitions? rename them? Will the new boot create a new partition, and will the old ones still cause the same issue?
guiverc avatar
cn flag
If this is a new system, I'd just *clean* install (with format, which will generate a new unique/UUID), but I don't know what else is on your drive, if you've any data that's valuable etc.. so ensure you backup first. If it's a test box you're using to *learn* with, I'd play/experiment & learn. You can *unclean* install Ubuntu systems, where data survives (assuming desktop, you didn't specify 22.04 desktop or 22.04 server etc) but *unclean* won't format & correct the UUID issue. I don't understand how you got non-unique UUIDs so I limited in what I can advise, but I'd try & start again
C.S.Cameron avatar
cn flag
GParted has the option to change a partition's UUID number. Are any of your offending partitions Live installs? Live installs of the same version all use the same UUID.
I sit in a Tesla and translated this thread with Ai:

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.