Score:1

Alarming grub message that has no significant effect - how to get rid of it?

us flag

On a test system today I installed an SSD - this is the first time I've messed about with a PCIe mounted SSD instead of a SATA one.

The test system is a 64 bit UEFI computer, currently it's triple booted with Ubuntu 20.04 on a hard drive, 20.04 on the SSD, and 21.04 on yet another hard drive.

All 3 systems boot and work fine...in the end.

But, when I choose the SSD install of 20.04 from the grub menu, grub (presumably) throws up a scary message

ERROR: No such device: [the (correct) UUID of the SSD is listed]

Press any key to continue...

When this happened the first time, I was sure I was hosed. Incorrect UUIDs are fatal in grub!

But after a few seconds, the screen cleared and the system booted to the SSD install just fine. (The same thing happens if I actually press any key)

So...what's producing this error message, and how can I get rid of it? The UUID listed in the error message is correct.

Here is a hexdump of sometroubleshooting data from a command suggested by @paladin

dd bs=1K if=/dev/sdX of=/tmp/MBR-GPT.bin count=1

A hexdump of the resulting file is

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001c0  02 00 ee ff ff ff 01 00  00 00 a1 94 1a 1d 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI PART....\...|
00000210  6d 22 af 26 00 00 00 00  01 00 00 00 00 00 00 00  |m".&............|
00000220  a1 94 1a 1d 00 00 00 00  22 00 00 00 00 00 00 00  |........".......|
00000230  80 94 1a 1d 00 00 00 00  90 52 b0 ef 4f 1d 1a 49  |.........R..O..I|
00000240  91 0f 8f 98 2a 3f 90 67  02 00 00 00 00 00 00 00  |....*?.g........|
00000250  80 00 00 00 80 00 00 00  74 14 20 44 00 00 00 00  |........t. D....|
00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400
paladin avatar
kr flag
It's a serious warning you should fix. You are lucky that your system boots anyway. Reason of your error is probably multiple installations of GRUB. The first GRUB (the old one) fails, because the UUID is "wrong". The first GRUB aborts and the BIOS tries to boot from the next boot device. This time it's your SSD with a new GRUB install and this works just fine. You need to uninstall GRUB from your non SSD device or remove that non SSD device from BIOS boot order.
Bruni avatar
cn flag
@paladin I think this should be an answer, as it explains convincingly the reason why this is happening. The only part missing is how to adjust the grub menu of the first drive to include the other boot options.
Organic Marble avatar
us flag
@paladin you might be on to something...but this is a UEFI machine. There's only one grub install, in the EFI partition. There are no wrong UUIDs. If I've misunderstood, please expand on your comment. I'd love to fix it.
paladin avatar
kr flag
Please take a look in your BIOS and make sure your machine only boots from UEFI, make sure it doesn't boot from UEFI and also "legacy". GRUB-boot loader may be installed in former MBR or in UEFI-Removable-Disk-Section and thus **doesn't need** to be resident in your EFI-System-Partition-FAT-filesystem as a file. I'm pretty sure you have multiple times GRUB installed, no matter how.
Organic Marble avatar
us flag
@paladin thanks, but all the disks are GPT, there is no MBR grub installation and CSM is disabled in the UEFI settings. I'll run through the UEFI settings again. Note the problem only started with the installation of the PCIe SSD. If you have instructions for how to check for this multiple grub installation, please share them.
paladin avatar
kr flag
GPT doesn't guarantees that there is no MBR. In a hybrid MBR/GPT installation you have both. Those hybrid partition systems are often created when you have partitioned a former boot drive/volume with GPT in a computer system which doesnt supports boot from GPT. So a small MBR is created which stores the boot loader aka GRUB. You can check for MBR on all your drives/volumes with `dd bs=1K if=/dev/sdX of=/tmp/MBR-GPT.bin count=1`. The first 512bytes are the MBR/protective MBR and the next 512bytes are either a bootloader, or the primary GPT header or "nothing".
Organic Marble avatar
us flag
@paladin Thanks! Will perform that check.
Organic Marble avatar
us flag
@paladin I did the `dd` command on one of the drives and placed the output in the question. What should I be looking for? And, thanks for your willingness to help.
paladin avatar
kr flag
When the first 446bytes are "nothing" (`00000000...`) it indicates that there is no MBR bootloader (aka no GRUB). Beginning with address `0x000001be` is the 1st primary MBR partition -> `00000200ee`, at address `0x000001ce` is the 2nd, at `0x000001de` is the 3rd and at `0x000001ee` is the 4th. `00000200ee` -> first byte indicates if it's "BIOS-bootable (DOS)", `00` means it's not. Next 3 bytes define the first address of that partition, so that partition starts at `0x000200` (In your example it's your primary GPT header.) the last byte indicates the partition type, `ee` or `ef` is EFI.
Organic Marble avatar
us flag
@paladin many thanks for the explanation
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.