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?
Asked
Active
Viewed 3.0k times
3 Answers
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

Remember Monica
- 218
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

emeralddove
- 139
ls -l
would do this, it's because the GRUB prompt supports anls
command that can list devices. – Eliah Kagan Jan 22 '17 at 05:17