I know that the following will work:
hdiutil attach old.sparsebundle -mountroot . diskutil rename old_label new_label hdiutil detach old_label hdiutil attach old.sparsebundle -mountroot .
This causes the old_label to be mounted as new_label, but it does not elegantly mount it to rename it, and then disconnects it and mounts it for the label to take effect.
Is there another way?
source share