27
February
2025
Updating the Linux antiX bootable USB drive
16:43

Updating the Linux antiX bootable USB drive

27 February 2025 16:43

How to update an antiX bootable USB flash drive with Persistence mode enabled, step by step.

Goal

The goal is to update programs on a bootable USB drive to the latest versions via the Internet.

Introduction

Packages can be updated in two ways - with the standard apt update and apt upgrade -y commands or with the graphical antiX update utility. The second option was chosen because The answer to all questions is “Yes”. Also, the utility "AntiX system update" easier to use: does not require knowledge of the command line.

When updating packages, changes relative to the original version of the distribution will be written to the rootfs. To make the changes fit into the file, you need to increase the size of the rootfs. After the update, you can reduce the size of the rootfs.

The second part of the article will tell how to perform “Remastering”, that is, reassembling the distribution and re-issuing it on bootable media in an optimal form. "Remastering" is an operation performed by the administrator in which the accumulated changes are transferred from the rootfs change file to the main linuxfs distribution file, which reduces the size of the rootfs file to almost a few megabytes, speeds up loading and reduces RAM usage.

The size of the rootfs file required for updating is from 280 MiB to take into account small changes in packages (for example, only a web browser) to 1 GB for large changes in the composition of the antiX or MX Linux OS package base (for example, when a new version of LibreOffice is released). It makes sense to make the rootfs slightly larger than required to avoid fatal upgrade problems if free space in the rootfs runs out during the upgrade process. In connection with creating a copy of the file, the rootfs size should be chosen to be 1/2 of the free space on the USB disk, but not more than 3 GiB.

Updating a Linux antiX bootable USB drive: instructions

Step 1. launching the persistence configuration utility:
- Menu - Applications - antiX - Save settings:
step01

Step 2. select action from the list:Root: Change the save size of the root folder.

step02

Step 3. specify a size sufficient to update rootfs: at least 300 MiB. In this example, I chose 3 GiB, because... The flash drive is large, there is no need to save free space. Available space - translated as “Available space” (7.98 GiB is free on this portable media).

step03

Step 4. the program will create a rootfs.tmp file - a temporary file needed for the rootfs resizing process.

step04

Step 5. success! The rootfs.tmp file has been created. If there is enough free space, the flash drive is working, then this should be the case.

step05

Step 6. action: Quit: exit the program - OK

step06

Step 7 really go out? -Yes

step07

Step 8 menu - Applications - antix -AntiX system update.
This item is required to update operating system packages from the Internet. New versions of programs such as Python, Mozilla FireFox and others will be installed.

step08

Step 9 in the antiX-Update utility I selected "Automatic update

step09

Step 10 the antiX operating system is being updated.

step10

Step 11Your system is updated! -OK

step11

Step 12 before completing the work, immediately after the update, I saved the rootfs state (since I have a Persistence type of persist_root). The same action will be required for the persistence type persist_all:

Menu-Applications-antiX-Recording Save Changes:

step12

Step 13Proceed? -Yes

step13

Шаг 14. antiX Saving the root folder Ready for synchronizing file system changes.
Get started? -Yes.

step14

Step 15 the process of saving the state of the root folder into the rootfs file is in progress, which is used for Persistence.

step15

Step 16 "persist-save Successful".

Please note the space occupied by the root folder is 256 MB out of 2.88 GB. The number 256 MB in this case is the size of the compressed data in the rootfs after updating the packages.
Therefore, it is irrational to make the maximum size of the rootfs file equal to 3 GB; you can specify the size of roofs 1.5 GiB and not change it further. Because even with major OS updates, the size of the data stored in the rootfs file reaches only 900 MB.

step16

Step 17(Optional). I decided to reduce the size of the rootfs file from 3 GiB to 300 MiB (since 256 MiB is occupied by rootfs, and after remastering this space will be freed up and will become free space on rootfs).
action: "Root: Change the save size of the root folder."

step17

Step. 18.(Optional):Size: 300 MiB

step18

Step 19(Optional): Please wait.

step19

Step 20.(Optional): Successful! The rootfs.tmp file has been created. -OK

step20

Step 21(Optional): Wait while the copying process takes place (long, about 15-20 minutes). Please be patient while ___ MiB are copied...

step21

Step 22 action: Quit: exit this program. -OK

step22

Step 23Really go out? -Yes.

step23

Step 24 menu -Exit

step24

Step 25 shutdown:Reboot

step25

Step 26 get started? No, because rootfs was saved at step #12 (Menu-Applications-antiX-Recording Save Changes).

step26

After which the OS shuts down or goes to reboot.

Result

The operating system update is complete.

Next steps

Shut down the system normally, saving the state.

After a major update of the antiX or MX Linux operating system, you should reassemble ("remaster") the LiveCD flash drive, which will be discussed in next article.

(Updated 03/03/2025). What to do if the rootfs size is not enough to update the system?

Large system updates, including LibreOffice, Mozilla Firefox, require more space to save changes.

sudo apt-get update
sudo apt-get upgrade 

There is a command that is designed to write save changes to the rootfs file:

sudo persist-save

Команда имеет ярлык в меню - см. пункт "Record Save Change".

When executing persist-save, the antiX operating system may detect that there is not enough space to save changes to the rootfs file!

not-enought-space

Solution: exit the save state dialog and then in another antiX utility "Save Settings" resize the rootfs file:
Menu - Applications - antiX -Setting up saving,
and in it increase the size of the rootfs file.

img_menu_antix

The time it takes to prepare a new file size and copy data sometimes takes up to 10 minutes.
Then, run "Record Save Changes" again or run the command persist-save. It runs quickly - about 2-3 minutes.

The result of saving to rootfs with a size of 1.5 GiB is positive!

not-enought-space-success


Date of last change: 04/18/2025



Related publications