Changes

Jump to navigation Jump to search
7,623 bytes added ,  05:57, 15 August 2023
use systemctl rather than service (for restart)
Line 3: Line 3:  
== smeserver-tftp-server ==
 
== smeserver-tftp-server ==
 
Maintainer: [mailto:smeserver@batley.id.au Trevor Batley]<br>
 
Maintainer: [mailto:smeserver@batley.id.au Trevor Batley]<br>
Current vesrion: 1.0-2
+
{{#smeversion: smeserver-tftp-server }}
    
=== Description ===
 
=== Description ===
Line 10: Line 10:  
It was produced to support my [[Thinclient|smeserver-thinclient]] contrib, but can be used independently.
 
It was produced to support my [[Thinclient|smeserver-thinclient]] contrib, but can be used independently.
   −
I also have a sister contrib that uses [[Atftp_server|atftp-server]], if you prefer that server. It works the same as this one and is interchangeable.
+
=== Requires ===
 +
*smeserver >= 10.0
 +
*tftp-server >= 0.49
   −
=== Requires ===
+
For a lot of linux distros you will need nfs support
*smeserver >= 7.0
+
 
*tftp-server >= 0.39
+
https://wiki.koozali.org/NFS
 +
 
 +
You will a /etc/exports line similar to this:
 +
 
 +
/tftpboot/ *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
 +
<syntaxhighlight lang="bash">
 +
mkdir -p /etc/e-smith/templates-custom/etc/exports/
 +
echo "/tftpboot/ *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)" > /etc/e-smith/templates-custom/etc/exports/30tftp
 +
expand-template /etc/exports
 +
</syntaxhighlight>
 +
/tftpboot/images/ubunturescue_1104/ *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
 +
if you have installed smeserver-nfs
    
=== Installation ===
 
=== Installation ===
Line 25: Line 38:  
  yum --enablerepo=smecontribs --enablerepo=base install smeserver-tftp-server
 
  yum --enablerepo=smecontribs --enablerepo=base install smeserver-tftp-server
   −
Officially you should then need to apply the database changes etc., but this is not required for this package.
+
The tftp status can be controlled via the Thin Clients server-manager panel if you have installed my [[Thinclient|smeserver-thinclient]] contrib.
   −
signal-event post-upgrade
+
If you haven't, you'll need to enable the tftp server manually from the shell (logged in as root)
signal-event reboot
+
  config setprop tftp status enabled
 
+
  signal-event smeserver-tftp-server-update
The tftpd status is controlled via the Thin Clients server-manager panel if you have installed my [[Thinclient|smeserver-thinclient]] contrib.
  −
 
  −
If you haven't, you'll need to enable the tftp server and expand all the templates etc.
  −
  config setprop tftpd status enabled
  −
  signal-event tftpd-conf
      
If for any reason the tftp server isn't running, try:
 
If for any reason the tftp server isn't running, try:
  /etc/init.d/supervise/tftpd restart
+
  systemctl restart tftp
    
=== Defaults ===
 
=== Defaults ===
Line 52: Line 60:  
| enabled/disabled
 
| enabled/disabled
 
|
 
|
 +
|-
 +
| access
 +
| private
 +
| private/public/localhost
 +
|
 +
|-
 +
| log
 +
| normal
 +
| normal/verbose/disabled
 +
| equivalent to -v or -vv or none
 
|-
 
|-
 
| user
 
| user
| root
+
| nobody
| root/nobody
+
| nobody/<user>
| should default to nobody, but this doesn't work
+
| default to nobody, any valid user id
 +
|-
 +
| privilege
 +
| ro
 +
| ro/rw
 +
| read-only or read-write (rw equivalent to -c)
 +
|-
 +
| timeout
 +
| default
 +
| default/nnn
 +
| timeout value in seconds (default is 900)
 
|-
 
|-
 
| directory
 
| directory
Line 62: Line 90:  
| any directory
 
| any directory
 
|
 
|
 +
|-
 +
| blksize <sup>1</sup>
 +
|
 +
| Value between 512-65464
 +
| e.g. equivalent to -B [512-65464]
 +
|-
 +
| refuse <sup>2</sup>
 +
|
 +
| any tftp parameter
 +
| e.g. blksize equivalent to  -r blksize
 
|-
 
|-
 
|}
 
|}
    
These settings can be set/changed via
 
These settings can be set/changed via
  config setprop tftpd <prop> <value>
+
  config setprop tftp <prop> <value>
  signal-event tftpd-conf
+
  signal-event smeserver-tftp-server-update
 +
 
 +
<nowiki>*1</nowiki> blksize does not have a default entry  in the configuration database. It can be added as above or removed via
 +
 
 +
see Bug 10646 for updated tftp contrib with addition of default setting
 +
config delprop tftp blksize
 +
signal-event smeserver-tftp-server-update
 +
 
 +
<nowiki>*2</nowiki> refuse does not have a default entry in the configuration database. It can be added as above or removed via
 +
