Renaming HD (in a Big Sur/Monterey world)

rstasel
Valued Contributor

So I'm trying to remediate lots and lots of mis-named "HDs". Mostly when formatted, to reinstall OS, lots of stuff remaining as "APPLE SSD AP0512M Media (Boot Partition)"

I've got a script I grabbed from: https://github.com/therealmacjeezy/Scripts/blob/master/Rename%20Startup%20Volume/RenameStartupVolume...

And while it works up to 10.15, it breaks at Big Sur and Monterey because of the new sealed system volume, booting from a snapshot, etc. 

I can rename via just disk1s8s1 but that doesn't rename the container. 

Does anyone have anything that works or is the actual partition just called "Data" 

Thanks! Maybe it doesn't matter.... 

1 REPLY 1

robjschroeder
Contributor

Hey! I just tried this on my Monterey machine, it worked to change the HD volume name to my $hdName variable:

 

#!/bin/sh
$hdName=MacHD

/usr/sbin/diskutil rename / $hdName