macmule / AutoCasperNBI

AutoCasperNBI is an app that automates the creation of NetBoot Images (read: NBI’s) for use with Casper Imaging.
https://macmule.com/AutoCasperNBI/
83 stars 9 forks source link

NBImageInfo.plist is binary & includes most hardware as disabled #3

Closed calum-github closed 10 years ago

calum-github commented 10 years ago

So i've created a couple images with AutoCasperNBI and the NBImageInfo.plist seems to be created in a binary format not straight text xml. This is a problem if i transfer this NBI to a netboot server thats not a mac ie BSDPy as it is unable to parse the binary format.

Is it possible to convert the NBImageInfo.plist into XML? Also SIU does this as well but is there anyway to remove all of the disabled systems from the NBImageInfo.plist as well?

macmule commented 10 years ago

Hi hunty1,

I guess i could throw in something like the below.. should be ok on all NetBoot servers then:

plutil -convert xml1 NBImageInfo.plist

On the disabled systems, if they are not there you cannot selectively choose what macs can boot from the NBI.. So that's an issue. Also, it should really stop non-supported Macs from booting into an NBI.. which i rather like.

What issue are you seeing with that array being populated?

calum-github commented 10 years ago

Ah good point, I should just make a script to pull out the models that we do support for our NBI instead.

I use BSDPy and it uses the disabled systems dict in NBImageInfo.plist to prevent booting of those systems which was giving me a headache so i just ended up removing all the models in there but you're right really should prevent unsupported machines from booting the NBI

macmule commented 10 years ago

Cool.

I'll add the line to convert the plist to xml, so that should help non-OSX netboot.

Regards,

Ben.

On 8 Nov 2014, at 04:48, Calum notifications@github.com wrote:

Ah good point, I should just make a script to pull out the models that we do support for our NBI instead.

I use BSDPy and it uses the disabled systems dict in NBImageInfo.plist to prevent booting of those systems which was giving me a headache so i just ended up removing all the models in there but you're right really should prevent unsupported machines from booting the NBI

— Reply to this email directly or view it on GitHub.

macmule commented 10 years ago

Hi Hunty1,

The xml convert should be added to 1.0.1 which I've just posted, please test & advise.

calum-github commented 10 years ago

Just tested. Looks good to me! Thanks!

For what its worth and for anyone reading at home. Regarding the unsupported systems, here is a snippet from the script I run.

fix_NBImageInfo(){ echo "* Removing all disabled systems from $nbimageinfo" $plistbuddy -c "delete :DisabledSystemIdentifiers" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers array" $nbimageinfo echo "* Adding list of unsupported MacBookPro systems to $nbimageinfo" $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBookPro3,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBookPro2,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBookPro1,2" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBookPro1,1" $nbimageinfo echo "* Adding list of unsupported MacBook systems to $nbimageinfo" $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBook5,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBook4,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBook3,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBook2,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBook1,1" $nbimageinfo echo "* Adding list of unsupported MacBookAir systems to $nbimageinfo" $plistbuddy -c "add :DisabledSystemIdentifiers: string MacBookAir1,1" $nbimageinfo echo "* Adding list of unsupported Macmini systems to $nbimageinfo" $plistbuddy -c "add :DisabledSystemIdentifiers: string Macmini3,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string Macmini2,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string Macmini1,1" $nbimageinfo echo "* Adding list of unsupported iMac systems to $nbimageinfo" $plistbuddy -c "add :DisabledSystemIdentifiers: string iMac7,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string iMac6,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string iMac5,2" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string iMac5,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string iMac4,2" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string iMac4,1" $nbimageinfo echo "* Adding list of unsupported MacPro systems to $nbimageinfo" $plistbuddy -c "add :DisabledSystemIdentifiers: string MacPro3,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacPro3,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacPro2,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string MacPro1,1" $nbimageinfo echo "* Adding list of unsupported Xserve systems to $nbimageinfo" $plistbuddy -c "add :DisabledSystemIdentifiers: string Xserve3,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string Xserve2,1" $nbimageinfo $plistbuddy -c "add :DisabledSystemIdentifiers: string Xserve1,1" $nbimageinfo }