|
Installing Fedora Linux via PXE (x86_64).
—
filed under:
Linux Installation,
Linux
This is my step by step howto on how you can install Fedora Linux via PXE. This page was written during the installation of my brand new Intel 64 bit PC with Fedora 8. So you'll see x86_64 everywhere. I have done this before with my other computers and it works 99% the same for i386/i686 computers.
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.
The overall final setup is a 100% network based install of Fedora by using PXE in combination with a HTTP installation. I've been using this setup for a very long time (since Fedora Core 3) so I know it works .... for me. ;) This howto was written during the installation of my brand new PC (based on a 64bit Intel Core 2 Quad Q6600 CPU) with Fedora 8. So you'll see x86_64 everywhere. I have done this before with my other computers and it works 99% the same for i686 computers (that 1% is that you must change the name of some of the paths). Important remarksThe system I'm using as my central server at home is a Pentium II at 350Mhz which is happily running Fedora Core 3. Yes, I know this is an ancient version but for my purposes this is good enough. I assume you have a different version so your mileage may vary. One effect of using this old version is that some of the config files I describe will most likely have changed name, place, format over time. Be prepared to adapt to these differences. OverviewLet's start by giving an overview on what the final installation procedure will look like (this is what we're going to build here).
TIPS
One step at a timeWe're building this setup one step at a time.
AssumptionsI'm basing this on a few specific assumptions Client
Server
Download Fedora 8
Which one ?Now you can do one of two things:
You choose, I always use 'the big one' because it makes live easier in the long run.
The first this you need to do is mirror the right part of the Fedora 8 distribution. First of all you go to http://mirrors.fedoraproject.org/ and select the mirror site that is best for your situation.
Now the right part is the directory which is under releases/8/Everything/x86_64/os/ I rsync it all to:/opt/deploy/install/fedora/releases/8/Everything/x86_64/os The strange thing is that 'Everything' does not have the PXE images .... So I also rsync releases/8/Fedora/x86_64/os/images /opt/deploy/install/fedora/releases/8/Fedora/x86_64/os/images Now before we continue we must copy the entire images directory from 'Fedora' to 'Everything' ( I've reported this issue in the Fedora Bugzilla as issue 419351 ) So I copy the /opt/deploy/install/fedora/releases/8/Fedora/x86_64/os/images
to the new place /opt/deploy/install/fedora/releases/8/Everything/x86_64/os/images HTTP installationDNS
I chose to create an additional hostname in my DNS with the name
'install'. So I can simply specify http://install/.... as the download
path in the Fedora installer anaconda. Setup HTTP server for HTTP based installationThe first thing we need to do is make the stuff we just downloaded available via HTTP.
My /etc/httpd/conf.d/install.conf looks like this: <Directory /opt/deploy/install > AllowOverride All AcceptPathInfo On #Options Indexes FollowSymLinks Options Indexes SymLinksIfOwnerMatch FollowSymLinks </Directory> <VirtualHost *:80> DocumentRoot /opt/deploy/install/ ServerName install UseCanonicalName on </VirtualHost> Testing the HTTP setupFirst try to open this URL in your browser: http://install/fedora/releases/8/Everything/x86_64/os/RELEASE-NOTES-en_US.html This should provide you with the release notes on your screen. Now startup a VMware with the boot.iso ( located in /opt/deploy/install/fedora/releases/8/Fedora/x86_64/os/images ) as the CDROM image. Choose installation method HTTP Website: install Fedora directory: fedora/releases/8/Fedora/x86_64/os Now when you continue the graphical installer should load.
If it does then this part works.
PXE installation bootstrap
Configure the TFTP serverI'm using tftp-server-0.39-1 My config file is called /etc/xinetd.d/tftp and contains this: service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /opt/deploy/install -v -v disable = no per_source = 11 cps = 100 2 flags = IPv4 }
Setup PXELinuxI downloaded the latest version from http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.53.tar.gz and installed the pxelinux.0 in there under my Fedora tree. cp pxelinux.0 /opt/deploy/install/fedora/releases/8/Everything/x86_64/ IMPORTANT Now my config file /opt/deploy/install/fedora/releases/8/Everything/x86_64/pxelinux.cfg/default looks like this: DEFAULT fedora8 TIMEOUT 0 PROMPT 0 LABEL fedora8 KERNEL os/images/pxeboot/vmlinuz kssendmac APPEND initrd=os/images/pxeboot/initrd.img ks=http://install/fedora/releases/8/Everything/x86_64/ks.cf As you can see we refer to the ks.cfg under the specified URL. The paths to the kernel and images are relative to the directory where pxelinux.0 is located. Create a ks.cfg to install from HTTPThe ks.cfg file is the config file that anaconda uses to automate specific selections in the install process. You can fully automate the installation using the ks.cfg I prefer for my situation to simply let the system figure out where the installation files are located (on my http://install/ server). So this file /opt/deploy/install/fedora/releases/8/Everything/x86_64/ks.cfg simply contains: url --url http://install/fedora/releases/8/Everything/x86_64/os/ Check using your normal browser if you can download http://install/fedora/releases/8/Everything/x86_64/ks.cfg Now my personal setup uses the DHCP LDAP configuration feature created by Brian MasneyThis is much too much overkill for most situations so I'm describing the 'normal setup'. Check the Official pxelinux page because they have a lot of examples on this topic.
next-server "install" filename "/fedora/releases/8/Everything/x86_64/pxelinux.0" Note that this path is relative to the root specified for the tftp server
Testing the PXE/HTTP setupNow start your VMware machine again and press F12 during the BIOS phase.
The Virtual Machine will boot from the network and should load the information from the server. And show stage 1 of the installation procedure.
After selecting language and keyboard it should load images/stage2.img and show the graphical installer.
SUCCESS we have now started the Fedora 8 installer via PXE.
Document Actions |
|