"Volume name" change blocks Casper Imaging

Not applicable

Hi all,

Is there a way to specify a "partition" (eg /dev/disk0s2) in a Casper Imaging autorun rather than a volume name. If a machine's System Volume has been renamed or a previous image attempt failed subsequent runs of Casper imaging will all fail with a volume not found. Given my config repartitions the drive as it's first step I wouldn't have the issue if it were'nt for the "Volume" hangup. Ideas/workarounds?

Best regards,
Tim Morris
Queensland University of Technology | Learning Environments and Technology Services | http://www.qut.edu.au
CRICOS No. 00213J


Not applicable

I don't know of a way to specify the device level within Casper Imaging,
but I solved the same issue by using a script that re-partitions the drive
(renaming it in the process) and then launches Casper Imaging. That way,
if someone has mucked about with the existing partition scheme or renamed
the drive volume, everything is reset to what the autorun is expecting.
The only downside is that it requires admin rights to run. The script
line that does this is:

sudo diskutil partitionDisk /dev/disk0 1 GPTFormat HFS+ Macintosh HD 100%

This creates a GUID partition map with a single Mac OS Extended volume
named "Macintosh HD". Change the "Macintosh HD" bit to whatever you're
using for a volume name. You may also need to change up the partition map
if you've got PowerPCs (if you've got both, you can throw in some logic to
check and run the appropriate fork). Hope this helps.


Charlie Smith
Desktop Engineer
Information Services Department (ISD)
MIT Lincoln Laboratory
244 Wood St. Lexington, MA 02420
Phone: 781.981.0854
E-mail: charlie.smith at ll.mit.edu

Honored Contributor

I asked Jamf support this one a while back. The answer is no. You cannot point to a device node, and you can not have it run a command. What I would do is setup some script to run to either hard code the name in, change the name, or do some other scripting to prevent this from happening.

Another solution is a post imaging policy that caches the name to a file, then have it check the volume name via scheduled tasks and a script and if the cached name doesn't match it gets renamed. Then set the policy to run off line and Casper can cache it to the client and it can run once a day no matter where it is. I have had problems of users renaming their boot volumes all sorts of things.

I wonder if there is a MCX solution to disable boot volume name change?


Not applicable

I know it's not a wide spread problem by any means, but academic freedom means that I've seen laptops come back with OS'es other than Mac OS X on them. From this point, as Charlie has said, a script that re-partitions the drive is really all you can do before you launch Casper Imaging.

With all the common sense approaches Casper has adopted I was quite surprised to learn that being able to point to /dev/disk0 is not something that can be done, instead you must specify 'Macintosh HD'. I guess working with Darwin for a while you start to expect the system to be able to do anything you want.

Of course the answer is to lock down my environment so that Linux or Windows isn't capable of being installed, but as I said our clients are granted a certain amount of academic freedom.

In a world without walls and fences who needs windows or gates? :P


Not applicable

We use a simple script to do this via diskutil. It runs on a daily basis, to
fix either mistaken or overly-creative renaming of the System volume.
- - - - - - - - - - - - - -

# get current boot volume name
export VolumeName=diskutil info / | grep "Volume Name" | cut -c 30-

# if it's not Macintosh HD, fix it
if [ "$VolumeName" != "Macintosh HD" ];
then diskutil renameVolume "$VolumeName" "Macintosh HD"
exit 1; fi
- - - - - - - - - - - - - -
-- Christopher Kemp
CNN Central Engineering