Prestage and root

dmeridith
New Contributor III

How do I have casper imaging automatically login and start imaging when i netboot.

11 REPLIES 11

dmeridith
New Contributor III

I also must add im trying to use the pre stage and I already have a netboot server and image that automatically logs into root. Then casper imaging pops up and it asks for a username and password.

stevewood
Honored Contributor II
Honored Contributor II

Are you attempting to re-image a machine that is already in the JSS? If so, you will need to either delete the computer out of the JSS for a Pre-Stage to work, or you will want to setup Auto Run information for that computer.

Pre-Stage is used for brand new equipment, or equipment that has never been added to the JSS. You target that new equipment by serial number, MAC address, or network segment. When you then NetBoot that piece of equipment, as long as Casper Imaging is set to auto launch, Casper Imaging will query the JSS for the serial number, MAC address or network segment to see if there is a Pre-Stage configuration for it. If it finds one, it will automatically begin to image the machine based on that Pre-Stage.

If Casper Imaging finds a record in the JSS for that machine, it will then look for Auto Run data. If it finds Auto Run data, it will automatically run Casper Imaging following the "instructions" in the Auto Run.

If it does not find Auto Run data, Casper Imaging will ask for a user name and password.

It sounds to me like you either do not have a Pre-Stage built, or do not have the computer properly scoped for the Pre-Stage, or the computer is already in the JSS.

mm2270
Legendary Contributor III

There are several things that have to be set "just right" for automated imaging via Pre-Stage to work. Here are some, and I may be missing one or three-

- The Mac cannot already be inventoried in the JSS. Only new Macs will work in this way (use Auto-Run to re-image existing Macs)
- The Mac has to fall into whatever Scope you've set up (Network Segment, Serial # or MAC address) If not in Scope, it won't auto image.
- You need to store credentials in the Pre-Stage for auto logging into Casper Imaging so it can run. This is probably the item that you missed in your configuration.

Take a look under the "Install" tab in your pre-Stage for the Local Username and Local Password fields and enter some credentials there so it can automatically log in. You might also need to check the box labeled "Automatically Image this Computer the next time Casper Imaging is launched" on that same tab.

dmeridith
New Contributor III

yes the machine has been in the jss before we just took it out manually and now it logs in to casper imagaing. But when I try and image it now gives me an exception . Is there any way for me to completely erase and lay back down the New in box image dmg?

dmeridith
New Contributor III

Also I am very new to this where is the Autorun Data?

mm2270
Legendary Contributor III

Internet Restore will get you back to a fresh OS, assuming the Mac shipped with at least Lion. The restore process does some checking to make sure its not just giving you a copy of Lion or Mountain Lion.

As for Auto run, its stored per Mac I believe and can be viewed from Inventory as one place. You can also edit Autorun data for a selection of Macs from a search result using the Take Action on Results drop down menu.
Truthfully I don't ever use it myself, so I'm a little unclear on exactly how you'd use it. Its best for lab environments, say if you need to re-image a room full of Macs to restore them back to a default setup after x number of days/weeks, etc. Lots of school administrators use Auto-run to help with that.

Take a look at the full Casper Suite admin guide. It has some more information on Auto-Run in there.

dmeridith
New Contributor III

Ok I got the image to manually install but I had to wipe the hard drive manually. How would i set the casper imaging to erase the hard drive first. I have tried to erase hard drive check box but that doesent seem to work if there is already an os on the disk. I also have set the netboot to diskless

mm2270
Legendary Contributor III

Not sure about that. I'll have to defer to someone else since I also haven't been using Casper Imaging in the last year and a half, so I'm not the best source to help you with that. I know with some 'other' tools that I won't name you can set a script as the very first item to run that will blow away all partitions, repartition to a single volume and wipe it clean before any image gets laid down. There is likely a way to do this as well in Casper Imaging, but my skills with Casper Imagine are rusty, so I just don't know.

Edit: just curious, but was the Mac encrypted with FileVault 2 by any chance? That will sometimes trip up imaging, even with other imagine tools.

justinworkman
Contributor

Erase hard drive has always worked for me, but I can tell you that in order for Casper Imaging to do anything the current partition has to be named 'Macintosh HD'.

jshipman
New Contributor III

Hey dmeridith:

Autorun info is found in the JSS web app. So if you are looking for a particular machine it would be one of the options when you find the machine in a quick inventory search. It's the third option in the list of options to take action on that record (Details, Logs, AUTORUN, Delete).

Once you click on Autorun you can put in all kinds of information that would kick off the imaging process the next time Casper Imaging runs on that computer.

  1. Make sure the target drive is indeed named "Macintosh HD" if it isn't make sure you change it in the JSS to whatever it's called.

  2. Make sure you select "Erase Drive"

  3. Select the configuration you wish to install

  4. Select Reboot (so the computer will run FirstRun)

  5. Select your distribution point

  6. Enter the local authentication credentials to run automatically.

I hope this answers your question and I didn't muddy the waters...

stevewood
Honored Contributor II
Honored Contributor II

If you are having a problem with erasing the drive from a NetBoot, I would verify that you can erase the drive from Disk Utility while net booted. You may be running into the issue most of us have seen with a 10.8 NetBoot set where we are unable to erase the hard drive because it will not un-mount. This is one discussion on it:

https://jamfnation.jamfsoftware.com/discussion.html?id=4977#respond

There are plenty of others on JAMF Nation. I would boot the machine, quit Casper Imaging, and try running Disk Utility to see if it can erase the drive.