Jump to content

Partition names and labels


Lheair
 Share

5 posts in this topic

Recommended Posts

In OS X, when one creates a new partition with Disk Utilities, we can give it a name of our choice, it's the filesystem name (Windows or Linux call it a "label") but Disk Utility itself chooses a name for the GPT data structure's name for a partition (that one is called "name" in GParted). Only Disk Utility doesn't display it and doesn't let us choose it.

 

For example, if we create other HFS+ partitions, it calls them "untitled". If we add MS-DOS (FAT) partitions, Disk Utility will call them "DOS_FAT_32_untitled_2".

 

Changing the partition label is easy but is there a way to change the name within OS X?

Link to comment
Share on other sites

A couple of ways; use command + I (eye not L) to get a Get Info and rename it there.  If the drive is on the desktop (Finder - Preference - General - show hard drive) just control click or right click and the pull down will let you rename the drive.

--Lou Cioccio

Link to comment
Share on other sites

A couple of ways; use command + I (eye not L) to get a Get Info and rename it there.  If the drive is on the desktop (Finder - Preference - General - show hard drive) just control click or right click and the pull down will let you rename the drive.

--Lou Cioccio

 

Right, but that would be what Mac calls 'name' and Windows or Linux call 'label'. That is easy to change.

 

I am looking to change the GPT name, which Disk Utility also gives to a partition it creates.

 

It can be changed with GParted, of course, but that will actually mess up a hybrid MBR/GPT partitioning, if there is one. I am looking for a way that would just change the GPT name and nothing else.

Link to comment
Share on other sites

No sure but look here

Lou Cioccio

Thanks. I have tried that but I haven't been able to make it work.

 

However, I found Rod Smith's GDISK utility, which seems to do the trick:

 

http://www.rodsbooks.com/gdisk/sgdisk.html

 

 

-c, --change-name=partnum:name Change the GPT name of a partition. This name is encoded as a UTF-16 string, but proper entry and display of anything beyond basic ASCII values requires suitable locale and font support. For the most part, Linux ignores the partition name, but it may be important in some OSes. If you want to set a name that includes a space, enclose it in quotation marks, as in sgdisk -c 1:"Sample Name" /dev/sdb. Note that the GPT name of a partition is distinct from the filesystem name, which is encoded in the filesystem's data structures. 

 

Claude

Link to comment
Share on other sites

 Share

×
×
  • Create New...