rEFInd can read labels from either the filesystem or the partition table. Given that you're trying to do this from OS X, you're far more likely to have luck giving the partition a label you want in the partition table than in the filesystem, but you'll need to use the right tool. One tool that can handle this task is my GPT fdisk (gdisk
). You can change the name with the c
option, like this:
$ sudo gdisk /dev/sdd GPT fdisk (gdisk) version 1.0.0 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): p Disk /dev/sdd: 7989248 sectors, 3.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): AAA445FC-DEAB-4E2D-B2BF-5F9DF434A302 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 7989214 Partitions will be aligned on 2048-sector boundaries Total free space is 4029 sectors (2.0 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 7987199 3.8 GiB 0700 Foo Command (? for help): c Using 1 Enter name: Bar Command (? for help): p Disk /dev/sdd: 7989248 sectors, 3.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): AAA445FC-DEAB-4E2D-B2BF-5F9DF434A302 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 7989214 Partitions will be aligned on 2048-sector boundaries Total free space is 4029 sectors (2.0 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 7987199 3.8 GiB 0700 Bar Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdd. The operation has completed successfully.
This example is on a Linux system modifying a USB flash drive at /dev/sdd
, but it would work pretty much identically in OS X, except that the disk device should be /dev/disk0
. There's also an EFI version of gdisk
that you can run from rEFInd, but that version has bugs, particularly on some systems, so it's best to stick with the OS X version if you can.
Another option, of course, is to give the filesystem a label in Ubuntu. If it's an ext2/3/4 filesystem, you can do this with tune2fs
, as in:
sudo tune2fs -L "Desired Name" /dev/sda4
Change Desired Name
and /dev/sda4
as needed, of course. You can do this even if a filesystem is mounted.