Posted on 07-31-2018 02:23 PM
I am trying to read a plist from the recovery partition on my lab machines specifically the ProductVersion Key value from com.apple.recovery.boot/SystemVersion.plist I have tried defaults read and all I get is plist does not exist. I am trying to create an extension attribute that reads that value but I am stuck without the defaults command I was thinking xmllint might work but I am having trouble with the syntax. Any and all help is appreciated!!
Solved! Go to Solution.
Posted on 08-01-2018 06:24 AM
@mm2270 Not a silly question at all yes I mounted the partition using
diskutil mount disk0s3
when I throw the command
defaults read /Volumes/Recovery HD/com.apple.recovery.boot/SystemVersion.plist
I get the response of
Domain /Volumes/Recovery HD/com.apple.recovery.boot/SystemVersion.plist does not exist
Posted on 07-31-2018 03:59 PM
Check the icon for your plist, I experienced a similar issue and noticed the plist I was trying to read was not properly format XML. If the icon is generic then it might be formatted incorrectly.
Posted on 07-31-2018 09:05 PM
Silly question, but is the Recovery HD partition mounted when it tries to run the defaults command? Since normally that volume isn't mounted in the filesystem, I'm wondering if when it runs the path to that plist really doesn't exist.
I assume you checked that, but I thought I'd ask just in case.
I just ran a quick test on my own Mac running Sierra and, after mounting Recovery HD, I was able to point defaults at the SystemVersion.plist and read values from it. No errors.
Posted on 08-01-2018 06:24 AM
@mm2270 Not a silly question at all yes I mounted the partition using
diskutil mount disk0s3
when I throw the command
defaults read /Volumes/Recovery HD/com.apple.recovery.boot/SystemVersion.plist
I get the response of
Domain /Volumes/Recovery HD/com.apple.recovery.boot/SystemVersion.plist does not exist
Posted on 08-01-2018 06:28 AM
We'll, that's really odd. The syntax you posted is basically identical to what I did on my 10.12.6 Mac and it worked without a hitch.
Have you tried it on a few different Macs to see if the result is any different? I'm wondering if there's something wrong or corrupted on the machine you're trying it on. I'm not clear if this is occurring across the board or not.
Posted on 08-01-2018 06:39 AM
@mm2270 I just ran it on a second machine and its seems to be working must be just that machine thanks!