The bless command can be used to read your currently blessed operating system in Mac OS X. You can also leverage it to set an operating system in Mac OS X. Don’t ask why, but I recently needed to read what my blessed operating system was and set my blessed operating system to the same volume. Much like choosing a volume in the Startup Disk System Preference pane when I’m already booted to that volume. With a little help debugging, here’s what I came up, in case anyone :
myDisk=”$(/usr/sbin/bless –getBoot)”myDiskOutput=”$(/usr/sbin/diskutil info “$myDisk” | grep “Volume Name” | cut -c 30-60)”bless –mount /Volumes/”$myDiskOutput” –setBootecho $myDiskUtilOutput > /tmp/booter.txt
The file that I’m then dumping my information to in the end (/tmp/booter.txt) can then be used to do a few things of note… Perhaps there will be more on that some time later. Die LIP storms, die!