To do this you'll need to setup a dhcpd daemon or bootp daemon on your server, as well as tftpd.
tftpd daemon:
/etc/inetd.conf should have the following line enabled:
tftp dgram udp wait root /usr/sbin/tcpd in.tftpd/etc/hosts.allow should be opened up for tftp on your local network:
in.tftpd: 192.168.192.(This is my local network IP block - yours may vary)
If you have to change these, be sure to stop/start inetd:
/etc/rc.d/init.d/inet restartThe default directory is /tftpboot. As a minimum you'll need a Linux kernel, yaboot, yaboot.conf, and some sort of a ramdisk image (I'm showing a rescue image below):
bash-2.03$ ls -l /tftpboot/ -rw-r--r-- 1 root root 1243868 May 22 17:16 rescue.gz -rw-r--r-- 1 root root 2455573 May 22 17:16 vmlinux -rw-r--r-- 1 root root 58556 May 22 17:16 yaboot -rw-r--r-- 1 root root 1396 May 22 17:20 yaboot.confdhcpd daemon:
For the dhcpd setup, you'll need the MAC address of your machine. In MacOS you can find this by going into the TCP/IP setup. If you're already running Linux on the machine try:
[stew@powerbook linux]$ dmesg | grep eth0 eth0: BMAC+ at 00:50:e4:b9:07:70The series of hex numbers seperated by colons is the MAC address of the ethernet adapater. Now you need to setup /etc/dhcpd.conf:
default-lease-time 21600;
max-lease-time 21600;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.192.255;
option routers 192.168.192.1;
option domain-name-servers 192.168.192.1;
option domain-name "ays.net";
shared-network WORKSTATIONS {
subnet 192.168.192.0 netmask 255.255.255.0 {
}
}
group {
use-host-decl-names on;
host imac {
hardware ethernet 00:05:02:6B:45:29;
fixed-address 192.168.192.5;
filename "/tftpboot/yaboot";
}
}
Then start or restart dhcpd:/etc/rc.d/init.d/dhcpd startIf the server starts up normally, you should see something like this in /var/log.messages:
May 22 17:19:06 moe dhcpd: Copyright 1995, 1996, 1997, 1998 The Internet Software Consortium. May 22 17:19:06 moe dhcpd: All rights reserved. May 22 17:19:06 moe dhcpd: Listening on Socket/eth0/WORKSTATIONS May 22 17:19:06 moe dhcpd: Sending on Socket/eth0/WORKSTATIONS May 22 17:19:06 moe dhcpd: dhcpd startup succeededThat should be it. Instead of holding down the "C" key on the Apple machine, use the "N" key and you should see the yaboot boot prompt.
I'm running an Iopener here as a diskless client, and you could apply the same techniques to the iMac. I know a guy here in Cleveland running a whole lab of iMacs, where he's netbooting them all (MacOS). This is great as an admin, as you don't have to worry about the users borking up the configuration. Just reboot and you're back to a clean setup.
You might want to checkout the for some more ideas of what you can do, now that you've got the iMac netbooting.


