Note: While issuing the SCP commands detailed bellow, you might encounter errors related to option -O
not being recongnized. In such a case, simply leave out the -O
option from all SCP commnands.
This happens if you are using an SCP version older than 8.7 (use ssh -V
to check your version). The option is required on recent SCP versions due to deprecation of the old SCP/RCP protocol.
More details here.
enable-ssh-template.txt
and paste your public RSA SSH key where indicated in the file.ENTER
to access a root console.enable-ssh-template.txt
into the console to enable SSH access.ssh root@192.168.1.1 "cat /proc/version"
Linux version 3.14.43 (mark@sercomm-QCA-Server) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.01 r1121) ) #1 SMP PREEMPT Thu Mar 1 14:52:59 CST 2018
ssh root@192.168.1.1 sh <check-svn1418.sh
This script checks the current state of your router in depth.
If all checks pass, you are good to go on installing OpenWrt.
The router USB port should be empty when running this script.
checking /proc/cmdline checking /etc/svn.info checking /etc/openwrt_release checking /proc/version checking /proc/mtd checking /proc/mounts checking /proc/bus/pci/devices checking fw_printenv checking dmesg-ubi-attached checking dmesg-ubifs-mounted checking ubi0_0-kernel checking ubi0_1-ubi_rootfs checking ubi0_2-rootfs_data
WARNING: Do not proceed installing OpenWrt if any errors were output! Save the output and seek help in the forums instead.
- Do not proceed if errors are shown in the ouput!
### Backup the stock firmware
1. Create and transfer backups of all MTD partitions:
ssh root@192.168.1.1 sh <mtd-backup.sh scp -O root@192.168.1.1:/tmp/lanchon/mtd-backup.tar . ssh root@192.168.1.1 "rm /tmp/lanchon/mtd-backup.tar"
2. Create and transfer backups of all UBI volumes:
ssh root@192.168.1.1 sh <ubi-backup.sh scp -O root@192.168.1.1:/tmp/lanchon/ubi-backup.tar . ssh root@192.168.1.1 "rm /tmp/lanchon/ubi-backup.tar"
- You might need these backups down the road, so store them.
### Install OpenWrt
Make sure you have backups of the stock firmware (see previous section); each device is different.
1. Install the initramfs recovery image:
scp -O openwrt-[...]-arris_tr4400-v2-initramfs-uImage root@192.168.1.1:/tmp/recovery.bin ssh root@192.168.1.1 sh <install-recovery.sh
2. Sysupgrade to the squashfs image:
- Reboot router and connect to http://192.168.1.1/cgi-bin/luci/admin/system/flash.
- Click on `Flash image...` and choose the squashfs image.
3. Reconnect to http://192.168.1.1/ and profit!
### Update the recovery image
There is usually no reason to upgrade the recovery image. This is provided for completeness.
1. [Download](https://firmware-selector.openwrt.org/?target=ipq806x%2Fgeneric&id=arris_tr4400-v2) the OpenWrt initramfs (kernel) image for this router.
2. Pop up a terminal and write the recovery image (replace 192.168.1.1 with the address of your router):
scp -O openwrt-[...]-arris_tr4400-v2-initramfs-uImage root@192.168.1.1:/tmp/recovery.bin ssh root@192.168.1.1 'ubiupdatevol /dev/ubi0_9 /tmp/recovery.bin && rm /tmp/recovery.bin'