================ Image Management ================ This chapter will guide you on how to check, update and manage the software version in your OSDx device. There could be some differences depending on the underlying hardware. .. warning:: **Beware of this forward compatibility issue!**: If you want to upgrade your OSDx device to versions higher than **v4.1.1.1** and the installed version is lower than **v3.10.1.7**, you must upgrade first your device to version **v3.10.1.7** or **v4.1.1.1**. Installation ============ OSDx is always pre-installed in embedded platforms. It can only be installed on `amd64/x86` bare metal servers. :ref:`Here `, you can find more information about this. Upgrade ======= OSDx uses a single partition to store the system information. Depending on the running OSDx version, the system mounts the appropriate partition. There can be multiple images on a device, with free storage space being the limiting factor. .. tip:: OSDx can be upgraded at any time in several ways: you can directly upgrade from an image file stored in a USB flash drive; by copying the ISO image to the OSDx system (e.g., using the SCP protocol); or by providing a reachable HTTP url with the image. *Example using SCP:* .. code-block:: none $ scp v3.1.1.1.iso admin@192.168.213.18: admin@192.168.213.18's password: v3.1.1.1.iso 100% 270MB 246.0MB/s 00:01 ``image add`` command --------------------- Once we have stored the OSDx image in our system (or it is reachable using the HTTP protocol), we can upgrade it using the ``image add`` command. *Example using an image stored in the file system:* .. code-block:: none admin@osdx$ image add running://v3.1.1.1.iso force using firmware update url: running://v3.1.1.1.iso Starting upgrade to Teldat OSDx v3.1.1.1 Size check Copying files Copying current configuration Setting up bootloader Execute additional upgrade steps from new version Cleaning up Successful upgrade to Teldat OSDx v3.1.1.1 Run "reboot now" to boot from new version This command includes some useful options: * ``force``: to allow a downgrade operation. * ``local-address``, ``local-interface`` and ``local-vrf``: to specify source IP address, interface and VRF. * ``mark`` and ``vrf-mark``: to mark the generated traffic. .. important:: For access point platforms, this mechanism is different because there are only two memory banks: one bank holds the current image and, the other one, the fallback image. Therefore, these devices only have capacity for *two images* and ``image add`` is the only command available. ``image show`` command ---------------------- ``image show`` can be used to display information about the available images on the OSDx system. It shows the current running image and the one that will be used in the next boot. .. code-block:: none admin@OSDx$ image show Teldat OSDx Installed images: v3.1.1.1 v3.1.1.3 (running) (boot) The command ``show version`` can also be used to display summarized information relative to the device, including the **OS version**: .. code-block:: none admin@osdx$ show version OS vendor: Teldat OS name: OSDx OS version: v3.1.1.1 OS Linux kernel: 4.19.181 OS built by: jeknins@daphne OS build date: Mon Sep 20 11:56:22 UTC 2021 OS installation: physical OS boot mode: user License: BASE N-Cores-1 Hardware vendor: innotek GmbH Hardware model: SDE Hardware OEM model: VirtualBox Hardware version: 1.2 Hardware S/N: 0 Hardware UUID: d45cddc3-ecc6-5776-877e-87749826dc82 Hardware architecture: amd64 Hardware fwid: iso Hardware base MAC: 08:00:27:fc:9d:2c Hardware cpu: 1 x Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (4 cores) Last reboot reason: Performed by user Date: Tue 21 Sep 2021 11:16:00 AM UTC Uptime: 3:12:01 CPU load (1m, 5m, 15m): 0.00 0.00 0.00 CPU usage % (1m): 0.62 Storage usage (kB): 589868/20501072 Memory usage (kB): 297480/2042816 Temperature (ÂșC): 0 Users logged in: 0 Mode (current/next boot): user/user Hostname: osdx ``image delete`` command ------------------------ ``image delete`` can be used to remove images from the system in order to free up disk space. This command includes the following options: * ``force``: to avoid asking for confirmation. * ``all``: to delete all images except for the running one. .. _image-boot-command: ``image boot`` command ---------------------- This command can be used to switch the image that will be used for the next boot. *Example:* .. code-block:: none admin@OSDx$ image show Teldat OSDx Installed images: v3.1.1.1 v3.1.1.3 (running) (boot) admin@OSDx$ image boot v3.1.1.1 admin@OSDx$ image show Teldat OSDx Installed images: v3.1.1.1 (boot) v3.1.1.3 (running) Fallback mechanism ================== OSDx incorporates a fallback mechanism that allows the system to be recovered from a failing boot-up. If for some reason, OSDx fails to boot-up after an upgrade, the system will rollback to a previous state where it was stable by changing the running image to the one in which the upgrade operation was performed. When this rollback operation is performed, the device is rebooted automatically and, only if the boot-up process is successful, the following warning message is printed out: ``Recovered from upgrade failure``.