install: pxe: warn about keeping filesytem.squashfs name

https://support.sentrium.io/agent/go/ticket/1268
This commit is contained in:
currite 2020-09-21 20:46:26 +02:00
parent 23e3d077ea
commit 7de85e0e94

View File

@ -351,7 +351,7 @@ installation method which allows deploying VyOS through the network.
* :ref:`tftp-server` * :ref:`tftp-server`
* Webserver (HTTP) - optional, but we will use it to speed up installation * Webserver (HTTP) - optional, but we will use it to speed up installation
* VyOS ISO image to be installed (do not use images prior to VyOS 1.2.3) * VyOS ISO image to be installed (do not use images prior to VyOS 1.2.3)
* Files ``pxelinux.0`` and ``ldlinux.c32`` `from the Syslinux distribution <https://kernel.org/pub/linux/utils/boot/syslinux/>`_ * Files *pxelinux.0* and *ldlinux.c32* `from the Syslinux distribution <https://kernel.org/pub/linux/utils/boot/syslinux/>`_
Configuration Configuration
------------- -------------
@ -363,7 +363,7 @@ Configure a DHCP server to provide the client with:
* An IP address * An IP address
* The TFTP server address (DHCP option 66). Sometimes referred as *boot server* * The TFTP server address (DHCP option 66). Sometimes referred as *boot server*
* The *bootfile name* (DHCP option 67), which is ``pxelinux.0`` * The *bootfile name* (DHCP option 67), which is *pxelinux.0*
In this example we configured an existent VyOS as the DHCP server: In this example we configured an existent VyOS as the DHCP server:
@ -389,17 +389,18 @@ Step 2: TFTP
Configure a TFTP server so that it serves the following: Configure a TFTP server so that it serves the following:
* The ``pxelinux.0`` file from the Syslinux distribution * The *pxelinux.0* file from the Syslinux distribution
* The ``ldlinux.c32`` file from the Syslinux distribution * The *ldlinux.c32* file from the Syslinux distribution
* The kernel of the VyOS software you want to deploy. That is the ``vmlinuz`` * The kernel of the VyOS software you want to deploy. That is the
file inside the ``/live`` directory of the extracted contents from the ISO *vmlinuz* file inside the */live* directory of the extracted
file contents from the ISO file.
* The initial ramdisk of the VyOS ISO you want to deploy. That is the * The initial ramdisk of the VyOS ISO you want to deploy. That is the
``initrd.img`` file inside the ``/live`` directory of the extracted contents *initrd.img* file inside the */live* directory of the extracted
from the ISO file. Do not use an empty (0 bytes) initrd.img file you might contents from the ISO file. Do not use an empty (0 bytes) initrd.img
find, the correct file may have a longer name. file you might find, the correct file may have a longer name.
* A directory named pxelinux.cfg which must contain the configuration file. * A directory named pxelinux.cfg which must contain the configuration
We will use the configuration_ file shown below, which we named default_. file. We will use the configuration_ file shown below, which we named
default_.
.. _configuration: https://wiki.syslinux.org/wiki/index.php?title=Config .. _configuration: https://wiki.syslinux.org/wiki/index.php?title=Config
.. _default: https://wiki.syslinux.org/wiki/index.php?title=PXELINUX#Configuration .. _default: https://wiki.syslinux.org/wiki/index.php?title=PXELINUX#Configuration
@ -446,35 +447,44 @@ Example of simple (no menu) configuration file:
Step 3: HTTP Step 3: HTTP
^^^^^^^^^^^^ ^^^^^^^^^^^^
As you can read in the configuration file, we are sending ``filesystem.squashfs`` We also need to provide the *filesystem.squashfs* file. That is a heavy
through HTTP. As that is a heavy file, we choose HTTP to speed up the transfer file and TFTP is slow, so you could send it through HTTP to speed up the
over TFTP. transfer. That is how it is done in our example, you can find that in
the configuration file above.
First run a web server - you can use a simple one like **First** run a web server - you can use a simple one like
`Python's SimpleHTTPServer`_ and start serving the ``filesystem.squashfs`` `Python's SimpleHTTPServer`_ and start serving the `filesystem.squashfs`
file. The file can be found inside the ``/live`` directory of the extracted file. The file can be found inside the `/live` directory of the
contents of the ISO file. extracted contents of the ISO file.
Second, edit the configuration file of the :ref:`install_from_tftp` so that it shows **Second**, edit the configuration file of the :ref:`install_from_tftp`
the correct URL at ``fetch=http://<address_of_your_HTTP_server>/filesystem.squashfs``. so that it shows the correct URL at
``fetch=http://<address_of_your_HTTP_server>/filesystem.squashfs``.
And third, restart the TFTP service. If you are using VyOS as your TFTP Server, you can restart .. note:: Do not change the name of the *filesystem.squashfs* file. If
the service with ``sudo service tftpd-hpa restart``. you are working with different versions, you can create different
directories instead.
.. note:: Make sure the available directories and files in both TFTP and HTTP And **third**, restart the TFTP service. If you are using VyOS as your
server have the right permissions to be accessed from the booting clients. TFTP Server, you can restart the service with
``sudo service tftpd-hpa restart``.
.. note:: Make sure the available directories and files in both TFTP
and HTTP server have the right permissions to be accessed from the
booting clients.
.. _`Python's SimpleHTTPServer`: https://docs.python.org/2/library/simplehttpserver.html .. _`Python's SimpleHTTPServer`: https://docs.python.org/2/library/simplehttpserver.html
Client Boot Client Boot
----------- -----------
Finally, turn on your PXE-enabled client or clients. They will automatically get an IP Finally, turn on your PXE-enabled client or clients. They will
address from the DHCP server and start booting into VyOS live from the files automatically get an IP address from the DHCP server and start booting
automatically taken from the TFTP and HTTP servers. into VyOS live from the files automatically taken from the TFTP and HTTP
servers.
Once finished you will be able to proceed with the ``install image`` command as Once finished you will be able to proceed with the ``install image``
in a regular VyOS installation. command as in a regular VyOS installation.