Other Using UUID when booting via GRUB

I have numerous devices which I boot using Ventoy and a GRUB menuentry.

With FreeBSD I have something simple which includes something like:-

set root=(hd0,gpt3)
kfreebsd /boot/loader

This becomes a problematic when I want to boot from an alternative device, so I thought I may be able to get round this by using UUID instead. If that makes sense, how to I get the UUID of what is /dev/da0p3 from the pov of FreeBSD?
 
In the output of gpart list look for rawuuid in the list of providers.
On further investigation, I found I could use glabel to get what I wanted using

glabel status | sed -n '/ da0p3/s.gptid\//p'

which almost works although I'm still left with some garbage at the end of the line.
I'm searching for ' da0p3' to avoid including 'ada0p3'.

If any sed guru reads this could you advise how to exclude ' N/A da0p3' from the output?
 
Back
Top