banner
miaoer

miaoer

喵二の小博客 xLog 分站
tg_channel
telegram

OpenWrt File Naming Format, Understanding Before Installing Firmware

Preface#

What does the file name format mean when downloading OpenWrt, and how should I choose? Let me explain the logic behind it briefly, and I believe you will be able to make the right choice after reading it.

Including file system, version number, and format.

SquashFS#

Let's first understand that SquashFS is a read-only compressed file system that can greatly 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 place all files that need to be written, such as configuration files.


::: gallery
1
2
:::


When OpenWrt needs to access a file, it first searches in UPPER. If it is not found, it accesses the read-only SquashFS in LOWER. If it needs to write a file, it writes it to 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 allows OpenWrt to have the advantages of a small firmware size and a secure and reliable system, while also allowing for some runtime configuration modifications.

However, the drawback is that most firmware will have a fixed storage space, and in general, it is necessary to expand the storage space by creating an EXT4 partition to mount it.

Usage#

Here I have prepared the names of three firmware versions, namely 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 easy to distinguish, so I won't go into too much detail here.

Name#

x86_64 and x64 are images of the x86 architecture with 64 bits, and most firmware is not 32-bit.

R23.4 and v23.8 represent the version numbers, and the closer they match, the newer they are.

generic means the generic version.

combined means the combined version, including the boot system, etc.


xiaomi_redmi-router-ax6000 and fastrhino_r68s are product names and models, not x86 models.

mt798x-filogic and ramips-mt7621 refer to chip architecture or names, or series.

Booting & Bootloader#

We recommend using EFI for booting on all new machines. Most of the tutorials that follow are based on EFI.

New machines are set to enable UEFI by default, and installing a BIOS version will cause booting issues. You can ask the customer service of the machine seller for specific instructions on how to enable UEFI.

squashfs-combined is for traditional BIOS booting.

squashfs-combined-efi is for EFI booting.

EFI is an older version that supports high-definition booting compared to UEFI. For older hardware or virtual machines, traditional BIOS booting may be more convenient. Generally, BIOS versions do not have any additional labels.

Format#

rootfs.img.gz is a file for Docker and LXC containers, which can be used to deploy the system as a container.

img.gz is a compressed file that can be decompressed into an img file. It is commonly used for reducing network load during downloading and for online upgrades.

img is an image file used for writing to physical machines or virtual machines. It is the most common format.

It is recommended to use the IMG Disk Writing Tool for installation in WEPE or StarWind V2V Converter for installation in virtual machines.

vmdk files are virtual hard disk files for VMware virtual machines, which can also be used in other systems (PVE).

qcow2 files are virtual hard disk files for PVE or KVM virtual machines. Importing them into PVE and converting them to RAW files can be used.

vhdx files are virtual hard disk files for Hyper-V virtual machines, suitable for Windows Pro Professional Edition as the host machine.


bin is a binary image file.

initramfs-kernel is a temporary file system that includes the basic functions of the Linux kernel. It is used to update the squashfs full version in the system.

squashfs is a file system that uses SquashFS Overlay.

Partition Layout#

::: warning
Only for mt798x, UBOOT support is required. Here is an example of Redmi AX6000.
:::

stock layout is the original OpenWrt partition, with the a&b partitions being the smallest, approximately 50-60 MB when folded.

OpenWrt U-Boot layout is the large partition version, 110MB, which CatWrt uses.

custom U-Boot layout, also known as ubootmod, is slightly larger than the large partition version, at 122.5MB, and does not include bad block management NMBM.

Putting It All Together#

CatWrt.v23.8.x86_64-squashfs-combined-efi.img.gz

= CatWrt distribution of OpenWrt, version v23.8 (released in August of the 23rd year), suitable for x86 64-bit architecture, file system is a combination of sqfs, booting with EFI (high-definition booting), packaged as img, and finally compressed with gz.

CatWrt.v23.8.mt798x-filogic-xiaomi_redmi-router-ax6000-squashfs-sysupgrade.bin

= CatWrt distribution of OpenWrt, version v23.8 (released in August of the 23rd year), suitable for the mt798x chip, where x refers to various processors under mt79, is the sqfs firmware for Redmi AX6000, used for UBOOT or system upgrade.

This article is synchronized and updated to xLog by Mix Space.
The original link is https://www.miaoer.xyz/posts/blog/format-openwrt


Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.