PXE Booting/Fedora Core
From Wiki
Note! Be sure that you've already setup PXE Booting BEFORE you do this! Consider that step 1, and then this step 2.
Fedora Core is one of the easier distros to PXE install. The hardest part is easily the extracting of the CDs to a public hosting ground, due to time involved.
Contents |
Introduction
Fedora Core is a distro released by Red Hat, that is community-centric, often-updated distro. Releases are set every 6 months, which equates to up to 6 CDs every 6 months. Plus, CDs can be slow compared to gigabit ethernet, so hey why not.
Note that this is written for Fedora Core 3, but it should apply just as easily to FC1 through FC99, as long as they stay consistent.
Needed Software
You'll need a way to fetch all of FC to install it. This can be done over, HTTP, FTP, or NFS. I will document how to do it under HTTP, so you'll need a working webserver.
Initial Configuration
Obtaining Fedora Core
You can download the current version of Fedora Core at fedora.redhat.com. I like their BitTorrent method of download best personally. I recommend the DVD version for simplicity, as we won't actually be burning these ISOs to a physical media.
Extracting It All
Fedora Core comes as a .iso. Well, several of them. We need to extract each of these ISOs to a single directory. I did it like so (I used the DVD ISO):
cerberus iso # ls FC3-i386-DVD.iso cerberus iso # mkdir /srv/linux/http/FedoraCore/3/i386/ -p cerberus iso # mkdir FC3 cerberus iso # mount -o loop FC3-i386-DVD.iso FC3/ cerberus iso # cp FC3/* /srv/linux/http/FedoraCore/3/i386 -ar cerberus iso # umount FC3
In a nutshell, I make a directory to keep the contents of the ISO, mount the ISO, copy the contents to new directory A, and unmount the ISO. Note at this point, as long as it worked, you can now remove the (large) FC3-i386-DVD.iso.
If you downloaded the individual CD version, you'll need to mount each successive ISO, perform the copy, unmount the ISO, mount the next one, lather, rinse, repeat. (This is why I prefer the DVD version).
In the directory where you extracted the ISO, it should look similar to this:
Fedora RELEASE-NOTES-en.html RPM-GPG-KEY-rawhide GPL RPM-GPG-KEY TRANS.TBL README-Accessibility RPM-GPG-KEY-beta autorun README-en RPM-GPG-KEY-fedora eula.txt README-en.html RPM-GPG-KEY-fedora-rawhide images RELEASE-NOTES-en RPM-GPG-KEY-fedora-test isolinux
This is just as we need it. For now, we're interested in the isolinux/ directory.
Configuring the PXE Server
cerberus i386 # cd isolinux/ cerberus isolinux # ls TRANS.TBL general.msg isolinux.cfg param.msg splash.lss boot.cat initrd.img memtest rescue.msg vmlinuz boot.msg isolinux.bin options.msg snake.msg
If we take a look inside isolinux.cfg, we get:
default linux prompt 1 timeout 600 display boot.msg F1 boot.msg F2 options.msg F3 general.msg F4 param.msg F5 rescue.msg F7 snake.msg label linux kernel vmlinuz append initrd=initrd.img ramdisk_size=8192 label text kernel vmlinuz append initrd=initrd.img text ramdisk_size=8192 label expert kernel vmlinuz append expert initrd=initrd.img ramdisk_size=8192 label ks kernel vmlinuz append ks initrd=initrd.img ramdisk_size=8192 label lowres kernel vmlinuz append initrd=initrd.img lowres ramdisk_size=8192 label local localboot 1 label memtest86 kernel memtest append -
Out of that entire block of text, you should care for:
label linux kernel vmlinuz append initrd=initrd.img ramdisk_size=8192
We need to add this to our pxelinux configuration file, like so:
label fc3 kernel fc3 append initrd=fc3-initrd ramdisk_size=8192
You need to copy the file "vmlinuz" to your TFTP root directory, and rename it to "fc3". You then need to copy the initrd.img to that same directory, and rename it to "fc3-initrd".
Configuring the local source
If you boot a PXE client into the "fc3" kernel, it should present you with a screen asking you how you wish to obtain the software needed to install FC. The only network options are FTP, HTTP, and NFS. I like HTTP, so I addded the following to my httpd.conf file (for apache):
<Directory /srv/linux/http>
Options Indexes
AllowOverride None
</Directory>
Alias /linux /srv/linux/http
In the FC3 install, I chose HTTP. I set the server address to 192.168.0.3 (the IP of the box that has the extracted ISO), and the path to "/linux/FedoraCore/3/i386/". A note on how these paths match up.
I extracted the ISO to /srv/linux/http/FedoraCore/3/i368. Apache is set to handle all requests for /linux/ from the directory /srv/linux/http, which means that if you open up a browser to http://192.168.0.3/linux/FedoraCore/3/i386/, you'll see the contents of /srv/linux/http/FedoraCore/3/i386/.
From here, you can progress with the rest of the Fedora Core install as normal. You won't be asked to swap CDs, and it should work flawlessly. Enjoy!
Advanced Options
As posted here, Fedora has a number of really useful options, from starting a VNC server to install over to defaulting a HTTP path to install from. Any of these options can be appended to the "append" line in the config file, like so:
label fc3 kernel fc3 append initrd=fc3-initrd ramdisk_size=8192 ip=dhcp method=http://192.168.0.3/linux/FedoraCore/3/i386/ vnc vncpassword=fedoracore
This would acquire an IP address over dhcp, default to an HTTP install, and then instantly start up a VNC server with the password "fedoracore".
Note that a lot of people like to use something other than craptastic ext3, so for apathy's sake to use something else, here's a list of the other choices you have (just append the first column to the append line to enable them):
xfs Allows the creation of a xfs filesystem reiserfs Allows the creation of a reiserfs filesystem jfs Allows the creation of a jfs filesystem
