Imaging issue

jwilson
New Contributor II

I am having an issue when imaging..

First the details : Casper 9.32
Macbook Airs
Os : 10.9.3

Issue : When imaging, I have a constant issue of the image skipping all package and going to the naming of the machine part, and staying stuck on it. Has anyone else had this issue, and if so any possible fixes for it.

49 REPLIES 49

spotter
New Contributor III

I have seen this in the past and the work around for me was to format the disk using Dish Utility and also removing the device from the JSS console...

Kprice
New Contributor III

Are you pushing an OS as well or just layering the packages? I have had issues with locking up in the past when OS is included. Like Potter does, I wipe the drive in Disk Util. On a side note, MacBook Airs seem to be a real pain in the neck in general.

jwilson
New Contributor II

Potter : I have had the disk util format work with minimal success. The removal from JSS seems to work the best. Side info we are re-imaging 4000+ machines so It is time consuming to remove from JSS/disk util them. Any Sure fired method I could use to avoid this from happening would be great.

Kprice : Yes pushing an OS as well. We are upgrading from Mountain Lion to Mavericks this summer.

pat_best
Contributor III

Just to add to this discussion... I have two distribution points plus my primary JSS and I see this issue on my two secondary dist. points but not my primary. I am running casper 9.31, imaging 10.7.5 and 10.9.3 clients, primary JSS is 10.8.5 and secondary dist. points are 10.5.8 server. Everything appears to mount normally along with autorun information from all dist. points however my only successful runs come from the primary point. I have tested this with the same client computers across all points

jwilson
New Contributor II

Pat.Best. I have 1 Primary Dist. point and 8 Secondary ones, all on 10.8.5 I see it on all of them, with varying degrees of success and failure. I will agree I see it less on in the building that houses the Primary Dist. Server.

pat_best
Contributor III

@jwilson, to run you through what I have done so far to try and resolve this.... recreated the file shares, recreated the distribution points in my JSS, removed all casper data from the servers and replicated again, removed JSS framework from the dist. points (not sure why it was there in the first place...) cleaned of extra data to make sure I had plenty of drive space on the server, and a partridge in a pear tree :) The only thing that varies for me from what you are describing is that my computers will usually skip everything except the last steps for jamf imaging (renaming, first-run script, etc) and still reboot. As I think about it, even the first step to wipe the drive is skipped.... I am going to go look at that step on my dist points. I did have to do some editing on my primary to allow it to unmount the drive to begin imaging.... but I thought that was on my 10.9 images only. I will check and get back to you.

pat_best
Contributor III

well, I did the easiest thing and copied my netboot image from the working dist point to the offending dist. points and still no love...

spotter
New Contributor III

Is your OS a capture our a fresh non-booted OS created with a app similar to AutoDMG?

Either way you can create a test configuration and just add the OS and see if your devices have a issue with it.

Are you using thunderbolt ethernet adapters?

pat_best
Contributor III

@Potter, if you are asking me, the vast majority of my images are captured using composer to capture the image from a target mode booted computer

pat_best
Contributor III

I am able to unmount the local disks and use disk utility to repartition the drive, but am still unable to image from the second two distribution points so the rc.netboot problem is not the issue in this case.

thanzig
New Contributor II

Shot in the dark, but on your netboot image, maybe put the certs of the secondary distribution points in the system keychain. maybe there is a trust issue mounting the caspershare.

thanzig
New Contributor II

Also, maybe reinstall the JDS's and do a clean replication to them.

thanzig
New Contributor II

As for not being able to unmount the target disk and erase it via casper imaging or disk utility, i've seen issue where the net boot image is not set to "diskless" or the permissions are winked. turning off/on netinstall and filesharing has fixed that most of the time. you can test if that is the issue but wiping the disk through the recovery HD and then booting back into the net boot and skipping the "erase disk" and just block copying your stuff.

Chris_Hafner
Valued Contributor II

This May or may not have anything to do with your issues, however, I've always made it a point never to use the Automator action (net install) to setup the netboot settings and account. It is super simple to have it auto boot into an account setup to act exactly like you want it to and you never have to worry about weird keychain, cert, or other associated permissions issues. I.e. Why bother automating something that is not, by nature, a completely repetitive process. There are just so many gotchas I've seen over the years with these types of processes.

DaveMB
New Contributor

I have run into this recently now that I'm trying to image my labs. Previous tests worked fine, but now I'm running into the same issues as others in this thread. It's happening on my primary DP with 10.9.4 and 9.32 installed. Machines can netboot into the server fine, but when they start imaging, it jumps past all of the packages and tries naming the machine, which it never succeeds in doing. Sadly, nothing problematic shows up in the logs.

