13
December
2024
How to burn a bootable USB flash for antiX MX Linux with persistence
12:00

How to burn a bootable USB flash for antiX / MX Linux with persistence

13 December 2024 12:00

The article lists ways to burn a Live flash drive with Persistence.

The usual methods for writing an ISO image - dd and balena Etcher, org.fedoraproject.MediaWriter are not suitable for writing a fully functional (with the Persistence function, i.e. saving the state between reboots) bootable USB drive antiX or MX Linux.
In order for a bootable USB flash drive to maintain persistence between sessions, you need to have free space on the partition to save data, and the file system of the first partition with the boot flag should be ext4 or fat32 or exFAT and occupy almost all the free space of the USB drive, and the second small efs partition with the esp flag should be in fat32.

Copying an image from an ISO to a USB flash "byte by byte" using dd or balena Etcher or Fedora MediaWriter doesn't reserve space for data. The result is an ISO9660 partition - the same as on a DVD-R with the Joliet file system, which takes up the initial 2 GB of the flash drive. The remaining free space of the USB disk disappears; adding it to the data partition will not work, because The ISO9660 partition is fixed as if it were CDFS on a "DVD-R" disc.

Downloading the antiX Linux ISO image (see link)

*https://antixlinux.com/torrent-files/- select the old SysVInit or the new ruinit and bit depth (usually x64). For example, I choose the option Download antiX-23.2_x64-runit-full- full x64 distribution with the ruinit service initialization system and the Open Office office suite. I download the antiX ISO file using the Transmission program.

Correct distribution of disk space (partitioning) for Live USB with persistence

Almost all free space is allocated to the first partition of the system and “persistence”.
antix-liveusb-gparted

Methods for creating a correct boot disk for antiX / MX Linux with state storage (with Persistence)

1)rufus(Windows GUI utility)
2)live-usb-maker(Linux, text interface)
3)MX_Live_USB_Maker(Linux, GUI)
4)Live USB maker" (live-usb-maker) from an antiX/MX Linux session(Linux antiX/MX, GUI)

Method No. 1 - Windows application "rufus"

https://rufus.ie/ru/ disadvantage: for the UEFI bootloader, the program “swears” at incorrect code and downloads it from the Internet. If the latter is missing, you will not be able to burn a USB disk. Otherwise, the rufus program does an excellent job of creating a bootable USB flash drive - you can use the antiX boot disk created by rufus.

Method No. 2 - Linux console application "live-usb-maker"

Before starting, put the ISO image of the antiX or MX system in your home folder ~ (so that there are no problems with paths).

sudo apt-get update 
sudo apt-get install git
git clone https://github.com/BitJam/live-usb-maker
git clone https://github.com/BitJam/cli-shell-utils
sudo apt install extlinux

Preparation:

cd live-usb-maker
locale # Please remember the current language language
export LANGUAGE=en_US.UTF-8

Launch:

sudo ./live-usb-maker

Please answer the program questions before enrolling. We are interested in a full-featured live-usb boot disk
usb_maker_text_mode
Select items by pressing the Enter key. At one of the steps you will be asked to specify the path to the ISO file. I specified an absolute path, for example /home/user/disk.iso
To avoid problems with encoding and text input, I moved the ISO file to my home folder.

After burning the disc, you can return the console settings to the locale of the current language. In my case:

 export LANGUAGE=ru_RU:ru

The LANGUAGE variable transition is needed for the program to work correctly (otherwise it will not be able to determine the size of the USB drive).

Launch in automatic (non-dialog, i.e. without questions) mode:

export LANGUAGE=en_US.UTF-8
lsblk
sudo ./live-usb-maker gui --from="/home/user/antiX-23.2_x64-full.iso" --target=/dev/sdX

Where sdX - indicate the target USB disk, for example, sdb, on which we want to burn the ISO image of the bootable LiveCD.
running_live-usb-maker

The live-usb-maker application will create an MBR partition table based on the antiX image two partitions

Filesystem Type Size Mounted on
/dev/sdb1 ext4 15G main
/dev/sdb2 vfat 49M uefi

After finishing recording, you need to safely remove the USB drive, because The recording may continue for about a minute.
On the panel next to the clock, click "Extract". Or look at the LED indicator of the “flash drive” (if there is one): after the recording ends, it will stop blinking.

eject

The LiveCD antiX bootable flash drive is suitable for both BIOS and UEFI based computers.

Method No. 3 - Linux application "MX-live-usb-maker" in AppImage format

The MX-live-usb-maker program is included in the antiX and MX Linux OS (see Method 4), but it can be run on almost any Linux operating system as an executable file.
AppImage is a portable application format for any Linux OS. The application does not need to be installed, because it is distributed as a package with the .AppImage extension.

MX_Live_USB_Maker x86_64 .AppImage download page - https://github.com/dolphinoracle/lum-qt-appimage/releases

Download the zip file containing the AppImage, extract it to your current folder

unzip -j MX_Live_USB_Maker-24.6.glibc2.28-x86_64.AppImage.zip 

(switch -j - do not recreate the folder structure)

To launch the application:

export LANGUAGE=en_US.UTF-8
sudo ./MX_Live_USB_Maker-24.6.glibc2.28-x86_64.AppImage

The graphical interface of the mx_live_usb_maker program is somewhat similar to rufus.

mx_live_from_appimage

After specifying the parameters, the application will launch the same console utility as in method No. 2, but with different keys. Therefore it is necessary to pass the new value of the environment variable export LANGUAGE=en_US.UTF-8 before calling her. After setting the specified variable, the program performs USB recording without errors.

The USB write is completed by checking the checksums. You need to wait until the utility completes its work - a message with an "OK" button appears in the center of the screen.
success

Method No. 4 - launching the Live USB Maker utility from a running antiX graphic session

1) boot from a flash drive or hard drive or antiX or MX Linux virtual machine.
2) use the utility that is already present in the OS in the program menu.

A utility for burning full-featured USB bootable disks from an ISO image is available in the Start menu of antiX or MX Linux OS.

mx_maker_live

In MX Linux it can also be selected from Tools:
mx_instruments

Appearance:

live_usb_maker

As usual, we select what to burn (ISO file) and what (USB storage device).

There is no need to reserve free space for rootfs or homefs. Since all changeable rootfs and homefs data in “persistence” mode are written to the first partition on the flash drive next to the linuxfs operating system image file. The size of the flash drive is preferably 16 GB, but it is also possible to write to a 4 GB USB drive without the ability to update packages.


Date of modification: 04/17/2025.



Related publications