Hello.
I have two Beeline SmartBox TURBO+ routers with OpenWRT firmware.
Details
root@OpenWrt:~# cat /etc/os-release
NAME="OpenWrt"
VERSION="23.05.4"
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 4.3M 4.3M 0 100% /rom
tmpfs 58.8M 364.0K 58.5M 1% /tmp
/dev/ubi0_1 63.6M 11.9M 48.4M 20% /overlay
overlayfs:/overlay 63.6M 11.9M 48.4M 20% /
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00100000 00020000 "dynamic partition map"
mtd2: 00100000 00020000 "Factory"
mtd3: 00100000 00020000 "Boot Flag"
mtd4: 00600000 00020000 "kernel"
mtd5: 00600000 00020000 "Kernel 2"
mtd6: 02000000 00020000 "File System 1"
mtd7: 02000000 00020000 "File System 2"
mtd8: 01400000 00020000 "Configuration/log"
mtd9: 01b80000 00020000 "application tmp buffer (Ftool)"
mtd10: 04f80000 00020000 "ubi"
root@OpenWrt:~# hexdump -Cn 8 /dev/mtd3
00000000 53 65 72 63 6f 6d 6d 30 |Sercomm0|
00000008
One is working for its intended purpose, the second one I want to use as a backup and test.
The question is how to properly organize their cloning?
After reading some information, I came to this conclusion: on router_1, I can backup the necessary mtd partitions via the WEB or dd if=/dev/mtd(X) of=/tmp/mtd(X).backup
Transfer this to router_2 and restore it there as follows (Using the example of the "File System 1" section):
#packages required for writing to mtd
opkg update
opkg install kmod-mtd-rwarea
#Unlocking a partition
insmod mtd-rw i_want_a_brick=1
mtd unlock "File System 1"
#Writing
mtd write /tmp/mtd6.backup "File System 1" partition
reboot
If the method is correct, can you tell me which partitions I need to transfer in order to get a complete copy of the system from one router to another? Sections mtd0-3 do not need to be touched, as I understand it, is it enough to copy mtd 4, 6, 8 or better all 4-10? What is the ubi section?
Thanks