Netboot Upgrade, fails to netboot

ImAMacGuy
Valued Contributor II

Rather than redo the work on the netboot, I figured I would just use the 10.9.1 build that i used to create the NBI, run the combo update, and re-run it through SIU. That completes as expected, however when I try to netboot a machine I just get a Circle with a line through it.

I can reboot off the (now 10.9.2) partition just fine though, so it seems like it's failing due to the SIU.

Any ideas?

157 REPLIES 157

gachowski
Valued Contributor III

@nessts

Most of the Enterprise Support guys have no issue working with me to track down an issue. : ) I may not "like" the issue but usually it's reasonable.

C

Josh_S
Contributor III

I noted this a while back when I was testing the pre-release versions of 10.9.2. I removed the ATI/AMD kexts from mine, but I suppose any kexts that are "unnecessary" for the NetBoot process should be safe to omit. Here's what I've been doing, which will drop a new kernelcache file on your desktop that should be smaller than 32MB. It appears you can just as easily do the RAID drivers as @Lotusshaney][/url is doing. I like to put the kexts back when I'm done creating the file, no reason to delete them completely.

mkdir ~/Desktop/Extensions
sudo mv /System/Library/Extensions/ATI* ~/Desktop/Extensions/
sudo mv /System/Library/Extensions/AMD* ~/Desktop/Extensions/
sudo kextcache -v 6 -arch x86_64 -K /mach_kernel -c ~/Desktop/kernelcache /System/Library/Extensions/
sudo mv ~/Desktop/Extensions/* /System/Library/Extensions/
rmdir ~/Desktop/Extensions

Lotusshaney
Contributor II

The only problem removing the ATI/AMD kexts is that video redraws on older macs can be painfully slow and renders ARD almost unusable. Are you building the cache, moving the files back and then using siu ?

mpermann
Valued Contributor II

@franton and @jwojda, what model Macs are you having problems netbooting using a 10.9.2 nbi? I have a 13-inch MacBook Pro (Mid 2009) that I use as a test system that I can try with a 10.9.2 nbi. I'm working on creating a new 10.9.2 nbi now to test. I'll report back my findings.

Josh_S
Contributor III

@Lotusshaney

I am building my image as usual using SIU then, on my test system which is also running 10.9.2, running through the above commands to build a custom kernelcache file. Backup the bundled > 32MB kernelcache file (kernelcache.bak), drop the replacement kernelcache file into the NetBoot image set, and use that.

AFAIK, the kernelcache file needs to have kexts bundled in that allow a machine to boot and pull down the NetBoot.dmg. After that, the kexts that are actually in the NetBoot image should load and provide all the functionality that is necessary. The /System/Library/Extensions folder on the NetBoot.dmg is completely "stock" 10.9.2. It should be safe to omit any kexts from the kernelcache that do not directly affect core system tasks, network tasks, or loading the dmg.

No matter which kexts you exclude, I believe having an unmodified /System/Library/Extensions folder, and just modifying the kernelcache file, is probably the safest option.

Josh_S
Contributor III

@mpermann

In my previous tests, I found 2011 machines and earlier had this issue. I did not do extensive comparison across all models, I only had access to a few laptops, so I'm not sure exactly when this changed. A 2009 machine should exhibit the issue.

franton
Valued Contributor III

@mpermann My test computer is a late 2012 iMac. Unfortunately I have virtually all macs from 2007 onwards to support so it's crucial I get this working.

Lotusshaney
Contributor II

@Josh_S

Nice tip. I'll try that. Maybe I'll knock up a little app to do this that people can run after building a NetBoot image

ImAMacGuy
Valued Contributor II

i deleted just the kext files out of Extensions, but didn't do anything with the kext cache utility, everything is booting now.

cbrewer
Valued Contributor II

@Josh_S

This method worked well for me. Creating a new kernelcache and swapping it into the i386/x86_64 folder was a quick and easy way to get my 10.9.2 NBI working without rebuilding it.

bentoms
Release Candidate Programs Tester

Why not keep a <10.9 NetBoot too?

ImAMacGuy
Valued Contributor II

@bentoms because too many choices lead to disaster. Gotta Keep It Simple (and) Stupid.

rtrouton
Release Candidate Programs Tester

@jwojda,

With careful naming, issues can be avoided. I've got three DeployStudio boot sets currently:

10.7 DeployStudio
10.8 DeployStudio
10.9 DeployStudio

I tell my folks "Whatever OS you're planning to work with, pick the corresponding boot set."

Similarly, I have five NetBoot utility drives:

10.5 Utility Disk
10.6 Utility Disk
10.7 Utility Disk
10.8 Utility Disk
10.9 Utility Disk

I haven't had an issue yet.

ImAMacGuy
Valued Contributor II

what constitutes a utility disk?

bentoms
Release Candidate Programs Tester

@jwojda. I hear you K.I.S.S. is a wonderful principle.

BUT, we only use NetBoot for Casper Imaging.

So all we update is the imaging.app when needed.

Simples.

franton
Valued Contributor III

This is nuts. I rebuilt the entire .nbi again this morning from the same source .dmg file. This time the kernel cache file is 29Mb. I've changed nothing and not removed any kexts as other posters have done.

I'm now going to praise my good fortune and go with this.

Jakov
New Contributor III

I did the same as Franton:
-first I upgraded my 10.9.1-netboot with a combo-update to 10.9.2: No-Entry-sign
-secondly I created a whole new 10.9.2 Netboot-set, starting from the Install Mavericks 10.9.2-app, again a no-entry-sign.
I'm hoping for a new SUI which solves the problem.

With DeployStudio there were problems creating a 10.9.2 NetBoot-set as well, but the developers were fast creating a new DS-build and solved the issue. The conclusion there was a DNS-issue, see http://www.deploystudio.com/Forums/viewtopic.php?id=5634

mpermann
Valued Contributor II

I've done a bit of testing on this. I downloaded a fresh 10.9.2 install from the MAS and installed it on a MacBook Pro 15-inch, Mid 2010 and made the normal tweaks JAMF suggests for a Casper Imaging nbi. I put the computer in target disk mode and used Composer 8.73 on a MacBook Pro Retina, 15-inch, Late 2013 to build an OS package. I then used that captured dmg file with SIU on the MacBook Pro Retina to build an nbi. Once the nbi was created I dropped in the tweaked rc.netboot file and noted the kernelcache size was 35.5 MB.

I then used the suggestions by @Josh_S to created a slimmed down kernelcache file that was 31.1MB in size.

Then I copied the nbi file to my Netboot server which is a Mac OS 10.8.5 server. Then I tested all the systems below with the 35.5MB kernelcache file and the 31.1MB kernelcache file with the results indicated in the below table. What I find interesting is the older 2008 and 2009 systems would netboot with no issues when using the 35.5MB kernelcache file. But a newer 2010, 2011 and 2012 system wouldn't. Everything I tested netbooted normally with the slimmed down kernelcache file.

Model 35.5 MB Booting 31.1 MB Booting
iMac 21.5-inch, Mid 2011 No Yes
iMac 24-inch, Early 2009 Yes Yes
Mac Pro Early 2008 Yes Yes
Mac Pro Late 2013 Yes Yes
MacBook Pro 13-inch, Mid 2009 Yes Yes
MacBook Pro 13-inch, Mid 2012 No Yes
MacBook Pro 15-inch, Mid 2009 Yes Yes
MacBook Pro 15-inch, Mid 2010 No Yes
MacBook Pro Retina, 15-inch, Late 2013 Yes Yes

Lotusshaney
Contributor II

@mpermann][/url I have a theory on that as I have seen the same. Some Macs had a firmware update from Apple and some did not. My guess is that the ones that got the firmware update got the newer version of TFTP.

I have written a script that allows you to drop an nbi folder on it, it mounts the nbi, copy's the kexts from the NetBoot.dmg image to a temp folder so you can make the cache for a different os to the one your booted from, removes the unneeded ones, makes the kernalcache and replaces it the x86 folder for you. I'll upload it when I get the chance

mpermann
Valued Contributor II

@Lotusshaney, I verified that the EFI and SMC firmwares on all the computers matched the latest listed from Apple's document at http://support.apple.com/kb/ht1237. I don't think we can assume that models newer or older than a certain date will or won't work with a standard nbi. I guess testing all the models you may want to netboot with a specific nbi is the only reliable way to know for sure.

Kkrawchuk
New Contributor III

I am building a new Netboot image from scratch as per Apple's suggestion above. (using the 10.9.2 full installer on a new partition from a updated 10.9.2 system from the installer)

If this fails, I will try Lotusshaney script and then I am out of idea's. I tried rebuilding the Kernel as per above however that didn't seem to work for me.

Has anyone had any success getting a 10.9.2 netboot image to work? I have both a local OS X Server (3.0.3) running 10.9.2 and a JAMF JDS with netboot and so far no go on either.

Josh_S
Contributor III

@Kkrawchuk, I have a 10.9.2 image working and, from this thread, there are others that also have this working. Are you having trouble getting a NetBoot image to work on any machine, or just some machines? If no machines will boot, you can try doing a verbose boot (Command-V) when NetBooting to see where the failure is. It may be some other NetBoot issue unrelated to the size of the kernelcache file.

One thing that I left out of my original post is that the script, as written, will drop a new "kernelcache" file on your desktop. That file then needs to be incorporated into your NetBoot set, "NetBootSet.nbi/i386/x86_64/kernelcache". I usually backup the one that is generated by SIU and then put my custom one in place.

Kkrawchuk
New Contributor III

@Josh_S, Uh ok, I noticed the kernelcache file but did not incorporate it. So doing all the steps you suggest has you a working 10.9.2 netboot?

My current problem is all clients get a flashing ? within a folder icon and no boot.

I am also having failures when trying to casper image and was at the root of updating my 10.9.1 image. So now I need to get a 10.9.2 image working before I can tackle the imaging issue. FUN! ;-0

My fresh install is about to finish I assume it will also fail until I perform the steps you suggest?

Josh_S
Contributor III

@Kkrawchuk][/url

The kernelcache (re)generation step is the last step I perform prior to uploading my NetBoot set to my NetBoot servers. If you're getting a flashing "?" on all your computers, different models/years, you're likely having a different general NetBoot issue. In order to rule this out, it's not a bad idea to do, but it is probably something else. If you're doing a lot of customization on your NetBoot image, especially post-creation of the DMG, try scaling that back to verify that the customization isn't causing the issue. After you get something working, then you can start throwing around wrenches to see if what you're doing is breaking something.

If you have other, working, NetBoot images, it is likely an issue with this specific NetBoot image or the NetBoot process advertising it. Try the verbose boot that I mentioned before, it's useful to see where it's failing and what error messages are being generated to point you in the right direction. Hold "Option" to NetBoot rather than "N" to give DHCP more time and to see which images are available. Using "Server.app", change the "Default" image to a different NetBoot image, then change it back. Disable/Re-Enable new images. Enable/Disable recently disabled images. Change how you're providing the image, http/nfs. Verify the permissions on the files within the NetBoot set, should be readable by everyone.

If you can't get anything to NetBoot, from any image, try Apple's troubleshooting guide. You can also start manually checking tftp/nfs/http to make sure the services are functioning. I don't want to derail this thread too much, but there are a number of good troubleshooting NetBoot guides out there that can walk you through this.
http://support.apple.com/kb/ts3678
http://static.afp548.com/mactips/netboot.html

alan_trewartha
New Contributor III

Tremendous work here. Now i've got a VM booting by 10.9 nbi, time to try the real thing…

alan_trewartha
New Contributor III

result - got a MacPro4,1 booting from an NBI based on the OS from a spanking new MacPro6,1. thanks all

donmontalvo
Esteemed Contributor III

@Lotusshaney I was curious about your blog, since we've been having some NetBoot problems. Looks like DeployStudio created a 10.9.2 NBI that has a 18 MB kernelcache file. Great to know about that limit though, thanks.

--
https://donmontalvo.com

TimT
Contributor

@Josh_S and @Lotusshaney. Just like to say awesome job with these workarounds. Apple appear to take some joy out of making our lives a misery and creating more work so a BIG thank you. Spent almost two days wondering where to go with this after getting to the "Loading kernel kext file" in verbose mode. I have managed to get it working with at least 8 different models stretching as far back as 2009. Good stuff!

Lotusshaney
Contributor II

Hi All,

Here is my script for making the .NBI folder ready. is a wrapper around @Josj_S script but does it all for you inside the NBI folder.

It rebuilds the kernalcache using the netboot.dmg inside the .NBI folder and also offers to expand the image by 10 GB so to stop the OS complaining that is's out of space.```

!/bin/bash

kernelcache Builder

by Daniel Shane

v1.2

call script something like makecachedrop.sh and run as root

Lets Start

clear
scpname=basename $0

Check to make sure we are root

if [ id -u != "0" ]
then echo "$scpname must be run as root" exit 1
fi

If $1 is empty ask user for imput

if [ "$1" == "" ]; then echo "Please drag in the NETBOOT .NBI folder that needs" echo "a slimline KernalCache and press Enter: " while [ -z "$NBI" ]; do read NBI done
else NBI="$1"
fi

Check it is a folder that has been draged on

if [ ! -d "$NBI" ]; then echo ""$NBI" is not an NBI Folder..." exit 1
fi

Remove Escapes from $NBI

NBI=echo $NBI | sed 's/\//g'

Check NBI is a NETBOOT not NETIMAGE folder

NBNI=defaults read "$NBI"/NBImageInfo.plist IsInstall

if [ $NBNI != 0 ]; then clear echo ".NBI folder is not a NETBOOT image." echo "$scpname only works on NETBOOT images, not NETINSTALL ones" exit 1
fi

backup old KernalCache File

mv "$NBI"/i386/x86_64/kernelcache "$NBI"/i386/x86_64/kernelcache.bak

Mount DMG from NBI Folder

mkdir /tmp/mntpnt
hdiutil attach "$NBI"/NetBoot.dmg -mountpoint /tmp/mntpnt -nobrowse

Copy and Remove unneeded KEXTS that are not need for NB to work

mkdir /tmp/Extensions
cp -r /tmp/mntpnt/System/Library/Extensions/ /tmp/Extensions
rm -rf /tmp/Extensions/ATI

rm -rf /tmp/Extensions/AMD
rm -rf /tmp/Extensions/ATTO

Build kernelache file

kextcache -v 6 -arch x86_64 -K /tmp/mntpnt/mach_kernel -c "$NBI"/i386/x86_64/kernelcache /tmp/Extensions/

cleanup temp files, eject DMG

rm -rf /tmp/Extensions
hdiutil detach /tmp/mntpnt
rm -rf /tmp/mntpnt

Grow Netboot image

echo ""
echo "Do you want to grow your NetBoot Image by 10 GB ? Y/N and press Enter: "
while [ -z "$GROW" ]; do read GROW
done

covert case to lower for if test

GROW=echo $GROW | tr '[:upper:]' '[:lower:]'
if [ "$GROW" == "y" ]; then curSectors=hdiutil resize "$NBI"/NetBoot.dmg -limits | tail -1 | awk '{ print $2 }' extraSectors=20971520 echo "Current NetBoot.dmg image is $curSectors" echo "New NetBoot.dmg size will be $((curSectors extraSectors))" hdiutil resize "$NBI"/NetBoot.dmg -sectors $((curSectors extraSectors))
fi

echo ""
echo "NETBOOT .NBI folder is now ready to be deployed..."

exit 0
```

or you can download the script from here

http://blog.designed79.co.uk/?p=1807

Jakov
New Contributor III

Nice script!
The script works fine, the kernalcache is much smaller now and my image has been resized.
Now I'm going to test to see if it works...

michaelhusar
Contributor II

Thanx a lot to everybody. Cool stuff! Smooth solution - for me working back to Early 2009.
Since we are all knee-deep in making net boot sets: Looking at the 10GB set-size: Has anybody a solution to make the payload smaller so it would load quicker ? I deleted some stuff of the Applications-folder, but this is only peanuts...

donmontalvo
Esteemed Contributor III

Check out Steve Wood's comments on this KB:

https://jamfnation.jamfsoftware.com/article.html?id=313#responseChild358

Not directly related, but a good one to know:

http://support.apple.com/kb/HT5855

--
https://donmontalvo.com

alan_trewartha
New Contributor III

damn - got a 10.9 NBI off the MacPro6 that will boot older machines, but damn if it won't boot the original shiny cylinder itself :-(

I don't have to update the server to 10.9 or server 3 do I?

mpermann
Valued Contributor II

@alan.trewartha, I have a Mac OS 10.8.5 server that is serving up a 10.9.2 nbi that I can boot my new Mac Pro 6,1 or MacBook Pro 11,3 from. I built my nbi using a MacBook Pro 15-inch, Mid 2010. I did have to use the @Josh_S trick for slimming down the kernelcache file in order to boot some of the models I wanted to. But it seems to be working fine.

donmontalvo
Esteemed Contributor III

Now that 10.9.2 combo updater is out, we were able to create an NBI on a 2011 MacBook Pro, and I can confirm the NBI boots 2013 Mac Pro, Late 2013 MacBook Pro Retinas, etc.

I think the key is having the Mac that you are using to build your NBI's totally updated...with the combo updater. ;)

Don

--
https://donmontalvo.com

alan_trewartha
New Contributor III

thanks. i was being lazy not applying the .2 update - i was sticking with the 'pristine system' approach. will post back when done.

(BTW I was surprised to receive the new Pros with just 10.9 on board - not even the .1 update which was out ages ago.)

Kkrawchuk
New Contributor III

my rebuild from the full 10.9.2 installer has resolved the issue however looks like I need to run the script. I can book a late 2013 iMac and MacBook Air but not a 2010 MBP. I am hoping for that LotusHaney's script takes care of it!

Kkrawchuk
New Contributor III

SUCCESS.... The steps I took are a fresh build of a 10.9.2 Netboot DMG from scratch (MUST use the 10.9.2 full installer as per Apple above) and Lotusshaney's script (which is brilliant and perfect for non coders like me) and now I can boot my 2010 and 2013 equipment. (Huge Thank You Lotus..) Has anyone logged this with Apple? With this level of self support, we mise well be Apple employee's! ;-o

ImAMacGuy
Valued Contributor II

I logged it with apple.

donmontalvo
Esteemed Contributor III

@Kkrawchuk The combo updater will create an agnostic image.

--
https://donmontalvo.com