config delprop tftp refuse
 +
signal-event smeserver-tftp-server-update
 +
 
 +
===Setup PXE Booting===
 +
 
 +
Some rough notes on setting up PXE booting for linux using syslinux
 +
 
 +
https://wiki.syslinux.org/wiki/index.php?title=PXELINUX
 +
 
 +
To use a menu we need a copy of pxelinux.0
 +
 
 +
From the syslinux wiki link above:
 +
 
 +
On the TFTP server, create the directory "/tftpboot", and copy "pxelinux.0" (from the Syslinux distribution) and any kernel or initrd images that you want to boot.
 +
[5.00+] Also copy "ldlinux.c32" from the Syslinux distribution to the "/tftpboot" directory on the TFTP server.
 +
Finally, create the directory "/tftpboot/pxelinux.cfg". The configuration file (equivalent of syslinux.cfg -- see the SYSLINUX FAQ for the options here) will live in this directory.
 +
 
 +
The actual linux image and any associated files need to be extracted from a source distribution ISO here:
 +
 
 +
/tftpboot/images/{name_of_distro}
 +
 
 +
 
 +
====Menus====
 +
 
 +
We can create a menu system with sub menus as well.
 +
 
 +
Yu will need this from the syslinux ISO:
 +
 
 +
/tftpboot/com32/vesamenu.c32
 +
 
 +
You can add a background image like this:
 +
 
 +
/tftpboot/images/graphics/background.png
 +
 
 +
 
 +
Example /tftpboot/pxelinux.cfg/default:
 +
 
 +
<pre>
 +
menu title --== SME Linux, PXE Main Menu ==--
 +
menu background graphics/background.png
 +
menu tabmsgrow 22
 +
menu cmdlinerow 22
 +
menu endrow 24
 +
 
 +
menu color title                1;34;49    #eea0a0ff #cc333355 std
 +
menu color sel                  7;37;40    #ff000000 #bb9999aa all
 +
menu color border              30;44      #ffffffff #00000000 std
 +
menu color pwdheader            31;47      #eeff1010 #20ffffff std
 +
menu color hotkey              35;40      #90ffff00 #00000000 std
 +
menu color hotsel              35;40      #90000000 #bb9999aa all
 +
menu color timeout_msg          35;40      #90ffffff #00000000 none
 +
menu color timeout              31;47      #eeff1010 #00000000 none
 +
 
 +
prompt 0
 +
noescape 1
 +
allowoptions 0
 +
timeout 0
 +
 
 +
default com32/vesamenu.c32
 +
 
 +
label linuxmenu
 +
menu label ^Linux Boot Disks Menu
 +
kernel com32/vesamenu.c32
 +
append pxelinux.cfg/linux_boot_disks
 +
 
 +
label Arch
 +
menu label ^Arch Boot Disks Menu
 +
kernel com32/vesamenu.c32
 +
append pxelinux.cfg/arch
 +
 
 +
label bootimg
 +
menu label ^Other Boot Images
 +
kernel com32/vesamenu.c32
 +
append pxelinux.cfg/bootimg
 +
</pre>
 +
 
 +
We then need to create separate sub menu configuration files in the same directory. Note the use of NFS is required for some of the setups here.
 +
 
 +
{{Note box|These are old configs that have not been tested recently but should give an idea. Please update with any recent information}}
 +
 
 +
Sample for /tftpboot/pxelinux.cfg/linux_boot_disks
 +
 
 +
The symbol ^ as per eg "Back to ^Main" is used to create an underlined shortcut key M in this instance.
 +
 
 +
<pre>
 +
menu title --== Linux Boot Images ==--
 +
menu background graphics/background.png
 +
menu tabmsgrow 22
 +
menu cmdlinerow 22
 +
menu endrow 24
 +
 
 +
menu color title                1;34;49    #eea0a0ff #cc333355 std
 +
menu color sel                  7;37;40    #ff000000 #bb9999aa all
 +
menu color border              30;44      #ffffffff #00000000 std
 +
menu color pwdheader            31;47      #eeff1010 #20ffffff std
 +
menu color hotkey              35;40      #90ffff00 #00000000 std
 +
menu color hotsel              35;40      #90000000 #bb9999aa all
 +
menu color timeout_msg          35;40      #90ffffff #00000000 none
 +
menu color timeout              31;47      #eeff1010 #00000000 none
 +
 
 +
prompt 0
 +
noescape 1
 +
allowoptions 0
 +
timeout 0
 +
 
 +
default com32/vesamenu.c32
 +
 
 +
label main
 +
menu label Back to ^Main Menu
 +
kernel com32/vesamenu.c32
 +
append pxelinux.cfg/default
 +
 
 +
 
 +
label Mint 12
 +
menu label ^Mint 12
 +
kernel images/mint_12/vmlinuz
 +
append boot=casper initrd=images/mint_12/initrd.lz
 +
 
 +
label Debian Mint
 +
