/build/static/layout/Breadcrumb_cap_w.png

K2 Macintosh USB Imaging Tool - K-Image Only

As i noted in my other USB Boot article USB 2.0 is not fast enough to boot the OS is a reasonable amount of time. Apple has done the work for us and gave us a fast booting USB OS on their Installation media. One downside is there is no SMB support which Kace needs. I have worked around it, but its not ideal. If you modify your pre or post image scripts you must manually copy them to your USB drives. Also, this only supports K-Image, it may work with DMG but you will need a large USB Drive. I would suggest you use the other method and install a full OS X to the drive.

I am going to use Mavericks in the example, but any OS X should work. You need the installation media and a running system.

Mount the DMG that is in Install OS X Mavericks -> Contents -> Shared Support

There is a hidden DMG called BaseSystem.dmg which you can mount from terminal via.

open /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg 

Write this DMG to your usb key. After this is done we are going to make some changes.

Kace needs some Perl libraries. Copy the following:

/System/Library/Perl and /Library/Perl to the same location on your USB

Create the following folders

{USB}/opt/kace/peinst and {USB}/opt/kace/petemp

Copy the following directories from  your K2/peinst to {USB}/opt/kace/peinst. If you have a large PC post job you can delete it from applications after you copy the directory.

applications, macosx, scripts and preinstall


Copy sudo from /usr/bin to you flash drive. The permissions must be 700 with the owner being root. I had to do this with the USB drive booted.


Edit the following file:

{USB}//System/Installation/CDIS/OS X Utilities.app/Contents/Resources/Utilities.plist

And add the following dict to the buttons array.

<dict>

<key>BundlePath</key>

<string>/opt/kace/peinst/macosx/bin/K2000 Imaging Utility.app</string>

<key>DescriptionKey</key>

<string>Kace Imaging Tool.</string>

<key>Path</key>

<string>/opt/kace/peinst/macosx/bin/K2000 Imaging Utility.app/Contents/MacOS/K2000 Imaging Utility</string>

<key>TitleKey</key>

<string>Kace Imaging Tool</string>

</dict>


Edit /etc/rc.cdrom and insert the following before launchctl towards the bottom.

RAMDisk /opt/kace/petemp 8024

create the following file make sure it is executable (chmod +x)

{USB}/usr/local/sbin/get_kbox_server

This should return the IP or Name of your K2 or RSA. The most simplest form of this scripts can be

echo k2000

if your k2 is named K2000. Your you can add custom logic in this file to find the nearest server.


You Should now have a USB key that has less than 2GB of data that you can image machine from.



Comments

  • Where are you getting System/Installation/CDIS/OS X Utilities.app/Contents/Resources/Utilities.plist from? Is it copied from the usr/bin directory? I aslo don't see most of the items you reference in the usr/bin folder on my computer. - nmorea 10 years ago
  • Nope, if you followed the directions that directory will exist on the usb drive - stephen_c01 10 years ago
  • This is a great writeup, thanks. I am getting an error however. When I try to restore an image I get an error that there isn't a sudoers file present. I copied that from another system but the ownership is wrong, it shows up as _unknown. I can't change the ownership on the file because the file system is marked as read only. The same is true for /usr/bin/sudo. - chucksteel 9 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