One thing that seemed to work, for no apparent reason, was to ensure that skipping the autorun delay was checked. I didn't have any delay on these pushes since they are one-off's for classrooms and not an entire lab. But it started installing the OS. That was at the end of the day, so I haven't tested whether or not it actually worked, but it appeared to be imaging normally after that point.

thanzig
New Contributor II

DaveMB - If you were to erase the target HD of one lab machine before netbooting and then using Casper Imaging and skipping the "erase HD" option what happens?

DaveMB
New Contributor

I'll try that when I get in tomorrow morning. I hadn't seen this topic when I was initially searching for the issue on Friday. I just hope I don't have to use the disk utility on each machine every time. But I'll definitely test it. I have two machines that consistently fall prey to this. I'll try it with and without on each one to test.

KellyWilbur
New Contributor

I was actually running into the exact same thing last week, 9.32 with new Macbook Airs and 10.9.4 made with Autodmg.

Are you using smart configurations for your image at all? I am and the only way I was able to get around it was to compile the image, then it would work. Non-smart configurations worked fine either way.

jwilson
New Contributor II

@Potter All DMGs including captured through composer, DMG of OS was made using Disk utility. We are using Thundebolt adapters.

@Chris_Hafner : All netinstalls have been set to Diskless.

@thanzig : most times when I do erase the hard drive it works, some not so much.

@KellyWilbur : All images use Smart configurations.

@DaveMB : I will try today and see if skipping the auto run will help.

russeller
Contributor III

@jwilson Are you making any modifications to RAM disk in your Netboot image?http://www.macos.utah.edu/documentation/administration/setup_netboot_service_on_mac_os_x_10.6.x_clie...

Are you making sure you have enough free space in your NetBoot image? I usually have 5-10GB of free space. If you need more free space you can run this command on your Netboot.dmg from your netboot server: ```
sudo hdiutil resize -size 10G /path/to/NetBoot/image/file
``` see this for more info: https://jamfnation.jamfsoftware.com/article.html?id=198

Once your netboot session starts, if you quit Casper Imaging, can you Cmd+K and connect to your Distribution Point manually using your casperinstall (read-only) account? (or whatever account you have configured as your read-only account in the JSS for your distribution point)

Good luck.

jwilson
New Contributor II

@ssrussell : Resized this morning will see if it helps this afternoon.

Here is a link to a video of the fails a co-workers is getting.

https://www.dropbox.com/s/sy4yitlzrigs0fa/MOV_8787.MOV.mov

DaveMB
New Contributor

Unfortunately, it did not erase the drive on my tests, so it did not lay the OS image on correctly. I'm going to look into @ssrussell's netboot image tips to see if they help in my instance. I'll also use the disk utility and then try to see if it helps.

jwilson
New Contributor II

I did the resize. Did not seem to help with my issues.

thanzig
New Contributor II

This has been discussed before and I have seen it myself. If Casper Imaging or Disk Utility cannot erase the target disk when netbooted it is because something is being written to the target disk so it can't unmount it. I would go to your OS X Server and turn off file sharing, netinstall, remove the netboot images, etc. Flush netinstall and file sharing the settings, restore and let it re-enable the Netboot. Permissions on Netboot SP0 and NetBootClients0 may be messed up. Also, check file sharing settings on the server.

If you have a spare mac, install a clean 10.9.4, OS X Server and netboot image. Bet it will netboot properly and erase the target disk.

DaveMB
New Contributor

It is obvious, but I missed this on one of the images that I did. Make sure that on your Netboot server, the image settings have Diskless booting enabled (as mentioned by @thanzig) or you will not be able to use the disk utility or Casper to erase the drive since it is using the local drive for caching.

However, Casper Imaging is still skipping the erase hard drive step and jumping right to the block copy of the image regardless of whether disk utility could mount/unmount and erase it.

stevevalle
Contributor III

@jwilson @pat.best @DaveMB

I have had this issue before - found that the passwords for the Casper Read/Write & Casper Read/Only users were incorrect in the JSS. Therefore, I was unable to mount the share. Once I corrected the passwords in the JSS, all worked fine.

Your logs should also be able to tell you why all the packages are being skipped. Have a look at you imaging logs in the JSS (should show Failed) or the jamf.log file (/var/log folder)

DaveMB
New Contributor

@stevevalle
Yeah, I had that issue when we started with Casper in January on one of my DP's. Everything mounts, but Casper can't seem to erase the drive. If I do it with the disk utility and have Casper do the block copy it works. It's just a lot slower and I have to touch the systems throughout the process, which means the potential for more human mistakes.

russeller
Contributor III

