You can always use the PARTUUID. A filesystem LABEL or PARTLABEL are also acceptable, but require first creating the label in parted
or gparted
or whatever. The PARTUUID can just be pasted in without any additional futzing about. Just run sudo blkid
and identify the partition you need, scoop up the PARTUUID and you are off to the races.
The PARTUUID for the volume
entry should be the partition where the kernel image is–usually this is the EFI partition (/boot/efi
would be the most common place) but some configurations put it in /boot
which might be the main partition.
If you aren’t sure, poke around until you find the actual kernel bits:
root@debian:~# cd /boot
root@debian:/boot# ls
config-5.10.0-13-amd64 config-5.10.0-16-amd64 grub initrd.img-5.10.0-14-amd64 System.map-5.10.0-13-amd64 System.map-5.10.0-16-amd64 vmlinuz-5.10.0-14-amd64
config-5.10.0-14-amd64 efi initrd.img-5.10.0-13-amd64 initrd.img-5.10.0-16-amd64 System.map-5.10.0-14-amd64 vmlinuz-5.10.0-13-amd64 vmlinuz-5.10.0-16-amd64
Then use df
to help figure out what partition you are in.
root@debian:/boot# df /boot
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 243520884 14241548 216836304 7% /
Finally, use the device to grab the PARTUUID.
root@debian:/boot# sudo blkid /dev/sda2
/dev/sda2: UUID="090f73ad-a4ab-4819-83d5-6fd6add31b5a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="fd52a804-e4bc-4c19-9751-72c81ccffc10"
In this example, my volume
entry should look something like this:
menuentry "Debian" {
icon /EFI/refind/icons/os_debian.png
volume PARTUUID="fd52a804-e4bc-4c19-9751-72c81ccffc10"
loader /boot/vmlinuz
initrd /boot/initrd.img
options "root=PARTUUID=fd52a804-e4bc-4c19-9751-72c81ccffc10 quiet splash"
}
Note the “volume” and “root” PARTUUID’s are the same in this example because the kernel image is stored at /boot
on the root partition (instead of /boot/efi
on the EFI partition)–that is not always the case.
That “volume” line needs the
PARTUUID=" - "
, so like this:
volume PARTUUID='0FC63DAF-8483-4772-8E79-3D69D8477DE4'
Other than that, assuming those PARTUUID’s are pointing to the correct partitions, it looks good to me!