Skip to main content

In today’s tutorial, we’ll check how easy it is to upgrade the distribution.

Difficulty: ★☆☆☆☆

📜 Table of Contents

  1. Upgrade using the Nitrux Update Tool System
  2. Upgrade using Live media (Calamares)

Upgrade using the Nitrux Update Tool System

The Nitrux Update Tool System (nuts) is a utility designed to update Nitrux OS and provide a backup option for rollbacks.

⚠️ Important: The Nitrux Update Tool System is intended to work exclusively in Nitrux OS, and using this utility in other distributions will break them or not work at all. Please do not open issues regarding this use case; they will be closed.

The Nitrux Update Tool System (nuts) is a simple, minimalistic update and rollback utility. It performs three steps:

  1. It creates a backup of the root directory using SquashFS and the XFS partition using the XFS tools and stores them locally.
  2. Then, it downloads an OTA-style update file and updates the system using a custom AppImage.
  3. Depending on the situation, the utility uses ‘rsync’ and the locally generated SquashFS file or the XFS tools when restoring a backup.

The Nitrux Update Tool System will reboot the computer automatically five seconds after completing a task.

See the commands below to use the Nitrux Update Tool System.

sudo nuts update
  • Updates the currently installed root using the specified media in nuts-query and backs up the current root directory and partition.
    • 🔰 Information: The OTA archive used by the Nitrux Update Tool System does not include a new kernel. To add new kernels to the distribution, please use Kernel Boot; see our tutorial.
    • 🔰 Information: We have updated our internal policy to create the OTA archives used by the Nitrux Update Tool System. Besides not including a new kernel, the OTA archive will not include a new version of the NVIDIA proprietary driver. NVIDIA users must follow the alternative method described in our tutorial to upgrade the distribution; see How to Upgrade Nitrux.
    • 🔰 Information: Depending on various factors, such as system specifications and Internet connection speed, the update process may take between 25 and 30 minutes to complete (during our tests using a virtual machine). Please be aware that the update process involves creating the XFS backup, compressing the XFS backup, creating the root directory SquashFS backup, and downloading and applying the OTA-style update file. Other factors can affect the completion time, such as connectivity to GitHub (and raw.githubusercontent.com) and SourceForge and its mirrors.
sudo nuts restore
  • Restores the backup of the root directory generated during the update.
sudo nuts rescue
  • Restores the backup of the XFS root partition in case of an interrupted update.
    • 🔰 Information: This operation is a special handling of an unforeseen event. If the update process were interrupted, the root would be inconsistent. That means the root is unusable, i.e., the user can’t access the GUI or, worse, a TTY, so the user can’t restore the SquashFS. This operation will allow the user to restore the root partition from a Live session. This operation does not replace restore; it exists if using restore is impossible. The user can only use this operation from a Live session.
sudo nuts self-update
  • Updates the Nitrux Update Tool System and the configuration file using the default branch set in the configuration file.

Upgrade using Live media (Calamares)

Using an installer like Calamares to “update” a distribution doesn’t occur to most people.

But we can do this by replacing only the old root partition with a new one. Think of it like having a directory with multiple text files [abc][abcd][abcxyz] and deleting only one of the files instead of the entire directory, and now you have [abc123][abcd][abcxyz]. Doing the procedure below wouldn’t be possible if the distribution was installed as a single partition, which is the case for most Linux distributions; that’s why Nitrux uses a custom partition layout and why we emphasize not using a single partition layout when installing the distribution initially.

Some might mistake this for “reinstalling.” But reinstalling would mean reusing the initial install media, like an ISO of version 2.9.0, resulting in the “new” root still being version 2.9.0. Nonetheless, we’re saying that if you used an ISO of version 2.9.0 for the initial installation and then used an ISO of version 2.9.1, deleted the old root, and created a new root, the new root, once installed, will be version 2.9.1.

To upgrade from previous versions of Nitrux using Calamares, do the following.

  • Download and flash the latest ISO.
    • 🔰 Information: We create new installation media every 30 days; users who prefer media to be available sooner (bi-weekly, weekly, daily, etc.) can contribute to this expense on OpenCollective.
  • Boot to the Live session and start Calamares.
  • After completing the locale, keyboard, and user configuration, select the option to do a “Manual partitioning.”
  • Select and delete the previous installation root; do not delete or format other partitions unless desired; only select “Keep.”
    • ⚠️ Important: Before proceeding, we can’t stress enough that users back up their home directory using Kup to a separate device (or cloud storage) if it is the case that the previous installation was done to a single partition instead of a separate root and home (or other) partitions which we do not recommend.
  • Select the mount point of all partitions and options (where applicable).
    • Optionally, add labels to the partitions. Our recommended partition layout is below.
    • Optionally, choose to encrypt the whole system (or each partition individually).
      • ⚠️ Important:  Please be aware that the root directory is immutable, and any directory within the root will be read-only. Do not use a single partition layout.
      • ⚠️ Important: When creating the root partition, using XFS as the filesystem is critical due to our intended use of the XFS tools.
      • ⚠️ Important: When creating the EFI System Partition for Legacy BIOS devices, the partition size must be 8MiB.
      • 🔰 Information: The tables below assume the target device is an x64 (x86-64, or amd64) computer using Legacy BIOS, EFI, UEFI firmware, and a GPT partition table.
      • 🔰 Information: While the (new) layout below is our recommendation, users can add almost any directory they want as a separate partition. However, the root and home must be separate due to the root directory’s immutability.
        • ⚠️ Important: Do not add the directory /etc as a separate partition; otherwise, the system will be unbootable.
      • 🔰 Information: Please be aware that neither XFS nor F2FS partitions can’t be shrunk, only grown.
  • The table below defines our partition layout for EFI or UEFI firmware-type computers that use storage devices using GPT (GUID Partition Table).
Partition Label Mountpoint Filesystem Type Flags
EFI System Partition ESP /boot/efi fat32 boot
root NX_ROOT / xfs none
home NX_HOME /home f2fs none
/var/lib NX_VAR_LIB /var/lib f2fs none
swap SWAP none (automatically setup) linuxswap none (automatically setup)
  • The table below defines our partition layout for Legacy BIOS firmware-type computers that use storage devices using GPT (GUID Partition Table).
    • ⚠️ Important: We do not recommend using MBR when installing Nitrux in Legacy BIOS firmware-type computers. If your computer’s target storage device is MBR, we strongly suggest using a different one to install Nitrux.
Partition Label Mountpoint Filesystem Type Flags
EFI System Partition fat32 bios-grub
root NX_ROOT / xfs none
home NX_HOME /home f2fs none
/var/lib NX_VAR_LIB /var/lib f2fs none
swap SWAP none (automatically setup) linuxswap none (automatically setup)
  • Finally, proceed with the installation.

That’s it; this concludes today’s tutorial.