A Fedora 4 network install
One year ago my not-too-old Sony GRT 815E laptop's DVD drive died (real crap BTW, as with many Sony products I had). Then, because it wasn't able to boot on an USB key I had to investigate the last and frightening solution of a full over-the-network install... If you're in a similar case, keep reading...
Note : I did a new installation of Fedora 8 recently by following this procedure... Everything went right.
1) Before you start
For this installation you will need a Linux server that must provide DHCP and TFTP services and optionnally HTTP (in my case this server ran CentOS). All the details are not covered here and learning the basis of the PXE procolol might be a good idea.
2) DHCP configuration
The first thing to do is to check the MAC address of the workstation you're installing Fedora onto. For the purpose of this tutorial we will use 08:00:46:b3:d5:47. This address should be displayed during the PXE boot, just before the BIOS starts to search for a DHCP server.
The local IP address of this server is, in my case, 192.168.1.11
On your server, the DHCP service must be up and running. If not just issue a 'yum install dhcp'.
Edit your /etc/dhcp.conf with
ddns-update-style interim;
deny unknown-clients;
not authoritative;
subnet 192.168.1.0 netmask 255.255.255.0
{
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;
option domain-name "mylocaldomain.com";
option domain-name-servers 192.168.1.11;
allow bootp;
allow booting;
host vaio-laptop
{
hardware ethernet 08:00:46:b3:d5:47;
fixed-address 192.168.1.3;
# boot PXE
next-server 192.168.1.11; # Address of the TFTP server
filename "pxelinux.0"; # Filename of the bootloader
}
The fixed-address parameter is the IP address that will be assigned to the workstation during the PXE boot process and before retrieving the Linux kernel with TFTP. Of course, you'll have to change the subnet, routers, domain-name, domain-name-servers accordingly to your network configuration.
Then start the DHCP service on your server : service dhcpd start
2) TFTP configuration
If needed, install the tftp server with yum : yum install tftp-server
You don't have to (and for security reasons should really avoid to) install the tftp as service launched at boot time. As you only need it once, simply do a /usr/sbin/in.tfpd –s /tftpboot –v, where -s parameter points to the directory where the files served resides. I choosed to use 'tftpboot' right in the root directory.
Edit : I tried recently to run the tftp server that way without success. I had to edit /etc/xinetd.d/tftp (disable = no, server_args = -s /tftpboot), then service xinetd reload
3) Boot files installation
- Check that the syslinux package is installed and do a yum install syslinux if it's not the case.
-
Copy the downloaded Fedora ISO image of the first Fedora cd in /media/iso/
-
Mount somewhere the ISO image : mount -o loop /media/iso/FC-4-i386-disc1.iso /media/iso
Then, copy the files used by the pxe boot process :
cp -p /usr/lib/syslinux/pxelinux.0 /tftpboot/
mkdir /tftpboot/pxelinux.cfg
cp -p /media/iso/images/pxeboot/vmlinuz /tftpboot/
cp -p /media/iso/images/pxeboot/initrd.img /tftpboot/
Now, mkdir pxelinux.cfg under /tftpboot - Then create under this directory a file named from the MAC address of the booting workstation in our case : 01-08-00-46-b3-d5-47
Edit this file and add :
label linux
kernel vmlinuz
append ksdevice=eth0 initrd=initrd.img ks=http://myserver.mylocaldomain.com/ks.cfg
ramdisk_size=8192
You might notice the mention to a 'ks.cfg' file. It's a kickstart file that allows us to fully automate the installation, which is very useful if you plan to repeat the same install on several workstations. But you can live without it and go through the install process by answering the all questions one by one (in that case, remove the ks= directive).
4) Serve the images and packages files
The install process need to have access to the whole bunch of files residing the mounted ISO. You will have to use NFS, FTP or HTTP if you want to stay on a full network installation scenario. I choosed FTP because the setup is straighforward : add a user account (or allow anonymous login) then symlink from the FTP user's home to /media/iso/
After the kernel is booted and at the very first step of the installation, you will have to choose a files retrieval method and if FTP, which are the IP, user account and directory.
eg. : ln -s /media/iso fedora
Then, during install
provide /media/iso to the FTP setup 'directory' option.
5) ks.cfg file generation (optionnal)
This step is for generating the aforementionned ks file. With the help of the right utility you will not have to create it from scratch. Launch 'ksconfig' and prepare your configuration file with you mouse. Then, make it accessible at the url of your choice, as with the ks parameter.
If ksconfig is not present on your system : yum install system-config-kickstart
Final note
Reboot your workstation, and if everything is right you will see it booting the pxelinux kernel, then starting the install process as usual (as with any manual install). For sure I was very pleased to save my crappy Sony from a big jump to the dumpster (since then, it died a little more) !