- Shekhar Govindarajan's Blog - https://www.shekhargovindarajan.com -

Install Fedora 14 Linux without a monitor (headless), keyboard and CD/DVD

As I tweeted http://twitter.com/#!/shekharg/status/30986928094453760 [1] sometime back, I bought a new desktop for my home. This desktop (my home server) is with 16GB of RAM and with no monitor. For the monitor, I thought of hooking it up to my TV via a VGA port (a.k.a. RGB port). The machine has a DVD writer and I also bought a keyboard for Rs. 160.

I required the TV, keyboard and DVD drive only for the one time installation of the operating system. Post the installation, I access the machine only across the network – via SSH (Secure SHell) or a web browser.

But I decided against the easy way of installation using my TV and keyboard. Instead, I challenged myself to install Fedora 14 [2] without using a monitor, keyboard/mouse and DVD drive on the server.

vncviewer showing Fedora 14 installation across the network

In a nutshell, such an installation can be achieved via PXE boot (a.k.a. network boot) wherein the operating system is installed across the network. The installation media itself can reside on any other machine on the network. What’s more, you can even interact with the graphical interface of the installation on any networked machine.

Note that while most modern desktops and servers have network booting, at times, you may need to enable it from the BIOS. This requires a monitor and keyboard defeating the very fun. In my case, network booting was enabled by default.

At the end of this exercise, I have an up and running Fedora 14 machine installed and configured completely across the network. Following is a jot down of how did I carry out this kind of installation.

As said above, you will need another machine connected to your network or your router.  In my case, I configured my laptop running Fedora 13 to serve the installation of Fedora 14 on my home server.

The installation and configuration mentioned below are specific to Fedora 13. But most steps, especially the configuration should apply to other flavors of Linux. The overall steps are as follows:

  1. Configure the network (on the router and laptop).
  2. Install the services on the laptop to:
    • Assign IP to the home server during the network boot
    • Serve the required files to the home server to boot and start the installation
    • Serve the packages to be installed
    • Interact with the graphical installer for disk partitioning, package selection etc.
  3. Configure the services
  4. Start the services
  5. Switch on the target machine/server
  6. Wait for the graphical installer to popup on the laptop, follow the onscreen instructions and ta-da!

Configure the network
At home, I’m on a network with IP 192.168.0.x. This means, machines at my home will have IP addresses like, and so on.

First and foremost step is to stop any DHCP service, which provides dynamic IPs to machine. This is because the laptop will act as the DHCP server (as explained later). In my case, a D-Link DIR-615 router (with IP is serving dynamic IPs. I logged into the router using a web browser and disabled DHCP by unchecking Enable DHCP Server (found under Setup>Network Settings).

Since DHCP is disabled, setup a static IP address for the laptop. This can be done via a Linux command line or console using the following command:

ifconfig eth0

To save yourself from added troubleshooting, disable any running Firewall and SELinux as follows:

service iptables stop

SELinux was already disabled on my laptop. For more on disabling SELinux refer to http://www.crypt.gen.nz/selinux/disable_selinux.html [3]

Install the services
Install the required services as follows:

 yum install dhcp syslinux tftp-server httpd tigervnc

dhcp is the DHCP server which will serve dynamic IP to the server during PXE boot. syslinux provides the files required for booting. tftp-server (TFTP Server) will serve the boot files (provided by syslinux) and the kernel for the server to boot and start the installation. httpd (Apache Web Server) provides the Fedora 14 packages to be installed. tigervnc (TigerVNC) will be used to display the graphical installer on the laptop.

Configure the services: DHCP
To configure DHCP, open the file named dhcpd.conf found in the directory /etc/dhcp and modify it as follows:

subnet netmask{
allow bootp;
filename "pxelinux.0";

Save the file.

Configure the services: TFTP Server
In a text editor, open the file named tftp found in /etc/xinetd.d and change the line:

server_args = -s /var/lib/tftpboot


server_args = -s /var/lib/tftpboot -v -v -v

Appending “-v -v -v” will provide more information about the TFTP Server in /var/log/messages file which useful for troubleshooting. Next, change the line:

disable = yes


disable = no

After the above modifications, the tftp file will look as follows:

# default: off
# description: The tftp server serves files using the trivial file transfer \
#	protocol.  The tftp protocol is often used to boot diskless \
#	workstations, download configuration files to network-aware printers, \
#	and to start the installation process for some operating systems.
service tftp
	socket_type		= dgram
	protocol		= udp
	wait			= yes
	user			= root
	server			= /usr/sbin/in.tftpd
	server_args		= -s /var/lib/tftpboot -v -v -v
	disable			= no
	per_source		= 11
	cps			= 100 2
	flags			= IPv4

Save the file.

Next, copy the files named chain.c32, mboot.c32, memdisk, menu.c32 and pxelinux.0 found in the directory /usr/share/syslinux/ to /var/lib/tftpboot directory:

cd /usr/share/syslinux
cp chain.c32 mboot.c32 memdisk menu.c32 pxelinux.0 /var/lib/tftpboot

Create a directory named pxelinux.cfg (yes, it is a directory with .cfg suffix) under /var/lib/tftpboot. Under the directory /var/lib/tftpboot/pxelinux.cfg, create a file named default with the following content:

default Fedora 14
timeout 0


LABEL Fedora 14
        KERNEL images/fedora/14/vmlinuz
	APPEND initrd=images/fedora/14/initrd.img lang=en_US keymap=us vnc vncconnect= ip=dhcp method=

Here the IP address is the IP address of my laptop (as setup in the section Configure the network)

Create a directory tree images/fedora/14 under /var/lib/tftpboot:

mkdir -p /var/lib/tftpboot/images/fedora/14

We also need to copy two files from the Fedora 14 CD/DVD into this directory. This is explained in the next section.

Configure the services: Apache Web Server
As explained above, Apache Web Server will serve the packages to be installed. For this, we will download and mount Fedora CD/DVD under the directory /var/www/html (the default document root of the web server). Create a directory tree named fedora/14 under /var/www/html as:

mkdir -p /var/www/html/fedora/14

Next, download Fedora 14 DVD or CD ISO from http://fedoraproject.org/en/get-fedora-all [4]. I wanted to do only a base install of Fedora 14 on the server. For this only the first CD of Fedora is required. So I downloaded Fedora-14-x86_64-disc1.iso from here [5].

Mount the downloaded DVD/CD ISO as:

mount -t auto -o loop <path-to-downloaded-iso> /var/www/html/fedora/14

In my case:

mount -t auto -o loop /home/shekhar/Downloads/Fedora-14-x86_64-disc1.iso /var/www/html/fedora/14

Copy the files named initrd.img and vmlinuz found in the directory /var/www/html/fedora/14/images/pxeboot to /var/lib/tftpboot/images/fedora/14.

Start the services
Next, open a Linux terminal or console window and start the services as follows:

service dhcpd restart
service xinetd restart
service httpd restart
vncviewer --listen

Connect the server to the network/router and switch it on. Within a minute you should be able to see the graphical installer on your machine (laptop in my case). Follow the onscreen instructions and you should end up with a successful Fedora 14 installation on the server.

Note that while we didn’t attach a monitor and keyboard for the installation, we didn’t even burn a CD/DVD! We let Apache serve the packages via the mounted ISO.  Plus, with Kickstart [6] you can even have an unattended and automatic installation without interacting with the graphical installer.

PS: Once the installation is done, don’t forget to stop the DHCP server on your machine (service dhcpd stop) and start the DHCP service on your router.

GD Star Rating
GD Star Rating