The first question you’re going to ask is why, isn’t it? Why not use another Linux machine to do the network boot? Why not just burn the CDs if you’re doing a network install? Why not do it this way or that way?
I’m not going to go over many reasons for this other than my very simple reason for researching this: I wanted to install Debian on my iBook but I was out of CD-Rs and all I had was my home media server. It’s just that pathetic. What follows is what I did to my home server to make it happen.
Setup the TFTP Server
Every copy of Mac OS X includes the software needed to get this running, it’s just that there’s no GUI to it, which really isn’t much of an obstacle.
Setup tftpd
This is crazy simple in 10.4. Apple’s launchctl program will turn off the Disabled key in launchd plist files if you pass -w to it, and Apple kindly included the tftp.plist file and directory for us.
To turn on tftpd just run the following:
sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist
In all versions of Mac OS X, including 10.4, you should be able to use the service command to get tftpd started:
sudo service tftpd start
Setup Boot Files
We’re going to need a good number of files here, but not an excessive number. We need a bootstrapper, a kernel, and a root filesystem.
Bootstrapper
For modern Macs you’re going to want to get the binary image for yaboot from PenguinPPC. When you expand the tarball you’ll get a folder called usr. Just open that up and get to usr/local/lib/yaboot/ and copy the yaboot file out of there and put it into /private/tftpboot/.
In the same directory save the following as a file called yaboot.conf in the same tftpboot directory:
timeout=100
device=enet:
partition=0
init-message=“Debian GNU/Linux Network install for Debian-Installer (Sarge)”’
default=install
image=vmlinux
append=“devfs=mount,dall init=/linuxrc —”
label=install
initrd=initrd.gz
initrd-size=10240
Setup Kernel and Root FS
Now we need to get the network install kernel and root FS RAM disk from Debian’s site. Get the following files and place them in the tftpboot directory as well:
- vmlinux
- initrd.gz
- initrd.list
Congratulations, you have a bootloader, a config file that says what to load, and a preconfigured kernel and installer to load. The server side is done.
Configure Client Machine
On to setup your client. This is very easy; all we need to do is tell the machine to startup from the TFTP-shared yaboot file and the system will do the rest.
Boot the computer to Open Firmware by holding CMD-OPT-O-F on boot and at the prompt enter the following, where [IP] is the IP of your TFTP server:
boot enet:[IP],yaboot
It should load yaboot. If you get a prompt asking what to load, type in “install” and press return. Otherwise, sit back and enjoy the ride. The installer should fetch everything it needs from the Debian mirror you select and then proceed to walk you through the installation as normal.
That’s great, but does it work with the ‘N’ or ‘Option’ key to work while booting (ie, not have to enter Open Firmware)?
Also, you haven’t mentioned how you are managing the client’s IP address. I assume you are using DHCP. Is there anything special you have added?