What I recall when this was happening was that it appeared that Casper Imaging would unmount the "Macintosh HD" volume when it would start imaging. Then when I noticed it wasn't actually installing the OS, I'd force quit Casper Imaging. Then if you launch terminal and look in /Volumes, "Macintosh HD" wouldn't be there. It would be in Disk Utility and appear to be mounted. When you would try and unmount it in Disk Utility you'd get an error. The only way to unmount it at that point is to do a ```
umount -f /dev/disk0s2
``` then it would appear unmounted in Disk Utility. I'm not sure whats going on here, but it has to have something to do what we're experiencing.

Chris_Hafner
Valued Contributor II

My god I can't believe that I've spaced on posting this. Please try this one simple thing and let me know how it goes.

On a unit experiencing this issue; erase that units autorun data from within the JSS and let me know if that fixes all. I've seen this specific issue before and it can hide through any version of JSS once that file is corrupted.

jwilson
New Contributor II

@Chris_Hafner][/url When can I find and remove that data. Sorry if it something I should know, but kind at a loss right now due to this issue.

Chris_Hafner
Valued Contributor II

Great question. It's changed a bit since version 8.x.x. Here's my best easy answer. Performa a full search so that the computer in question is the only result (I suggest a search based on serial number). Then, DON'T open the computer record. Select the "action" button and then choose "delete autorun data". If you click on the computer record instead it will let you "edit" said data but NOT remove it completely.

russeller
Contributor III

Does holding shift when launch Casper Imaging also clear the autorun data?

stevevalle
Contributor III

@DaveMB - I use a shell script to format the drive at the start of the imaging process (set it to run before). This forces the drive to unmount and format. Saves on time too!
diskutil partitionDisk /dev/disk0 1 JHFS+ "Macintosh HD" 100%

@jwilson @Chris_Hafner - Do a search for the computer. Once found, click on it to view its details. An "Autorun Data" & "Delete" button will appear.

russeller
Contributor III

@stevevalle Have you ever had an incident where someone accidentally netbooted and had their hard drive wiped with the script? I was considering doing the same thing. I was thinking I'd add a countdown that allow someone to cancel if needed. Thanks.

stevevalle
Contributor III

@ssrussell No, I haven't. I don't set the Auto Image on computers for this reason. I set the Autorun data and just hit return when Casper Imaging is ready to go.

Default delay is 60 seconds Minimum Delay & 60 seconds Maximum Additional Delay. That gives the user 120 seconds to cancel the imaging if they do netboot accidentally. These can be increased.

CasperSally
Valued Contributor II

@stevevalle - have you ever seen this error with your script? I used a similar script in past (and tried yours too), but can't seem to get past it no matter what I do. Frustrating.

Started partitioning on disk0
Unmounting disk
Error: -69888: Couldn't unmount disk

This is using JAMF's NetInstall, wonder if that makes a difference.

CasperSally
Valued Contributor II

@stevevalle - it does seem the Netinstall is the root of my problem. seems like with netboot script works ok but netinstall can't unmount for whatever reason. bummer.

stevevalle
Contributor III

@CasperSally - These are the steps I take to create and deploy a new NetBoot image. Hope this helps!

Setup the Base OS

  1.  Startup in recovery mode and Install the OS from Apple 2.  Once OS is installed, create a new admin user 3.  Enable the root user 4.  Logout of the admin user and login as root 5.  Copy the Casper Suite into the Applications folder 6.  Open System Preferences      a. Change the name of the system to NetBoot      b. Change Energy Saver settings      c. Turn Screen Saver off      d. Turn Bluetooth off      e. Turn Wireless off      f. Set Automatic Login for root user      g. Add Casper Imaging to Login Items      h. Turn off automatic updates in App Store System Preferences 7.  Open Casper Imaging and add mss details 8.  Rename Macintosh HD to NetBoot 9.   Restart the computer to ensure root logs in automatically and Casper imaging opens on startup

Create the NetBoot Image
 
1.  Startup the computer in Target Disk Mode - Ensure that the OS of the Mac is the same as the OS of the NetBoot Image (ie. 10.9 NetBoot Image must be created on a Mac with 10.9 installed)
2.  Create the NetBoot Image with System Image Utility (/System/Library/Core Services)
3. Name of image e.g. Mac OS X 10.9.2 NetBoot
4.  Once completed, copy the new NetBoot folder to the NetBoot Server
     a. Enable new NetBoot Image
          i. Make available over NFS
          ii. Make image available for diskless booting
5. Update kernelcache - if needed for older Macs (https://jamfnation.jamfsoftware.com/discussion.html?id=9779)
6. Reduce size of NetBoot Image to ensure older macs can NetBoot (https://jamfnation.jamfsoftware.com/discussion.html?id=847)
7. Ensure Macs use Diskless (https://jamfnation.jamfsoftware.com/discussion.html?id=5416)

Chris_Hafner
Valued Contributor II

Spectacular instructions. You actually got me to do a double take as this looks eerily close to my own! I've been using this method since the moment I started with the Casper suite and have never looked back.