Renaming Hard Disk

Janothin
New Contributor II

Does anyone know how I could rename the internal hard drive to all have the same name I've selected one time? I would like the ability to modify the name and run it again in the future.

9 REPLIES 9

donmontalvo
Esteemed Contributor III

sudo mv /Volumes/Macintosh HD /Volumes/yadayada

Would be surprised, but not shocked, if any apps give a s**t about the boot drive name...so would test to make sure nothing you're running breaks.

--
https://donmontalvo.com

Janothin
New Contributor II

Thank you for the code! What would be the best way to implement this on Jamf Admin?

Nix4Life
Valued Contributor

lazy typer version:

diskutil rename "/" "newname"

donmontalvo
Esteemed Contributor III

Ooh nice...updating my cheat sheet!

--
https://donmontalvo.com

tcandela
Valued Contributor II

@Nix4Life @donmontalvo is there a new method to rename the drive with Catalina?

in terminal I tested diskutil rename "/" "mac drive"
and it only changed the Catalina main volume while leaving the "old name - Data" volume unchanged.

Nix4Life
Valued Contributor

@tcandela I have no provisioning until Wednesday, I will report back then

tcandela
Valued Contributor II

@Nix4Life thanks.

I had a strange occurrence. Setup a laptop for a user, name the drive Macintosh SSD and FV2 is setup via policy using the filevault payload, a week later i get notifications email that the laptop was removed from FV2 encrypted laptops smartgroup. I check the inventory information in JAMF Pro and I see that it says laptop is not encrypted and the drive is now named Macintosh HD. Information for the laptop in the disk encryption is below. It still shows the recovery key information, and individual recovery key validation shows now 'invalid'

Name: Macintosh HD (Boot Partition)
Last Inventory Update: 09/24/2020 at 2:55 PM
FileVault 2 Partition Encryption State: Not Encrypted
Individual Recovery Key Validation: Invalid
Individual Recovery Key: GGGG-GGGG-FH4Q-AG5P-9KQ9-GGGG
Institutional Recovery Key Status: Not Present
Disk Encryption Configuration: Setup Basic Encryption
FileVault 2 Enabled Users: Leroy, Bob

Nix4Life
Valued Contributor

Hey @tcandela ,

you are correct. The command we use works for us to name only the harddrive, not the container(s) however you have bought up an interesting point. you could look into running *diskutil list internal virtual | grep for data disk/container* and rename. I have not tried that so test test test and then test

MrRoboto
Contributor III

If using a script like the following to renamed to Boot volume... the Data volume does not get renamed. Is it okay to leave things as us with two different names?

https://www.jamf.com/jamf-nation/third-party-products/files/935/rename-startup-volume