OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

NO.1
OpenWrt Firmware

Firmware posts online

https://www.right.com.cn/forum/thread-8250453-1-1.html

Corresponding GitHub address

https://github.com/sirpdboy/openwrt/tree/master

The free firmware address provided by Enshan Sirpdboy in the Readme (search page 123 cloud disk keywords can be used)

The firmware used in this article is the one in the red box in the image below (R2S)

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

After downloading, unzip the zip firmware

Get the following file

openwrt-rockchip-armv8-friendlyarm_nanopi-r2s-squashfs-sysupgrade.img.gz

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

NO.2
Flash the firmware

Prerequisites

Software: balenaEtcher (Download link:https://etcher.balena.io/)

Hardware: TF card (128GB) (with corresponding USB card reader)

After installing balenaEtcher, open the software, insert the card reader to read the TF card

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Select the firmware

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Select the disk

Note that this must be particularly noted, carefully check the selected disk size, confirm it matches the TF card size

Avoid selecting other USB drives or the local disk, which may format the computer’s own system

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Click Flash to start flashing the firmware to the TF card

On Mac, you need to enter the password

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Wait for the flashing to complete

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

After successful input, you will see a prompt indicating it cannot be recognized

Click ignore or exit (it is recommended to click exit on Mac)

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

This is the completed interface

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

NO.3
Boot the system

Insert the TF card into R2S, then insert the power line and turn on the power

At this time, it is recommended not to insert the network cable into the R2S’s Wlan and Lan ports to avoid interfering with other routers

Wait for the system red light to stabilize, indicating that the system has successfully run

Note

This article directly connects R2S Lan (local area network) to the computer’s network cable, but it is found that the network cannot be recognized

However, if you connect the R2S Lan (local area network) network cable to a dynamically configured router, and then connect the computer to the router’s wifi, you can access openWrt normally

So the firmware itself is not a problem, but to conduct tests and settings, you need to prepare a router in advance

If your Lan and computer network cable can connect and recognize normally, then the above precautions can be skipped

The default management backend address of this firmware is:http://192.168.8.1

Default account: root Default no password

Access the management backend

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Click to log in

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

At this time, you can insert the network cable from the already set router with internet into the R2S’s Wlan port, so R2S will have internet (if no internet is needed, you can skip this)

NO.4
Firmware Expansion

The intention was to separate the installation firmware and firmware expansion into two articles

However, since expansion is a high-risk operation that bricks the TF firmware system once it fails, and each failure requires re-flashing the firmware, both are combined (for convenience in installing firmware and expanding firmware at once)

It is not recommended to expand the firmware that has been used for a period of time or has many configurations set. If there is no need for docker, it is recommended to maintain the current state

If you must expand, remember to back up the currently running firmware in advance (for easy data recovery)

Reference address for expansion documentation (this address may become invalid at any time and is only a reference)

https://doc.openwrt.cc/1-General/6-Resize/

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Click the menu, system -> software packages, and check the free space of the system

You can see that there is only a little over 600M (but the TF card itself has 128GB of memory)

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Click the menu, system -> disk management

Find the TF card device (generally /dev/mmcblk0), click the corresponding modification on the right side

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

You can see that there is about 118GB of free disk space

Click the corresponding new button

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

You can see that it has been formatted to ext4 format

If it has not been formatted, a format button will be displayed, click the corresponding format

In the pop-up box, select ext4 format and format

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Enter the openWrt ssh terminal

Click the menu, system -> TTYD terminal

Enter the username and password (such as root and the management backend login password you set yourself)

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

After successfully logging into ssh

This author’s firmware will pop up a bunch of options

Enter 0, press Enter to exit the options

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Check the current partition

You can see that we have a partition /dev/mmcblk0p3 with 109GB

df -h

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Perform file migration operations

Mount the /dev/mmcblk0p3 partition to /mnt

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Check the partition again

You can see that /dev/mmcblk0p3 has been mounted to /mnt

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Copy all files under the /overlay partition to the newly established partition

cp -f -a /overlay/. /mnt

Check if the copy was successful

ls -a /mnt

And

ls -a /overlay

As shown in the figure below, it should be successful

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Click the menu, system -> mount points

Click generate configuration

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

After the page automatically refreshes

In the mount point page under the mount point menu, you can see the /dev/mmcblk0p3 this ext4 partition identifier

Click the corresponding modification button

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Here I select to use it as the root file system /

And be sure to save the command prompt below in time, as it will be used later

Click save and apply

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

Backup the command prompt

mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/sda1 /tmp/extroot
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot

After the page saves and applies and automatically refreshes the page

After entering ssh, execute the following commands one by one

Note that the sda1 above should be replaced with the actual mmcblk0p3

mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/mmcblk0p3 /tmp/extroot
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot

Confirm again that the mount point /dev/mmcblk0p3 is checked and the mount point is /

Then scroll to the bottom of the page

Click save and apply again

Then restart openWrt

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

It is recommended to use ssh, use the command reboot to restart

After rebooting, try to access the management backend page again

Successfully entered, and then click the menu, system -> software packages, check that the free space is 115GB (indicating that the expansion was successful)

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

If……

If after rebooting, you cannot enter the management backend, it is likely that the settings failed, and the system is bricked, requiring re-flashing the firmware to the TF card

Retry all the steps above, ensuring that each step is correct, or adjust according to your own hardware or firmware (this article is for reference only)

This firmware comes with a partition expansion plugin, which I have tried N times, and it has failed

The author has the intention to install this plugin, but in practice, it does not achieve the desired effect

In the image below, the overlay software space and docker data volume (the same modification used above, just change / to the corresponding overlay directory) can be tried more

OpenWrt Soft Router (NanoPi For NAS All In One R2S): Firmware Installation and Expansion (Squashfs)

NO.5
Tips

Notes

If the network speed is only below 500M, you might consider getting R2S (but its memory is only 1G, which is basically insufficient for running any Docker services, and most of the performance is just enough for soft routing)

If you need gigabit speed, then you can consider R4S, etc. (with 4G memory, in addition to soft routing functions, you can also consider Docker and other applications)

Although R2S has low performance, it can be used as an All In One, but it cannot have video hardware decoding and cannot install large content applications, but it can still be tried for deploying some PT resource downloads, static web pages, or lightweight automation scripts

In the future, I will try them one by one, after all, the price of R2S is about 200 yuan, R4S is about 500 yuan, and R6S is about 1000 yuan

At around 200, as an entry-level model, if you have time to tinker and don’t have many needs, you can consider trying

END.

Recommended reading

<<OpenWrt Soft Router (NanoPi For NAS All In One R4S): Setting SSH and Docker Compose>>

<<OpenWrt Soft Router (NanoPi For NAS All In One R4S): Portainer Container Management Platform>>

Leave a Comment