Page 1 of 1

PXE boot server

PostPosted: Wed Oct 30, 2013 6:25 pm
by uelpenich
Hello

I want to setup my FVDW NAS as a PXE boot server.
dnsmasq is an easy to setup PXE boot server.
Beside a DNS it has a TFTP server and a DHCP server with all additional functions needed for a boot server.

Is it possible to get dnsmasq working on FVDW firmware?

Werner

Re: PXE boot server

PostPosted: Wed Oct 30, 2013 7:46 pm
by fvdw
Hi Uelpenich

no problem, for those who want to try it. Attached the dnsmasq binary, it should be installed in /usr/sbin

Re: PXE boot server

PostPosted: Thu Oct 31, 2013 12:26 pm
by uelpenich
Thank you for the fast response.
I installed it on my 2Big1 and configured following systems to boot:
[*]Avira Rescue System (needs nfs to boot)
[*]Gparted (needs tftp (or http) to boot)
[*]grml(32) (needs nfs to boot)
[*]grml(64) (needs nfs to boot)


added 2014-09-28
[*] WinPE to deliver Windows installation CDs (uses smb protocol)
[*] desinfec't2014 live virus checker (needs nfs to boot)
[*] GData live virus checker (needs nfs to boot)

HowTo: Add functionality to your PXE server

PostPosted: Wed Nov 06, 2013 5:04 pm
by uelpenich
Find a good HowTo about adding boot images to an existing PXE boot server at
http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,28/func,view/id,52645/

With the new feature in version 15.1 "- possibility to run user made scripts at boot" you can install (after a firmware update) and run the PXE boot server without a firmware modification.
    add a subfolder dnsmasq to the folder /direct-usb/fvdw
    add dnsmasq and dnsmasq.conf to this folder
    add a script "dnsmasq.sh" to the scripts at boot /direct-usb/fvdw/cron-boot
    activate the boot script

This is my script "dnsmasq.sh". It copies dnsmasq (if ncessary) to the standard location and launches the PXE boot service.
Code: Select all
#!/bin/sh
# copy dnsmasq if not present
if [ ! -f /usr/bin/dnsmasq ] && [ -f /direct-usb/fvdw/dnsmasq/dnsmasq ]
 then
 echo "   Copy dnsmasq"
 cp /direct-usb/fvdw/dnsmasq/dnsmasq /usr/bin
 chmod 755 /usr/bin/dnsmasq
fi
# copy dnsmasq.conf anyway to establish changes
if [ -f /direct-usb/fvdw/dnsmasq/dnsmasq.conf ]
 then
 cp /direct-usb/fvdw/dnsmasq/dnsmasq.conf /etc
 echo "   Copy dnsmasq.conf"
fi
#
# launching dnsmasq
if [ -f /direct-usb/fvdw/dnsmasq/dnsmasq.conf ]
 then
 echo "   launching dnsmasq --conf-file=/direct-usb/fvdw/dnsmasq/dnsmasq.conf"
 dnsmasq --conf-file=/direct-usb/fvdw/dnsmasq/dnsmasq.conf
fi
#################################################################


Edit 2014-02-16:
copying of dnsmasq.conf removed, config file from location /direct-usb/fvdw/dnsmasq/ is used.

Edit 2015-01-02
Correction of the script dnsmasq.sh to reflect the changes in V16.0
With version 16.0 it is possible to move the technical shares to other volumes.

PXE boot server: dnsmasq.conf

PostPosted: Sun Feb 16, 2014 8:58 pm
by uelpenich
These are my parameters in the dnsmasq.conf file (refer to the default dnsmasq.conf file for details).

dnsmasq runs a dhcp server which has to coexist with the dhcp server of my ISP box.
The dhcp server of my ISP box is configured to the IP address range 192.168.0.30 - 192.168.0.200
The dnsmasq dhcp server is configured to the IP address range 192.168.0.201 - 192.168.0.250
Adapt these parameters to your environment.
(I couldn't succeed in configuring the dhcp proxy mode :-( )
Code: Select all
domain-needed
bogus-priv
filterwin2k

dhcp-range=192.168.0.201,192.168.0.250,12h
dhcp-option=option:router,192.168.0.1
dhcp-option=vendor:MSFT,2,1i
dhcp-option-force=208,f1:00:74:7e
dhcp-option-force=209,pxelinux.cfg/default
dhcp-option-force=210,/
dhcp-option-force=211,30i
dhcp-boot=pxelinux.0

enable-tftp
tftp-root=/share/1000/tftpboot
dhcp-leasefile=/var/lib/dnsmasq.leases


I placed the pxelinux system to the share "tftpboot", and the boot images to subfolders of tftpboot.

For people using the "vesamenu.c32" I append a nice FVDW background picture.

PXE boot server (Boot Windows Installation DVD)

PostPosted: Sun May 18, 2014 12:55 pm
by uelpenich
I found a german wiki howto setup a PXE boot server to deliver Windows Installation DVDs. It includes also links to the necessary WinPE systems.

http://www.synology-wiki.de/index.php/PXE

PXE boot server: setup http server

PostPosted: Mon Jun 09, 2014 8:48 pm
by uelpenich
You would prefer to deliver bigger images via http protocol rather than tftp protocol because the http protocol is the faster one.

The patch Redirect servers on the http(s) channel (refer to http://plugout.net/viewtopic.php?f=7&t=1632) is very useful to add the boot image directory to the http server.

If you decide to place the images to directory /direct-usb/tftpboot/image add the following lines near the end of /etc/httpd.conf just before the line #Proxy Pass configurations:
Code: Select all
<Directory /direct-usb/tftpboot/image>
Options Indexes
AllowOverride None
</Directory>
Alias /image /direct-usb/tftpboot/image


Edit 2014-11-24
You must not use Alias names used as folder name or file name in /usr/htdocs.

Edit 2015-01-05
Changed /share/1000 to /direct-usb

PXE boot server: setup http server

PostPosted: Mon Jan 05, 2015 5:24 pm
by uelpenich
The setup of the http server is lost, if you
* update the firmware
* change the memory size allocated to the web server (menu setup -> WEB Server)
* enable WebDav feature

Jocko made a shell script http-for-PXE-BootServer.sh to set up the http server at boot time.
http-for-PXE-BootServer.zip
Unzip it and copy it to the folder fvdw/cron-boot. Give the script execution rights (chmod 755). Go to the web interface to Cron Scheduler -> Boot jobs and put it to the Jobs List.
At boot time this script checks if a PXE Boot server directories are present (tftpboot and tftpboot/image) and adds the directory tftpboot/image to the httpd.conf files of the http server.

To check the http server type <ip-of-your-nas>/image into into the address field of your favorite browser.
image_directory.zip