Sunday, January 22, 2012

Apple netboot

I tried updating an old Apple macbook (this one) to Mac OS Snow Leopard. I lost my install DVD a long time ago, but I did have an image of it.
First, I tried fitting the DVD image to a single layer DVD-r. I managed to do so, but it wouldn't boot. Next I tried booting from an IDE disk with the contents of the image via USB, it booted but hanged while starting the OS.
So there was one thing left to try: netbooting!
I once noticed this 'Remote Install Mac OS' in Applications/Utilities. So I started it, clicked through the menu and fired up the macbook in netstart mode. I don't know what this application does, but it doesn't even respond to DHCP / BOOTP. Maybe this does work for newer macbooks, but it doesn't work for this one. Googling away, I found some guides on how to use a Mac OS server as bootserver, but I don't own one. You can, however download the server package which contains the 'System Image Utility' (go to support.apple.com and look for 'Server Admin Tools'. This, together with a linux box, finally allowed me install the macbook.
On the linux box, you will need apache, tftp and dhcp.
To setup the image, mount the disk image and start the System Image Utility. Select netinstall, next, create. When done, copy the files in '/Library/NetBoot/NetBootSP0/xxxx.nbi/i386/' (xxxx being the name of the created image) to /srv/tftp/macnbi-i386/ on the linux box. Copy the dmg file to your webroot.
Now, setup DHCP with this config:


class "AppleNBI-i386" {
match if substring (option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386";
option dhcp-parameter-request-list 1,3,17,43,60;
if (option dhcp-message-type = 1) { option vendor-class-identifier "AAPLBSDPC/i386"; }
if (option dhcp-message-type = 1) { option vendor-encapsulated-options 08:04:81:00:00:67; }
filename "macnbi-i386/booter"; # the kernel to boot from
option root-path "http://xx.xx.xx.xx/yyy.dmg"; #xx.xx.xx.xx being the IP of the web server and yyy.dmg the name of the dmg file
}
allow booting;
allow bootp;

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home