Cannot install Tailscale due to Low Disk Space (ELECOM WRC-2533GS2V-B)

TLDR: OpenWrt is giving me only <4MB usable disk space on a 32MB flash chip

Hi forum, I am in Japan and looking for a <5000Yen option to set up a tailscale server in the local office, and got adventurous and purchased an ELECOM WRC-2533GS2V-B (B for Black). I set it up with OpenWrt and tried to install tailscale, only to see this error message:

Collected errors:
 * verify_pkg_installable: Only have 3480kb available on filesystem /overlay, pkg tailscale needs 25470
 * opkg_install_cmd: Cannot install package tailscale.

I installed using the WRC-2533GS2 firmware. According to datapage WRC-2533GS2 has "Flash MB: 16". Here is cat /proc/mtd result

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 00b00000 00010000 "firmware"
mtd4: 003089f6 00010000 "kernel"
mtd5: 007f760a 00010000 "rootfs"
mtd6: 003b0000 00010000 "rootfs_data"
mtd7: 00380000 00010000 "tm_pattern"
mtd8: 00080000 00010000 "tm_key"
mtd9: 00030000 00010000 "nvram"
mtd10: 00080000 00010000 "user_data"

cat /proc/mtd seems to show a total of 30MiB (~32MB) flash memory available. That would be 2 times the documented 16MB for WRC-2533GS2, and may be what the "V" means.

But if there are total 32MB available, even if OpenWrt takes up some space, if 16MB is supported, that should leave me with 16MB at least, right?

Any help is appreciated.

Error message suggest you'd need at least 25 ?

Thats assuming you boot OpenWrt from floppy disk? It takes 6-7MB for kernel and basic squashfs root. Probably you can add tailscale to imagebuilder/firmware selector and re-compressed package fits 20-some MB space you got.

Thank you for the advice! I downloaded the firmwared I used from Table of Hardware. Let me try using the customization feature in the firmware selector.

I could not generate the firmware. The firmware selector gave the following error:

Pseudo file "dev" exists in source filesystem "/builder/build_dir/target-mipsel_24kc_musl/root-ramips/dev".
Ignoring, exclude it (-e/-ef) to override.
6217+1 records in
6217+1 records out
3183312 bytes (3.2 MB, 3.0 MiB) copied, 0.00746991 s, 426 MB/s
21347+1 records in
21347+1 records out
10929996 bytes (11 MB, 10 MiB) copied, 0.025122 s, 435 MB/s
padding image to 00d80000
    WARNING: Image file /builder/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-24.10.1-a6ee4e000ebf-ramips-mt7621-elecom_wrc-2533gs2-squashfs-sysupgrade.bin is too big: 14155780 > 11534336
Failed to open firmware file
sha256sum: /builder/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-24.10.1-a6ee4e000ebf-ramips-mt7621-elecom_wrc-2533gs2-squashfs-sysupgrade.bin: No such file or directory
cp: cannot stat '/builder/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-24.10.1-a6ee4e000ebf-ramips-mt7621-elecom_wrc-2533gs2-squashfs-sysupgrade.bin': No such file or directory

Notably:

    WARNING: Image file ...elecom_wrc-2533gs2-squashfs-sysupgrade.bin is too big: 14155780 > 11534336

14155780 is 13.5MiB.
11534336 is 11MiB exactly.

It seems that the original wrc-2533gs2 image is set to be contained within 11MiB to leave about 4MB of usable space on the 16MB flash. This might explain why I also get about 4MB of usable space, but it's only a guess. This is wrong per musashino's reply.

I am a bit scared to start changing the partitions without a proper understanding and plan.

@musashino Please excuse me for the ping. I read your blog article (in Japanese) about wrc-2533gs2. What do you think might help here?

You can n{t have tailscale on this router - ok?

WRC-2533GS2(V) has a 16MiB flash storage and only 11MiB is available for OpenWrt. So the tailscale package (> 20MiB) larger than it cannot be installed.

mtd0: 00030000 00010000 "u-boot"
 + mtd1: 00010000 00010000 "u-boot-env"
 + mtd2: 00010000 00010000 "factory"
 + mtd3: 00b00000 00010000 "firmware"
 + mtd7: 00380000 00010000 "tm_pattern"
 + mtd8: 00080000 00010000 "tm_key"
 + mtd9: 00030000 00010000 "nvram"
 + mtd10: 00080000 00010000 "user_data"
 = 0x1000000 (16MiB)

kernel and rootfs is splitted from firmware and rootfs_data is splitted from rootfs.

1 Like

Thank you so much for your knowledge.

UPDATE: The new plan succeeded in restoring the device back to vendor firmware.

May I also ask you to check my plan for restoring WRC-2533GS2 to vendor firmware? I have downloaded the firmware from the official source.

Per your instruction in the blog article, I need to remove the first 32 bytes and then write to the firmware partition with mtd.

The new plan:

dd if=WRC-2533GS2_v1.69.bin of=WRC-2533GS2_v1.69_modified.bin bs=32 skip=1
# start a webserver serving the modified bin
# open a new terminal window
ssh root@192.168.1.1
cd /tmp/tmp
wget http://192.168.1.184:9800/WRC-2533GS2_v1.69_modified.bin
mtd -r write WRC-2533GS2_v1.69_modified.bin firmware

scp in the old plan does not work due to lack of sftp in OpenWrt.

The old plan:

dd if=WRC-2533GS2_v1.69.bin of=WRC-2533GS2_v1.69_modified.bin bs=32 skip=1
scp WRC-2533GS2_v1.69_modified.bin root@192.168.1.1:/tmp/
ssh root@192.168.1.1
mtd -r write /tmp/WRC-2533GS2_v1.69_modified.bin firmware

The first part of WRC-2533GS2_v1.69.bin shows:

hexdump -C WRC-2533GS2_v1.69.bin | head
00000000  45 4c 45 43 4f 4d 20 57  52 43 2d 32 35 33 33 47  |ELECOM WRC-2533G|
00000010  53 32 20 76 31 2e 36 39  00 00 00 00 00 00 00 00  |S2 v1.69........|
00000020  27 05 19 56 81 d7 83 39  66 42 be 67 00 99 ff c0  |'..V...9fB.g....|
00000030  81 00 10 00 81 62 ee 90  a4 5a 3e 72 05 05 02 03  |.....b...Z>r....|
00000040  4d 49 50 53 20 4f 70 65  6e 57 72 74 20 4c 69 6e  |MIPS OpenWrt Lin|
00000050  75 78 2d 33 2e 31 30 00  00 00 00 00 00 00 00 00  |ux-3.10.........|
00000060  6d 00 00 80 00 c0 9a 8a  00 00 00 00 00 00 00 6f  |m..............o|
00000070  fd ff ff a3 b7 7f c1 ab  75 bf af e6 d1 81 bb e8  |........u.......|
00000080  df a0 5d e3 24 ae e6 66  d3 12 14 7c 77 09 9b a7  |..].$..f...|w...|
00000090  da 1c df f5 00 ed 60 3a  1f 0f b3 7f df 82 d3 e9  |......`:........|

Noticing that the official firmware also uses OpenWrt under the hood is kinda cool.

Looks good. You can use the -O option to use the legacy scp protocol for scp command instead of the sftp protocol.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.