20061204

PXE Boot & Install Fedora

This post is written assuming you have a headless box of some sort that is capable of PXE booting (I'm using a Dell Powervault 715), and are using a machine running OS X as the server. There seem to be plenty of tutorials out there aimed at using Linux as the server. Note: this is a work in progress. It is incomplete and untested. This blog may prove very useful.

First, get osx-pxeboot. I believe it's distributed by a company called Metrix Communication LLC. The readme explains a lot of it. Download and mount the ISO for the Fedora DVD, then browse to images/pxeboot and read the README file. This directory is really all you need from the DVD. Don't know if you could just pull it off of CD 1, but bandwidth has not been an issue for me (boy I love this Class A subnet). And as it turns out, it doesn't need to be in the webserver as osx-pxeboot says (I think - haven't finished writing yet) because we're going to be doing a network install over HTTP/FTP anyway. There's a fourth file in that directory called TRANS.TBL, but it can be ignored - I believe it's just a filesystem think specific to Linux, kind of like Windows' .thumbs and OS X's .DS_Store.

You don't need to copy everything from osx-pxeboot to / - some of it is already there. I recommend you only copy what you need, and keep a list of what that is. In my case, I copied /etc/dhcpd.conf, the contents of /sw/etc, and /tftpboot. Note that it's probably a good idea to use cp -i and cp -iR, as the i flag will cause cp to prompt you before overwriting files, which is always a Good Thing when mucking about as root. Note also that even when you're copying the entire contents of a directory, there may already be stuff there - so if and when you go back to delete that stuff, check before you do an rm -r! Anyway. Some of the files mentioned above are unnecessary - some of tftpboot/, for instance - but there's no harm in copying them over, since they're not overwriting anything.

Now, copy the vmlinuz and initrd.img to /tftpboot/. Modify pxeboot.cfg as necessary - basically replace default with the appropriate file (model it after default.console, or read the PXELINUX/SYSLINUX docs if you're feeling thorough). Mine is just one line: "DEFAULT /vmlinuz initrd=initrd.img".

Oh - note that if you're using Tftpserver (gui frontend to tftp, as the name implies), your path to /tftpboot/ may be different - mine is /private/tftpboot.

Now. Connect the boxes with an ethernet cable (needs to be a crossover cable). Power up the target box. Use the console to tell the BIOS what to do. Note that Mac laptops have no serial port (aww ...) so you'll need to do that with another computer or terminal or whatever, if you don't have a USB-serial adapter (if you do, remember that you need drivers. Assuming, like me, you bought no-name crap from Radioshack, use System Profiler to find the chipset in question. It's probably Prolific, in which case, the necessary tweaks are described here - use the sourceforge driver, the other one is broken). On the Mac, run /user/sbin/pxeboot as root. When done, type "/user/sbin/pxeboot die" and proceed to install from there. Most likely you want to do a vnc or ssh install.

This is as of yet untested - that is coming soon. It may EAT ALL THE CHEESE IN YOUR HOUSE.

No comments: