meta data for this page
Differences
This shows you the differences between two versions of the page.
| documentation:pxe_server [2015/07/03 09:24] – created mic | documentation:pxe_server [2016/11/03 14:26] (current) – vor | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | It is possible to boot modules | + | ====== PXE-Server ====== |
| + | |||
| + | It is possible to boot modules | ||
| + | |||
| + | ===== Installing the PXE server ===== | ||
| + | |||
| + | This tutorial was done with a Debian 8. It will only be possible to automatically boot an OS according to the module' | ||
| + | |||
| + | All operations where done with root permissions. | ||
| + | |||
| + | First the following services have to be installed: | ||
| + | < | ||
| + | apt-get install dnsmasq nfs-kernel-server | ||
| + | </ | ||
| + | '' | ||
| + | Also it runs the TFTP Server that provides the kernel images. | ||
| + | |||
| + | '' | ||
| + | |||
| + | ==== Setting up dnsmasq ==== | ||
| + | |||
| + | The config file can be opened with | ||
| + | < | ||
| + | nano / | ||
| + | </ | ||
| + | |||
| + | All DHCP Options used in the following config can be found here [[http:// | ||
| + | The following shows an example configuration for 3 different modules and 4 different kernels. | ||
| + | < | ||
| + | #Binds the DHCP server to eth0 | ||
| + | interface=eth0 | ||
| + | #Sets the IP range with a lease time of 8 hours | ||
| + | dhcp-range=192.168.13.201, | ||
| + | |||
| + | #Enables the TFTP service of dnsmasq | ||
| + | enable-tftp | ||
| + | #Bind the TFTP root folder | ||
| + | tftp-root=/ | ||
| + | #DHCP Option 66 sets which TFTP Server will be used by the client | ||
| + | dhcp-option=66, | ||
| + | #DHCP Option 42 sets a NTP time server | ||
| + | dhcp-option=42, | ||
| + | |||
| + | |||
| + | #The following sets a flag for all MAC addresses starting with the given number, | ||
| + | #so it is possible to set different setups for different modules | ||
| + | dhcp-host=00: | ||
| + | dhcp-host=00: | ||
| + | #" | ||
| + | #the Android kernel | ||
| + | dhcp-host=70: | ||
| + | |||
| + | |||
| + | #These different tags can be used with " | ||
| + | #" | ||
| + | #" | ||
| + | |||
| + | #Kernel filename for Toradex Apalis T30 provided by the TFTP Server | ||
| + | dhcp-boot=tag: | ||
| + | #Root path that is shared by the nfs-kernel-server | ||
| + | dhcp-option=tag: | ||
| + | |||
| + | #Kernel filename for Toradex Colibri T20 | ||
| + | dhcp-boot=tag: | ||
| + | #Root path | ||
| + | dhcp-option=tag: | ||
| + | |||
| + | #Kernel filename for Christmann Apalis Exynos Linux | ||
| + | dhcp-boot=tag: | ||
| + | #Root path | ||
| + | dhcp-option=tag: | ||
| + | |||
| + | #Kernel filename for Christmann Apalis Exynos Android | ||
| + | dhcp-boot=tag: | ||
| + | #Root path | ||
| + | dhcp-option=tag: | ||
| + | </ | ||
| + | |||
| + | After the '' | ||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Then the '' | ||
| + | |||
| + | ==== Setting up nfs-kernel-server ==== | ||
| + | |||
| + | The RootFS and/or a persistent storage are exported to the client via NFS. This is the location where the root filesystem of the desired distribution must be copied to. | ||
| + | |||
| + | The shared/ | ||
| + | |||
| + | < | ||
| + | nano / | ||
| + | </ | ||
| + | |||
| + | Here is an example configuration: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | First in line is the folder that will be shared via NFS.\\ | ||
| + | The '' | ||
| + | The Arguments in the brackets are the following: | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | |'' | ||
| + | A detailed description can be found at [[http:// | ||
| + | |||
| + | To apply the changes the '' | ||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Client configuration ===== | ||
| + | |||
| + | The clients have to be set up in order to boot from the PXE server and not from the internal flash storage or HHD.\\ | ||
| + | For CXP modules the network boot option in the BIOS has to be activated. In most cases that is enough.\\ | ||
| + | |||
| + | The Apalis and Colibri modules must have an u-boot that supports booting over network (version and higher). | ||
| + | And some things ave to be set in the u-boot enviornmentals as described below. | ||
| + | |||
| + | The u-boot can be reached by connecting a serial console to the module and then pressing any key when starting the module to abort the booting process. | ||
| + | |||
| + | ==== Christmann Apalis Exynos ==== | ||
| + | |||
| + | Tested with **U-Boot 2015.07-rc1-00408-g012681b-dirty** | ||
| + | |||
| + | The following variables have to be set in u-boot: | ||
| + | < | ||
| + | setenv usbethaddr | ||
| + | setenv nfsboot 'usb reset; dhcp; mmc dev 1; mmc read 22000000 3000 100; bootm 23e00000 - 22000000' | ||
| + | setenv bootcmd 'run nfsboot; usb start; mmc dev 1; mmc read 0x20008000 600 2700; mmc read 0x22000000 3000 100; bootm 0x20008000 - 0x22000000' | ||
| + | setenv bootargs ' | ||
| + | </ | ||
| + | |||
| + | :!: But it is necessary at the moment to have an SD card with the original Image, or with the flattend device tree blob at sector 3000 of the SD card.\\ | ||
| + | :!: At the moment the kernel stops booting with '' | ||
| + | |||
| + | ==== Toradex Apalis T30 ==== | ||
| + | |||
| + | Tested with **U-Boot 2014.10** | ||
| + | |||
| + | Only the option for '' | ||
| + | Note that in the following steps the MAC address has to be replaced with the actual address of the module.: | ||
| + | |||
| + | If only network boot is desired the following commands have to be executet in the u-boot enviornment: | ||
| + | < | ||
| + | setenv serverip | ||
| + | setenv ipaddr | ||
| + | setenv ethaddr 00: | ||
| + | setenv nfsboot 'run setup; setenv bootargs ${defargs} ${nfsargs} ${setupargs} ${vidargs}; echo Booting via DHCP/ | ||
| + | setenv bootcmd 'run nfsboot; echo; echo nfsboot failed' | ||
| + | saveenv | ||
| + | </ | ||
| + | |||
| + | |||
| + | If the original bootorder should not be replaced the commands are the following: | ||
| + | < | ||
| + | setenv serverip | ||
| + | setenv ipaddr | ||
| + | setenv ethaddr 00: | ||
| + | setenv bootcmd 'run nfsboot; echo; echo nfsboot failed; run emmcboot; echo; echo emmcboot failed' | ||
| + | saveenv | ||
| + | </ | ||
| + | But this will result in one error message '' | ||