Is anyone running official openwrt or anaelorlinski build on R4s 4GB version on the onboard 8GB emmc rather than from SD card??...if so, what's the procedure??
R4S doesn't have eMMC. I believe no version of R4S* has 8gb eMMC. R4SE has 32gb eMMC.
Hi..yes, your correct...was convinced it did but just checked again
So it does !!....how to install on emmc then??
You seem to interpret the word "no" differently than the world around you…
he’s making the same error as me, the one with the eMMC is the R4SE, see here: https://www.cnx-software.com/2022/07/24/nanopi-r4se-dual-gigabit-ethernet-router-32gb-emmc-flash/.
By the way mine is arrived, I’m starting to configure it while I'm using the r7800 as main/WAN router:
...but about the DSA VS swconfig, on the OpenWRT VLAN wiki I just read:
Newer devices with embedded switches (like Netgear R7800) use the DSA switch driver,
Now I’m a bit confused about your post so the DSA migration is ready but not in use? And why the wiki says the R7800 uses it?
Yes, sorry...my fault, didn't read word 'no' before flash emmc
Nice photo. Like what others said above, although many targets use DSA now, the R7800 still uses swconfig.
Ah okay thanks, ideed the layout/names of the interfaces are different, but I don't know why the wiki says the R7800 use the DSA.
I'm starting to have (stupid) issue, I've installed the ext4 image, configured the newtork, installed LuCi, etc... then I updated it from LuCi with the squashfs.
Now I want to exapand the filesystem to use the 32Gb microSD but I don't understand what to do here, following the wiki:
root@OpenWrt:~# losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC
/dev/loop0 0 3014656 1 0 /mmcblk1p2 0 512
root@OpenWrt:~# losetup -d -o 3014656 /dev/loop0 mmcblk1p2
losetup: -o: failed to use device: No such device
root@OpenWrt:~# losetup -d -o 3014656 /dev/loop0 /dev/mmcblk1p2
losetup: -o: failed to use device: No such device
root@OpenWrt:~# losetup -d -o 3014656 /dev/loop0 /dev/sde2
losetup: -o: failed to use device: No such device
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 3.0M 3.0M 0 100% /rom
tmpfs 1.9G 1.2M 1.9G 0% /tmp
/dev/loop0 99.1M 64.8M 34.3M 65% /overlay
overlayfs:/overlay 99.1M 64.8M 34.3M 65% /
tmpfs 512.0K 0 512.0K 0% /dev
Surely a stupid issue, I've never used losetup, but what is the correct name of the "device"?
Edit: oh, I’ve found this discussion, glad I’m not the only one with this issue I’ll try to expand the file system before the first boot (and I’ll make again all the installation process).
After an hour of work I've finally done it, probably was long time since I don't use linux, and unfortunately I have only Macs, so I can't use GUI apps like Gparted, but I had to mount the microSD into my other OpenWrt router, resize the partition from there using fdisk
, then boot the R4S, then expand the filesystem using tune2fs and resize2fs.
before
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 65536 98303 32768 16M 83 Linux
/dev/sdb2 131072 344063 212992 104M 83 Linux
after
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 65536 98303 32768 16M 83 Linux
/dev/sdb2 131072 62333951 62202880 29.7G 83 Linux
PS: every time I re-write the microSD and I boot again I have to edit the /etc/config/network in order to add the default gateway and DNS, after I have to reboot the R4S because if I only reload the network it can ping but it can't solve the DNS and I can't use opkg to install packages.
Finally
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 29.3G 11.4M 29.3G 0% /
tmpfs 1.9G 76.0K 1.9G 0% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
An easy thing like this takes hours if you don't have a linux machine. I hope the wiki for the squashfs will be fixed/corrected.
Now I'm scared to upgrade to the squashfs is it safe to upgrade with the Sysupgrade Squashfs image before doing other things? The Squashfs filesystem is more appropriate for the micrSD for what I'm reading, and -most important- after the upgrade, the /root will not "shrink" again to 100mb?! Right?
Wrong I'm back with 100MB root partition. I have to do all again, I think I have to understand well what's the difference from ext4, squashfs and how they work. Sorry for annoying, I'll post into the Installing and Using OpenWrt forum.
Have you tried following the reply to earlier question here?
What the f... this worked for the squashfs in few minutes! Easy and functionally. Thanks a lot for it. (This tip should be absolutely included in the wiki in my opinion)
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 3.0M 3.0M 0 100% /rom
tmpfs 1.9G 1.2M 1.9G 0% /tmp
/dev/loop0 29.7G 915.2M 28.8G 3% /overlay
overlayfs:/overlay 29.7G 915.2M 28.8G 3% /
tmpfs 512.0K 0 512.0K 0% /dev
I know you said you cant use Gparted, but why not just create a ubuntu usb, boot fromm USB then click try ubuntu, and open gparted.
Ive booted ubuntu from mac mini
Yes yes, I can but to me seems to be a bit overkill run a complete new OS only to resize a partition! Probably this would have took me less time, but in the end I solved the issue and I learned new things that can be useful in the future.
Homebrew ( https://brew.sh/ ) is a package manager for Macs that has a lot of open source apps, with many of the useful utilities found on *nix systems ported to the mac. I use gdisk from there to manage GPT partition tables on sd cards. MacPorts ( https://www.macports.org/ ) is another source but I haven't used that one.
I have installed Homebrew and I'm using it often, I hadn't thought about it, thanks for the suggestion, what tool did you used to write the squashfs fs on macOS?
I'm not sure that I understand your question but I imaged my sd card for the initial installation with squashfs OpenWrt for my R4S with the dd command. I did not extend the f2fs for /overlay. I did one ota upgrade so far with Luci. My usage of gdisk on sd cards was for other linux purposes.
Okay, because if you need to do it (as I did) or you follow the tutorial linked above and you expand it directly from OpenWrt, or you have to install “ *something” to write squashfs on macOS. *I don’t know which free tools allow it (Or you can use Linux as suggested). This was my issue.
But in the end I managed it straight on OpenWrt.