imaging and network adapters

mikecefalu
New Contributor

im creating a base image thats going to span white macbooks, mac airs, imacs and mac pros. the is a file or set of files that you can remove from your image that names and orders the network adapters. this way regardless of which type of computer the adapters will be named correctly. i cant remember what file that is.

9 REPLIES 9

CasperSally
Valued Contributor II

A lot of people here believe strongly in the InstaDMG method where your base image is a clean never booted machine (and this issue wouldn't happen).

I prefer the casper admin capture OS image approach and recently ran into this myself.

Before cutting my OS image, one of the very last things I do is run the following which seemed to resolve the issue for me. I tested so far on Macbook, Airs, and iMacs (this is a Lion base image).

sudo defaults delete /Library/Preferences/SystemConfiguration/preferences NetworkServices

sudo defaults delete /Library/Preferences/SystemConfiguration/preferences CurrentSet

sudo defaults delete /Library/Preferences/SystemConfiguration/preferences Sets

sudo chmod 644 /Library/Preferences/SystemConfiguration/preferences.plist

sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist

cbrewer
Valued Contributor II

Thanks Sally - this seems to work well on a new Retina MBP.

cbrewer
Valued Contributor II

FYI, here's a version of Sally's script that I'm now running as part of my imaging workflow. I have it set to "After" in Casper Admin.

#!/bin/sh

echo "Deleting Network Interfaces on $1"
defaults delete "$1"/Library/Preferences/SystemConfiguration/preferences NetworkServices
defaults delete "$1"/Library/Preferences/SystemConfiguration/preferences CurrentSet
defaults delete "$1"/Library/Preferences/SystemConfiguration/preferences Sets
rm "$1"/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist

seabash
Contributor

FYI: for those following JAMF article #313, "Creating a Minimal Base OS Image" https://jamfnation.jamfsoftware.com/article.html?id=313, Composer.app excludes /Library/Preferences/SystemConfiguration/preferences.plist by default (see Composer.app Preferences). That's accurate as of version 8.64, which we're currently using.

Just saying, because the interesting steps above are somewhat moot here.

armando
New Contributor III

I started to use the script here posted by cbrewer to have one image for all my machines and fix the 10.8 computer name issue. It works great, but i am now seeing an issue where when i go to recon a machine the computer name does not show up. Its set correctly on the machine and in the JSS but does not show up in Recon app.

Any ideas?

cbrewer
Valued Contributor II

FWIW - I'm not longer using that script. I'm now just deleting the entire preferences.plist and NetworkInterfaces.plist files out of the image after I capture it with Composer. Removing the entire preferences file seems to address the missing name issue.

michaelhusar
Contributor II

First thanx for the solution.
Now I am doing Mavericks 10.9 and there is no "NetworkServices" anymore...
Should we instead delete in addition:

airport.preferences.plist
CaptiveNetworkSupport

What do you think?

pblake
Contributor III

@michaelhusar - did that work in Mavericks?

michaelhusar
Contributor II

Hi pblake

I still delete the stuff, I deleted in 10.8.5 for Mavericks - so far so good. The issue was (back then) that my machines "lost" their name when re-imaged.
So far all names are holding - imaging working great (pimped) netboot 10.9.2 and deploying 10.9.2