menu label ^Debian Mint
 +
kernel images/debian_mint/vmlinuz
 +
append boot=casper netboot=nfs nfsroot=192.168.10.1:/home/e-smith/files/ibays/computer/files/debian_mint initrd=images/debian_mint/initrd.lz
 +
     
 +
label Xubuntu
 +
menu label ^Xubuntu
 +
kernel images/xubuntu_1110/vmlinuz
 +
append boot=casper netboot=nfs nfsroot=192.168.10.1:/home/e-smith/files/ibays/computer/files/xubuntu_1110 initrd=images/xubuntu_1110/initrd.lz
 +
 +
label Clonezilla-live
 +
MENU LABEL Clonezilla Live (Ramdisk)
 +
KERNEL images/clonezilla/vmlinuz
 +
APPEND initrd=images/clonezilla/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales=en_GB.UTF-8 keyboard-layouts=uk keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://192.168.10.1//images/clonezilla/filesystem.squashfs
 +
 
 +
label systemrescue
 +
menu label ^System Rescue
 +
kernel images/recovery/systemrescue/rescuecd
 +
initrd images/recovery/systemrescue/initram.igz
 +
append setkmap=us netboot=http://192.168.0.10/iso/sysrescue/sysrcd.dat
 +
 
 +
label riplinux32
 +
menu label ^Rescue Is Possible Linux (32-bit kernel)
 +
kernel images/recovery/riplinux/kernel32
 +
append vga=normal video=640x400 nokeymap initrd=images/recovery/riplinux/rootfs.cgz root=/dev/ram0 rw
 +
 
 +
label riplinux64
 +
menu label Rescue ^Is Possible Linux (64-bit kernel)
 +
kernel images/recovery/riplinux/kernel64
 +
append vga=normal video=640x400 nokeymap initrd=images/recovery/riplinux/rootfs.cgz root=/dev/ram0 rw
 +
 
 +
LABEL -
 +
MENU LABEL SeaTools for DOS V2.23 (Seagate/Maxtor)
 +
TEXT HELP
 +
GUI version. Test PATA/IDE/SATA drives by instructing the drive to run its
 +
built-in Drive Self Test (DST) and give either a pass or fail status.
 +
ENDTEXT
 +
#COM32 linux.c32 memdisk
 +
kernel images/memdisk
 +
INITRD images/UBCD/ubcd/images/seatool2.img.gz
 +
 
 +
label GParted Live
 +
MENU LABEL ^GParted Live
 +
kernel /images/gparted/vmlinuz
 +
append initrd=initrd.img boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=http://192.168.10.1/computer/filesystem.squashfs
 +
</pre>
 +
 
 +
===Voip Phones===
 +
 
 +
You can use tftpd with your Voip phones.
 +
 
 +
More advanced phones will allow you to choose a directory for your firmware where. More basic phones may not be able to you anything other than the default root directory.
 +
 
 +
e.g
 +
I have some old Mitel phones use /tftpboot only
 +
I have a number of new Grandstream phones that can load from /tftpboot/some_directory
 +
 
 +
Most Voip phone scan read a config file based on their MAC address to configure themselves during boot.
 +
This can take a while to set up but is a massive time saver.
 +
 
 +
===Related Contribs===
 +
 
 +
[[Thinclient|smeserver-thinclient]]
 +
 
 +
This can aid with basic tftp setup.
    
=== Uninstall ===
 
=== Uninstall ===
 
  yum remove smeserver-tftp-server tftp-server
 
  yum remove smeserver-tftp-server tftp-server
 +
signal-event post-upgrade ; signal-event reboot
   −
Everything should be turned off, but if not, or you just want to make sure
+
If you want to fully clean up, by removing the entries from the configuration database
  /etc/init.d/tftpd stop
+
  config delete tftp
An error saying that /etc/init.d/supervise/tftpd does not exist should be returned
      
=== Source ===
 
=== Source ===
 
The source for this contrib can be found in the smecontribs [http://smecontribs.cvs.sourceforge.net/smeserver/smeserver-tftp-server/ CVS] on sourceforge.
 
The source for this contrib can be found in the smecontribs [http://smecontribs.cvs.sourceforge.net/smeserver/smeserver-tftp-server/ CVS] on sourceforge.
   −
A copy is held in my [http://mirror.contribs.org/smeserver/contribs/trevorb/7.x/Thinclient/source/ contribs directory].
+
=== Bugs ===
 +
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the smeserver-tftp-server component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-tftp-server|title=this link}}.
   −
=== Bugs ===
+
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-tftp-server|noresultsmessage="No open bugs found."}}
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the smeserver-tftp-server component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-tftp-server|title=this link}}.
   
----
 
----
[[Category: Contrib]]
+
[[Category:Contrib]]
[[Category: Asterisk]]
+
[[Category:Asterisk]]
[[Category: Administration]]
+
[[Category:Administration]]
371

edits

Navigation menu