6

My kid did some magic with my Mac and somehow successfully rename the disk name to some weird name.

OS''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;     ]\[X

When I tried to rename it back, Finder refused it.

Finder refuse to change name

I tried with diskutil tool but there is no command to change the LV name of a Logical Volume Family.

Dump from the diskutil command:

192-168-1-153:~ werynguyen$ diskutil cs list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 48AFE413-7A7C-47A2-9D1E-4F09A2788927
    =========================================================
    Name:         OSX
    Status:       Online
    Size:         499113885696 B (499.1 GB)
    Free Space:   18972672 B (19.0 MB)
    |
    +-< Physical Volume B0F241BF-1BB3-4273-BAB4-825D93D4F098
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     499113885696 B (499.1 GB)
    |
    +-> Logical Volume Family BC9B82C2-A485-4E2A-BBD3-4692684D4DAF
        ----------------------------------------------------------
        Encryption Type:         None
        |
        +-> Logical Volume DF2B66E8-0534-430A-B9F6-5697E4E294B2
            ---------------------------------------------------
            Disk:                  disk1
            Status:                Online
            Size (Total):          498742591488 B (498.7 GB)
            Revertible:            Yes (no decryption required)
            LV Name:               OS''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;     ]\[X
            Content Hint:          Apple_HFS

Does anyone know how to fix this? My macOS is 10.12.3 macOS Sierra

4
  • How old is your kid? Can you get some info out of him as to what he saw when he changed the LV name?
    – Rushat Rai
    May 14, 2017 at 7:03
  • My kid is 15 months old and she only understands how to say "Bye". What she did probably was sitting on the laptop keyboard and didn't care what was showing on the screen. May 14, 2017 at 8:43
  • 2
    If she can do that with just her butt, image how good of a coder she'll be when can actually use her hands to type!
    – fsb
    May 14, 2017 at 13:52
  • She might have a promising future as a QA engineer / red team operations. Well done if she managed to get some non breaking spaces or other Unicode into the name to really foil attempts to recover.
    – bmike
    Nov 19, 2017 at 18:22

2 Answers 2

3

Two approaches:

Try using the Volume UUID instead of the name:

diskutil rename LVUUID newName

So, in your case, issue the command:

diskutil rename DF2B66E8-0534-430A-B9F6-5697E4E294B2 OSX


Change it in Get Info

Right click (Command Click) the volume and select Get Info (or press CommandII while selected). Then enter the new name in the "Name & Extension" field.

enter image description here

1
  • 1
    You can't rename a Logical Volume with your command. It would work with the volume UUID though.
    – klanomath
    May 14, 2017 at 15:40
2

You should be able to rename the volume with diskutil if it is mounted:

diskutil rename "OS''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;     ]\[X" "OSX"

Booted to Recovery Mode, launch Terminal from the menubar > Utilities.

Enter df to check if the CoreStorage volume is mounted:

Filesystem                     512-blocks       Used Available Capacity   iused    ifree %iused  Mounted on
...
/dev/disk2                      132538512   30003784 102534728    23%   3750471 12816841   23%   /Volumes/OS''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;     ]\[X
...

If the volume is mounted

diskutil rename /Volumes/OS\' 

hit the tab key here to autocomplete the volume name and add "OSX":

diskutil rename /Volumes/OS\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\ \ \ \ \ \]\\\[X/ "OSX"
3
  • I tried both suggestion above and they are both fail. The diskutil rename command return an error saying that the disk name OS'''''''''''''..\]X cannot be found. The second doesn't show the OS\'\'\'\'...\]Xon the /Volumes path. May 14, 2017 at 8:49
  • @WeryNguyen Copying and pasting the volume name may have modified the whole string here. You should use the name found in your environment. I tested both methods in a VM and both work with the string in your diskutil cs list output here.
    – klanomath
    May 14, 2017 at 8:59
  • What about a wildcard, klanomath for the rename - /Volumes/OS* should be safe enough or is there a problem with globbing / expansion that I’ve not considered?
    – bmike
    Nov 19, 2017 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .