Strog
November 3rd, 2003, 13:03
I have a Mac G3 Blue & White that has been acting up. I put a different hard drive and memory in it and tried reloading it and it always corrupts. I tested different hard drives, memory, etc. and it looks like the controller for the HD is bad. :( I tried the Gentoo Live CD for PPC and that worked on this machine but it's not as nice as Knoppix for that. Looks like netbooting is the way to go from here.

I grabbed NetBSD's Diskless netbooting page and started in (http://www.netbsd.org/Documentation/network/netboot/). Netbooting needs DHCP, TFTP and NFS so I setup my OpenBSD DHCP server and setup TFTP and NFS on my FreeBSD box sitting on another subnet. I extracted the netbsd sets on the NFS server, tweaked the configs, shared it out and put the bootloader on the tftp. I added the workstation entries on the DHCP server and HUP'ed it and thought we are ready to roll.

The nice thing about the Macs is that they are easy to netboot with everything built into Openfirmware. Go into the firmware and type boot enet or just hold the "n" key while booting on the newer models. I held down on "n" and watched the bootloader come up and fireup the kernel. It came up fine in sigle user mode so I edited rc.conf to enable multiuser and rebooted. Everything is loading up fine until right after it sets the hostname and it gives me a "nfs send error 65" and stops. I did a little googling and didn't turn up anything significant so I went back to tweak the config files which seemed fine. I switched to my G4 and added the MAC address to the DHCP config file and it did the same thing. I googled for the rest of the night until I got tired and went to bed.

I came back with a fresh perspective and went straight after that error 65 and found my answer in errno.h in the source (#define EHOSTUNREACH 65 /* No route to host */). Even though the bootloader and kernel are coming off the other subnet and it's trying to pull everything from the same place, it still loses the default gateway in the process. I copied the install over to my workstation and shared it out. It boots nice as can be off that machine on the same subnet. This is good but I want to run if off the NFS server on the other subnet.

PF to the rescue. I added an aliased IP to the local interface and setup a redirect to the real NFS server (rdr on $int_if from $int_net to $alias_IP -> $nfsserver). Now it all works and it thinks that it is connecting to an IP on the same subnet. It's been building pkgsrc ever since. Building over NFS is a little slow but it will be nice once it's all done. I can boot the G4 off the same install by hitting "n" at bootup instead of letting it boot into OS X.

Next things to try are setting up shared installs with individual configs, diskless OpenBSD, etc. I might get a PCI IDE controller for that box. Firewire Macs can boot off the firewire drives so I might go that route since it is cheaper and it is way faster than the ata33 contoller onboard was in the first place.

It's all been fun. :wink:

soup4you2
November 3rd, 2003, 14:13
Sounds like fun.. I've wanted for awhile to play around w/ the netbooting.. Since you can script the server you can do some truely fun stuff..

Customize each system to the MAC address of the nic.. etc.

I was thinking if you run a local cvsup mirror you might be able to have some real fun. Or even the diskless X-Servers.

At any rate it's something i'm going to have to fiddle with at some point. I've read up a lot on them and have always wanted check out what all i can really make it do. Perhaps i'll do that this week since i have no internet connection at the moment..

Perhaps Setting it so if MAC XX:XX:XX:XX:XX Boots it automatically loads X from the server and fires up UT2003 or something.. :)

Strog
November 3rd, 2003, 18:22
You need a NIC that supports booting via bootrom, PXE, GRUB and/or you need an etherboot image.(http://rom-o-matic.net/ build etherboot images with web-based interface). I liked using the Macs since they have netbooting built in. My 3com 905c has it built-in and so some other nice NICs.

You can see this example host entry in dhcpd.conf. You just need to change the MAC address for your NIC, choose a boot kernel/loader and set the root-path for your client. Everything else is on the server and you can edit and tweak there to your heart's content. You can have several clients use a setup or make custom ones for each. There's a lot of options here.

[code:1:ffc5f6d7cf] host clientname
{
hardware ethernet 00:aa:bb:cc:dd:ee;
fixed-address 192.168.0.2;
option host-name "clientname";
next-server 192.168.0.1;
filename "client-kernel";
option root-path "192.168.0.1:client/root";
}[/code:1:ffc5f6d7cf]

Kernel_Killer
November 3rd, 2003, 20:13
I wonder how much fun it would be to try to netboot the 6500. :P

soup4you2
November 4th, 2003, 08:50
Actually out of boredom last night because there wasnt shit on tv like usual i played around w/ it.. and got a nice diskless X server runnin.. Normally when i find a good howto somewhere i've always printed it to pdf and stuck it in a docs dir. And what do you know i had about 4 or 5 guides on it. Not to mention the section on the freebsd/docs area that my cvsupd server was kind enough to snag for me before i killed the internet.

Pretty cool stuff.. i've got a 3com 905c which supports PXE booting.