More fun with AutoNBI13 Apr 2015
Last time we saw our heroes, there was the unfuffilled promise of making small NetInstall sets. Now is the time to deliver on that promise. We’re going to make a small NetInstall that will open up Terminal.app.
If you’ve not read the previous post (and have got AutoNBI), go and do it now. I’ll wait. All done?
Previously on 24
As mentioned in the previous post, we’re aiming to have a small NetInstall set. Once you’ve made your NetInstall, open up
NetInstall.dmg - you’ll see a
Packages directory. This is where the majority of the bulk in a NetInstall lives - the packages it actually installs. There is also a hidden
BaseSystem.dmg which is what will load when your NetBoot the machine.
I’m bored, can we make something please?
As I mentioned above, we’re going to make a simple NetInstall that will open up a Terminal window. To do that, we’re going to leverage something that Apple kindly left in the image for us -
rc.imaging. A bit of background - in
/etc you’ll find a series of
rc.* files. One of those in a NetInstall is
rc.install, which will look for an
rc.imaging file in a few places - one of those is
/System/Installation/Packages/Extras - conveniently a location that Pepijn has made AutoNBI able to work with.
Somewhere on your Mac, make a directory called
Packages and then inside that, make a directory called
Extras. Inside that directory we’re going to create a file called
rc.imaging with the following contents:
And make sure it’s executable:
And now to make the NetInstall:
The only change from last time is the
-f option - this is the path to your
Packages directory. I created my Packages directory in the same directory as AutoNBI.py - adjust the path if you made yours somewhere else.
You should now be able to boot off your tiny NBI (mine was 574MB) and have a bit of an explore. You’ll notice that quite a bit is missing to achieve this tiny size - fortunately Pepijn has been working on getting Ruby and Python included in BaseSystem.dmg, so you have more scripting options when booted.