Note: The information below is exclusively for the ISO images that include or support znx and does not pertain to the ISO files that use a traditional installer such as Calamares.
I want to check out Nitrux, which you can deploy using znx (how to here).
You can go about this in different ways. You can either use the entire disk or reuse an existing root partition (as long as the filesystem is Btrfs). It doesn't matter if the partition is empty or already in use for the latter.
Suppose you decide to use the entire disk. In that case, you can download the ISO, flash it to a USB (don't burn it to optical media), boot the Live USB, and use znx to initialize and deploy the distribution to an internal or external device. The ISO already includes znx.
If you decide to reuse an existing partition, you can check our tutorial "Integrating znx with your existing OS" for detailed steps. In this case, you need to download znx.
However, I'd emphasize that you read the FAQ to understand the distribution goals overall. And for information about znx specifically, you can read these articles on our blog.
Since you already have a distribution installed on your computer, in your case, Fedora, you need to download the znx AppImage file and follow the steps in the integration tutorial.
We distribute znx as an AppImage, so there's no installation involved (i.e., using a package manager). There's also no "installation" involved with Nitrux either (the correct term in this context is deployment; we explain the difference in the FAQ).
To quote the FAQ:
Deploying the operating system in our case means that you are copying the ISO file to the storage device as a single file and enabling persistence on the storage device using OverlayFS instead of extracting its contents and creating the standard directory tree on the storage device; this is why we prefer to say that Nitrux does not do a standard install.
In other words, Nitrux does a frugal installation (the operating system files are stored in just a couple of files in a directory, rather than spread out over a drive partition).
“A frugal installation only occupies one folder in a partition, and the rest of the partition can be used for anything else. Other Linux distributions, for example.” Meanwhile, traditional Linux distributions do a full installation, “A full installation is where Linux occupies an entire partition, and in that partition you will see the folders /bin, /sbin, /opt, /etc/, /sys, /proc, /tmp, /dev, /usr, /run, /lib, and more.”
An installer such as Ubiquity, Calamares (KPM Core), Anaconda, and every other installer [...] extract the contents of the SquashFS file inside the ISO and place the contents on a partition of the storage device.
That is why we don’t refer to znx “installing” an OS; instead, we use the word deploy. Because znx isn’t extracting the SquashFS file from the ISO, it’s booting the ISO directly, and data is preserved on the storage device using OverlayFS.
After downloading the AppImage, you have to make it executable; then, you can execute the AppImage in the Terminal using sudo.
sudo chmod +x znx.AppImage
- Optionally, you can move it to
/usr/bin/ so you don't have to type ./ to execute the AppImage, and you can use it anywhere.
sudo mv znx.AppImage /usr/bin/znx
It's important to understand that znx is a CLI program; it does not have a graphical interface so clicking the AppImage file will not open a window.
- Once it's made executable, you can use
sudo znx --help to display the help.
- You need to type the commands and arguments for znx with the correct syntax, like the examples in the help show.
Usage: znx [options] <command> [command_args]
Options:
-h, --help Print this help.
-v, --version Print the commit hash that generated this binary.
-d, --debug Enable debugging messages.
-y, --no-confirm Autoconfirm dangerous operations.
Conventions:
<device>:
A block device file name. e.g.: /dev/sdxN, /dev/sdb.
<image>:
Must match the regular expression: '^\w+/\w+$'. This means that letters, numbers and underscores
are allowed on both sides of a slash. No other characters are allowed.
<origin>:
Can be a URL or a path pointing to an ISO image, or a directory path. The latter may be useful
for deploying images from within a live session.
Commands:
init <device> Initialize <device>.
fix-esp <device> Restore the ESP (EFI System Partition) of <device>.
deploy [-k] <device> <image> <origin> Deploy <image> on <device> from <origin>.
The '-k' flag serves to bypass SSL certificate checking.
rename <device> <old_name> <new_name> Rename image <old_name> to <new_name>.
update <device> <image> Update <image>.
check-update <device> <image> Check if an update for <image> is available.
rollback <device> <image> Revert an update.
reset <device> <image> Delete all user data on <image>.
clean <device> <image> Remove the backup that is created during an update.
remove <device> <image> Remove <image> and all associated data from <device>.
status <device> <image> Show information about <image>.
list <device> List the deployed images on <device>.
The gist of the integration tutorial is the following.
You need to download and extract the znx AppImage.
You need to install the package that contains the file /usr/lib/grub/x86_64-efi/btrfs.mod in Fedora that is grub2-efi-x64-modules.
You need to create or delete the contents of the directory /boot/efi/boot/grub.
You need to copy the file grub.cfg and the directory themes from the AppImage to /boot/efi/boot/grub.
You need to rename the directory /boot/efi/EFI/BOOT to /boot/efi/EFI/boot and delete its contents.
You need to copy the file bootx64.efi from the AppImage to /boot/efi/EFI/boot.
You need to add an EFI boot entry (not a GRUB boot entry) to load the znx boot loader file.
- Replace
/dev/sdx with the device with your ESP partition (e.g. /dev/sdc).
efibootmgr -c -d /dev/sdx -p 1 -L "znx" -l "\EFI\boot\bootx64.efi"
You need to change the partition labels for the ESP and the root partition. You can do this from the Terminal or using GParted (or similar).
- Replace
/dev/sdxN with your partition (e.g. /dev/sdc1).
fatlabel /dev/sdxN ZNX_BOOT
btrfs filesystem label /dev/sdxN ZNX_DATA
You can deploy an ISO and test the functionality of znx. znx supports both local and remote files, and we will use a remote file.
- Replace
/dev/sdx with the device with your root partition (e.g. /dev/sdc).
[deployment_name] can be any combination of alphanumeric characters, i.e., abc/123, ABC/123, 123/ABC, 1A2B/3C4D, etc. Please make sure not to use spaces or hyphens.
sudo znx /dev/sdx [deployment_name] http://updates.nxos.org/nitrux-OTA-latest-amd64.iso
As mentioned in the tutorial, to boot into the ISOs deployed with znx, you have to use the EFI boot menu not the GRUB menu. It's essential to understand the difference.
On the other hand, follow the steps below to use the entire disk.
- Whether you choose to flash the ISO to a USB or run znx from another distribution (installed or not) and want to use another disk, the steps are the same.
First, you initialize the device. This will wipe the device as znx will create a new partition table and partitions. The syntax of the command for this task, in this case, is znx [command] [path_to_target_device].
- Replace
/dev/sdx with the device (e.g. /dev/sda).
- Note: SATA and USB storage devices are named
/dev/sdx, and NVME devices are named /dev/nvmeXnY, where X is the port and Y is the device.
sudo znx init /dev/sdx
Then, proceed to deploy Nitrux. The syntax of the command for this task, in this case, is znx [command] [path_to_target_device] [deployment_name] [path_to_file]. znx supports both local and remote files. We will use a remote file.
[deployment_name] can be any combination of alphanumeric characters, i.e., abc/123, ABC/123, 123/ABC, 1A2B/3C4D, etc. Please make sure not to use spaces or hyphens.
sudo znx deploy /dev/sdx nitrux/release http://updates.nxos.org/nitrux-OTA-latest-amd64.iso
And that's it. Reboot and select the drive to boot into Nitrux.