I have explained in detail about the network boot process, just to enlighten a bit more, When a Network Booting Client starts, it broadcasts to fetch DHCP and TFTP information, DHCP replies and assigns an IP to the Client, as in our example assigned IP is 192.168.1.244.
Client network card built in (Preboot Execution Environment) PXE firmware then asks DHCP server for the Network Boot strap Program (NBP) as in our example it is pxelinux.0.
DHCP server sends path to that file and IP information about TFTP server because TFTP server is going to be used to send that pxelinux.0 file to that client. Client then communicates with TFTP server to fetch that NBP (pxelinux.0), PXE firmware stores NBP in RAM and start executing it. This results in displaying our Boot Menu which is stores in filename “default” under directory “pxelinux.cfg”.
When a selection for boot menu is done, client then asks for kernel, in our example, I have used memdisk for that purpose which can mount iso images (not all, uptil some extent) When memdisk executes it then calls inirtd and finally fetches complete boot image (ISO or IMG) and loads it in RAM and passes control to it
Implementation in Windows, using TFTPD32
Network Booting is quite useful in someways, like you can boot your system to install OS on it, or can take a back from its hard drive if its OS isn’t working anymore or stuff like that.
Implementing Network boot server requires TFTP and DHCP server, thanks to Philippe JOUNIN open source project of tftpd32 which provides us TFTP and DHCP server service to play with.
- Create a directory in your windows system’s C drive named as PXEServer and download /extract the standard (zip file) version (I have used 3.50) of tftp32 in it.
- Also download syslinux latest release and extract it to find three files from it. Pxelinux.0, menu.c32 and memdisk. Copy these three files to PXEServer folder.
- Download and save Ubuntu server edition, Ubuntu Desktop Netboot ISO in PXEServer folder.
- Now in PXEServer folder create a folder pxelinux.cfg and inside it create a file “default” (be-careful about case sensitivity) and open that file in text editor and write what I have shown for that in it.
- To Configure TFTPD32, start it and allow it through firewall, then Follow these screen shots to configure it.
- From Global Settings Tab, Select DHCP Server, TFTP Server, TFTP Client, Syslog Server
- From TFTP tab,
o Select base directory as C:\PXEServer
o TFTP Security to None
o Check PXE Compatibility
o Bind TFTP to this address 192.168.1.1 (as my Server’s IP according to my network)
- From DHCP tab,
o IP pool starting address 192.168.1.2 (according to my network)
o Size of IP pool to 50
o Boot file to pxelinux.0 (the NBP file)
o DNS / Default router to 192.168.1.1 (as my Server’s IP according to my network)
o Bind DHCP to this address 192.168.1.1 (as my Server’s IP according to my network)
- Click OK to close the settings window and it may restart once. After that your server is ready to serve clients
Implementation in FreeBSD, using pfsense
Implementing Network boot server requires TFTP and DHCP server, and if you have pfsense as primary firewall (gateway) having DHCP already configured in it, just some more to start using it as TFTP server.
- Goto General -> Packages tab and from the list of available packages, add TFTP
- Also download syslinux latest release and extract it to find three files from it. pxelinux.0, menu.c32 and memdisk.
- Download and save Ubuntu server edition, Ubuntu Desktop Netboot ISO.
- Create a file “default” (be-careful about case sensitivity) and open that file in text editor and write what I have shown for that in it.
- Now goto Servers -> TFTP tab and upload all these files in pfsense. After that, here is the tricky part, using WinSCP or putty you have to create pxelinux.cfg folder inside and move “default” file in it.
- To associate TFTP server with DHCP, From services -> DHCP server settings tab,
o Add TFTP IP 192.168.1.1 (as my Server’s IP according to my network)
o Check, Enable Network booting
o Enter the boot file path as /tftpboor/pxelinux.0 (the NBP file)
- Now your pfsense is ready to serve clients
Change the System Boot Device Priority
Now Change the boot priority of your client, take Network boot device to top and restart client to boot it from network, as I have set the boot menu like if you left network boot priority always on top, just don’t worry you system will eventually boot from local hard disk after 10Sec.
Its important that system which is going to use Network boot should have at-least double the RAM size of the ISO / IMG boot image it is going to use.
———– Contents of “default” File————-
DEFAULT menu.c32 PROMPT 0 ALLOWOPTIONS 0 TIMEOUT 100 # Title of the boot screen MENU TITLE Network Boot Menu # Local Hard Disk Boot Menu LABEL Boot From Local Hard Disk MENU Boot From Local Hard Disk LOCALBOOT 0 # Ubuntu NetBoot 10 Boot Menu LABEL Ubuntu NetBoot 10.04 MENU Ubuntu NetBoot 10 Boot Disk KERNEL memdisk APPEND iso raw initrd=ubuntunetboot.iso # Ubuntu Server 10 Boot Menu LABEL Ubuntu Server 10.04 MENU Ubuntu Server 10 Boot Disk KERNEL memdisk APPEND iso raw initrd=ubuntuserver.iso # Win98 Boot Menu LABEL Win98 Second Ed Boot Disk MENU Win98 Boot Disk KERNEL memdisk APPEND initrd=win98se.img # DOS Boot Menu LABEL DOS MENU DOS Boot Disk KERNEL memdisk APPEND initrd=dos622.img ----------- Contents of "default" File-------------
To download tftpd32 (standard version)
To download mini.iso file which is Ubuntu 10.04 Desktop Net boot ISO
To download Ubuntu 10.04 Server ISO
To download syslinux.zip (I have used 4.3) which contains pxelinux.0, memdisk, menu.c32
To download DOS and Win98 Second Edition IMG files
Most Viewed Posts Today:
- MySQL Allow Remote Connections
- How to install and configured ASTERISK on Ubuntu
- How to Boot System from Network
- Windows 7 Unidentified Network / No Internet Access Problem
- How to configure NAGIOS Monitoring server on Ubuntu