When we upgrade ubnt
when the file system to make some changes before the router, we downloaded the firmware is often the tar
file, which is actually a package, can be used directly zip open, open real firmware where the file is squashfs.tmp
, this document is the real The firmware is in squashfs format. If we want to modify the firmware, we need to decompress the squashfs file first, then package it, and then flash the machine.
To EdgeRouter ER-X/ER-X-SFP/EP-R6: 固件 v1.10.11
an example
tar -xvf ER-e50.v1.10.11.5274269.tar
unsquashfs squashfs.tmp
At this time, a squashfs-root
folder will appear next to the directory at the same level , which is the uncompressed file. If you want to change anything, you can change it here. For more options, enter unsquashfs --help
Repack after modification.
mksquashfs squashfs-root/ squashfs.tmp
md5sum squashfs.tmp >squashfs.tmp.md5
Finally squashfs.tmp
and squashfs.tmp.md5
replace the original tar package will be the same name as the file is complete modified image.