22

I'm trying to perform some grub2 troubleshooting related to this question, and as part of the troubleshooting I'm trying to figure out what grub can see during the boot. How can I get the UUID of, say (hd0,msdos1) while I'm at the grub2 prompt?

JoBu1324
  • 639

3 Answers3

32

The ls -l command should be revealing.

psusi
  • 37,551
4

Programmatically, this can be queried with the probe command, e.g.:

probe --fs-uuid (hd0,gpt6)

The result can also be assigned to a variable with --set:

probe --set devuuid --fs-uuid (hd0,gpt6)
echo $devuuid
1

From GRUB command line, cat (hd0,gpt9)/boot/grub/grub.cfg should reveal the UUID. Remember to use "set pager=1" to scroll page by page