Thursday, July 14, 2011

Install linux using PXE boot with tftp hosted on Windows

There may be situations where it is necessary to install Linux from the network. For example, you don't have a DVD drive. Most computers nowadays support PXE boot, that is, booting over the network. Fortunately, this is not a very difficult task and can be done with free tools. The following tutorial discusses how to PXE boot the installation process where the installation media downloaded as needed from the Internet.

Requirements

The system to install supports PXE boot.
Access to the Internet.

Network Setup

Configure the DHCP server of your network to assign a static IP to the system to install. In other words, create a mapping from MAC address of the system to install to some IP. For the purposes of this tutorial, let's call the IP of the system to install 192.168.1.11.

TFTP Server Setup

Download the tftpd standard edition from http://tftpd32.jounin.net/tftpd32_download.html. Create a directory called c:/tftpd and unzip the contents of the package there.

Run tftpd.

Click on the Settings button.
Click on the DHCP tab.
Change the following settings.
IP pool starting address 192.168.1.11
Size of pool 5
Boot File netboot\pxelinux.0
WINS/DNS Server 192.168.1.1
Default router 192.168.1.1
Mask 255.255.255.0uncheck "Ping address before assignation"
Note, the IP pool starting address is the same as the IP assigned to the system to install.

Click OK.

Network Boot Package Setup

The steps below show how to create the PXE boot environment for Ubuntu 11.04. The installation steps for other distributions are similar.

Download the PXE boot package of the distribution. Typically, this file is called netboot.tar.gz. For example, the netboot.tar.gz file for Ubuntu 11.04 can be found here http://archive.ubuntu.com/ubuntu/dists/natty/main/installer-i386/current/images/.

Create a directory called c:/tftpd/netboot and untar the contents of netboot.tar.gz there.

It may be the case that some files from the tar package were created as symbolic links. Since we are hosting tftpd from Windows and Windows does not understand symbolic links, these files are not valid. To resolve this issue, replace the symbolic links with the actual file. Again, in the case of the PXE boot package for Ubuntu 11.04, there are two symbolic links that must be replaced: pxelinux.0 and pxelinux.cfg.

c:/tftpd/netboot/pxelinux.0 should be a copy of the file in ubuntu-installer/i386/pxelinux.0
c:/tftpd/netboot/pxelinux.cfg should be a folder containing a file called default which is a copy of the file in ubuntu-installer/i386/boot-screens/syslinux.cfg

Booting

Now, boot the system to install. Most systems do not engage PXE or network boot by default. You may need to press one of the function keys or configure the boot procedure in the BIOS.

If everything is properly configured, the system should engage the PXE boot and load the boot package. Good luck!

Troubleshooting

Tftpd has a log viewer that provides useful information. You can see this by clicking on the "Log viewer" tab.

If you are hosting the network boot from Windows, make sure you have converted the symbolic links to actual files. Note that some symbolic links are pointing to files and others are pointing to directories.

Make sure you have configured your DHCP server to provide a static IP to the system to install.

Make sure your system to install supports PXE boot, and make sure PXE boot is engaged.

5 comments:

venugopal said...

The content of the article was in good details. I hope you’ll keep posting nice to read blogs and informative articles. Thank for sharing a nice one. Great job. Windows Network Setup

steve said...

Excellent contents you have shared here about above concept and really good topic for our knowledge here.Website Hosting

proveyourselfthom said...

It's working with Debian too! :D
Thank you very much!

SCOTT HERMSEN said...

Appreicate your thoughts, Im not always in agreement, but you do cause a peron to think keep blogging!carpet cleaning adelaide

Editor said...

Thank you for sharing such a wonderful Information !!
Here is a list of Top LINUX INTERVIEW QUESTIONS

Veritas Cluster Interview Questions

Redhat Cluster Suite Commands

SAMBA Server Interview Questions

Linux FTP vsftpd Interview Questions

SSH Interview Questions

Apache Interview Questions

Nagios Interview questions

IPTABLES Interview Questions

Ldap Server Interview Questions

LVM Interview questions

Sendmail Server Interview Questions

YUM Interview Questions

NFS Interview Questions

Tcpdump Command Examples & Usages

Example of YUM Commands

Read More at :- Linux Troubleshooting