Preface#
In downloading OpenWrt, what do the file name formats actually mean, and how should I choose? Let’s briefly discuss the underlying logic, and I believe you will be able to make the right choice after reading this.
Including file system, version number, format
SquashFS#
First, let’s understand that SquashFS is a read-only compressed file system that can significantly reduce the size of the file system. It is commonly used in embedded systems, including routers.
Specifically, SquashFS Overlay consists of two parts:
- LOWER
This is the basic read-only SquashFS file system, which contains all the default files of the operating system.
- UPPER
This is a writable overlay used to store all files that require write access, such as configuration files.
::: gallery
:::
When OpenWrt needs to access a certain file, it first looks in UPPER; if not found, it accesses the read-only SquashFS in LOWER. If a file needs to be written, it is written into the UPPER overlay.
By combining the read-only SquashFS and the writable UPPER overlay, OpenWrt achieves a writable root file system while maintaining the space efficiency and reliability advantages of SquashFS.
This architecture gives OpenWrt the advantages of a smaller firmware size and a secure and reliable system, while also allowing for some runtime configuration modifications.
However, the downside is that most firmware will have fixed storage space, and generally, it requires expansion operations on the storage space size by creating an EXT4 partition to mount for expansion.
Purpose#
I have prepared the names of three firmware versions: CatWrt, Lean's LEDE, and ImmoralWrt.
CatWrt.v23.8.x86_64-squashfs-combined-efi.img.gz
openwrt-x64-R23.4.1-squashfs-combined-efi.img.gz
immortalwrt-23.05.1-x86-64-generic-squashfs-combined-efi.img.gz
CatWrt.v23.8.mt798x-filogic-xiaomi_redmi-router-ax6000-squashfs-sysupgrade.bin
CatWrt.v23.2.ARM-rockchip-armv8-fastrhino_r66s-squashfs-sysupgrade.img.gz
The different firmware names are easily recognizable, so I won’t elaborate further;
Name#
x86_64
and x64
refer to the 64-bit image of the x86 architecture, and generally, firmware is not 32-bit;
R23.4
and v23.8
indicate the version number, with a closer match meaning a newer version;
generic
means a generic version;
combined
refers to a combined version that includes the boot system, etc.;
xiaomi_redmi-router-ax6000
and fastrhino_r68s
are product names and models, non-x86 models;
mt798x-filogic
and ramips-mt7621
refer to chip architecture or names or series;
Boot & Startup#
We recommend that all new machines use EFI for booting; subsequent tutorials will be primarily based on EFI;
New machines default to UEFI, and installing the BIOS version may cause boot issues; you can ask the customer service of the machine seller how to enable UEFI.
squashfs-combined
is for traditional BIOS boot;
squashfs-combined-efi
is for EFI boot;
EFI is an older version than UEFI that supports high-definition boot; older hardware or virtual machines may consider traditional BIOS boot for convenience, and general BIOS versions will not be marked additionally;
Format#
The rootfs.img.gz
file is suitable for Docker and LXC containers, allowing for containerized deployment of the system;
The img.gz
file is a compressed file that can be decompressed into an img file, commonly used during downloads to reduce network load, and paired with installation during online upgrades;
The img
file is an image used for single systems on physical machines or writing to virtual machines, which is the most common format;
It is recommended to use the IMG writing tool for installation in WEPE or StarWind V2V Converter for installation in virtual machines;
The vmdk
file is a virtual hard disk file for VMware virtual machines, which can also be used by other systems (PVE);
The qcow2
file is a virtual hard disk file for PVE or KVM virtual machines, which can be imported into PVE and converted to RAW files for use;
The vhdx
file is a virtual hard disk file for Hyper-V virtual machines, suitable for hosts running Windows Pro;
bin
is a binary image file
initramfs-kernel
is a temporary file system that includes the Linux kernel to complete basic functions, used for updating the complete version of squashfs in the system;
squashfs
is the file system using SquashFS Overlay
rootfs0
is the root file system, similar to sqfs but without the kernel
kernel1
is the kernel
Partition Layout#
::: warning
Only for mt798x, requires UBOOT support; here is an example using Redmi AX6000.
:::
stock layout
is the original OpenWrt partition, with a&b being the smallest partitions, approximately 50-60 MB when halved;
OpenWrt U-Boot layout
is a larger partition version of 110MB, which is used by CatWrt;
custom U-Boot layout
can also be called ubootmod, slightly larger than the larger partition version at 122.5MB, not including bad block management NMBM.
Putting It All Together#
CatWrt.v23.8.x86_64-squashfs-combined-efi.img.gz
= CatWrt distribution OpenWrt version v23.8 (released in August 2023), suitable for x86 64-bit architecture, with a combined firmware of sqfs file system, booting using EFI (high-definition boot), packaged as img, and finally compressed by gz.
CatWrt.v23.8.mt798x-filogic-xiaomi_redmi-router-ax6000-squashfs-sysupgrade.bin
= CatWrt distribution OpenWrt version v23.8 (released in August 2023), suitable for chip mt798x; here, x refers to a collection of various processors under mt79, which is the sqfs firmware for Redmi AX6000, used for upgrades in UBOOT or system upgrades.
This article is synchronized and updated by Mix Space to xLog. The original link is https://www.miaoer.net/posts/blog/format-openwrt