What's new

Custom firmware build for R7800 v. 1.0.2.63SF

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Unfortunately bufferbloat might happen somewhere on the way from your router to the target site. E.g. your modem. Not because of router...

Did not you try to limit the speed (QoS)?

https://www.snbforums.com/threads/c...r-r7800-v-1-0-2-22sf.37222/page-2#post-306969

Voxel.

After various tests my opinion is that the connection is better with the NG settings. (cubic and rmem_max / wmem_max set to 163840)
I have no results of bufferbloat A on the vdsl also testing it with the modem attached to the lan cable. The problem is not the router but the line.
With the algorithm yeah and higher buffer in some moments I had freeze and the cpu at 30% with few connections ..
With cubic and buffer set to 163840 I have the connection always stable without moments (even if very short) of freeze.
However, the best firmware is Voxel!
 
SSH is working. But see above: if you did not store your keys/authorized_keys etc. you have to setup this anew.

Voxel.

Thank you for the clarification Voxel. So I'm trying to setup SSH again using your README file (Appendix A) section. I'm able to telnet into the router and generate the SSH keys, however I'm having trouble copying them to my attached USB drive.

I have a Win10 machine running an Ubuntu VirtualBox VM and I formatted the USB stick as ext4. When I plug it into the router it doesn't automatically pop up as a drive in /mnt. I have to run partprobe at which point the drive shows up as /mnt/sdb1. I copy my SSH keys over to /mnt/sdb1 then detach the drive. When I plug the USB drive back into my Win10 machine it shows up in my Ubuntu VM with no files.

On the router, even after the USB stick has been removed /mnt/sdb1 is still there and I can manipulate files on that directory.

I know I'm probably doing something wrong here, but I'm stuck. As always, thank you for the help and for the great firmware!
 
I'm not home but I gave this answer to another user that got it working with backups of ssh a.o. :

https://www.myopenrouter.com/comment/41594#comment-41594
https://www.snbforums.com/threads/custom-firmware-build-for-r7800-v-1-0-2-60sf.48805/#post-430540

An example of scripts making a backup and restore, using a USB memory at sda1.
Create the files router_backup.sh and router_restore.sh on the USB memory,
with contents like these:
Code:
#!/bin/sh
#----------------------------------------------------------------------
# router_backup.sh
#----------------------------------------------------------------------
BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
/etc/profile
/etc/rc.local
/etc/dropbear
/etc/init.d/stubby
/etc/dnscrypt.conf
/etc/dnscrypt-proxy-2.toml
/etc/openvpn/config/client
/etc/dnsmasq.conf
/etc/*hosts
/etc/netwall*.conf
/opt/scripts/firewall-*start.sh
/root/.ssh/authorized_keys
"
cd /
X=$(echo "$BUP" | xargs)
tar -czhf ./${BACKUPFILE} ${X}
sync
Code:
#!/bin/sh
#----------------------------------------------------------------------
# router_restore.sh
#----------------------------------------------------------------------
BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
etc/profile
etc/rc.local
etc/dropbear
etc/init.d/stubby
etc/dnscrypt.conf
etc/dnscrypt-proxy-2.toml
etc/openvpn/config/client
etc/dnsmasq.conf
etc/netwall*.conf
opt/scripts/firewall-*start.sh
etc/hosts
root/.ssh/authorized_keys
"
cd /
tar --overwrite --warning=no-timestamp -xf ${BACKUPFILE} $BUP -C /

Then to make a backup, run:
Code:
/mnt/sda1/router_backup.sh
Then to restore a backup, run:
Code:
/mnt/sda1/router_restore.sh
#A reboot is needed after the restore is done

Thank you for the clarification Voxel. So I'm trying to setup SSH again using your README file (Appendix A) section. I'm able to telnet into the router and generate the SSH keys, however I'm having trouble copying them to my attached USB drive.

I have a Win10 machine running an Ubuntu VirtualBox VM and I formatted the USB stick as ext4. When I plug it into the router it doesn't automatically pop up as a drive in /mnt. I have to run partprobe at which point the drive shows up as /mnt/sdb1. I copy my SSH keys over to /mnt/sdb1 then detach the drive. When I plug the USB drive back into my Win10 machine it shows up in my Ubuntu VM with no files.

On the router, even after the USB stick has been removed /mnt/sdb1 is still there and I can manipulate files on that directory.

I know I'm probably doing something wrong here, but I'm stuck. As always, thank you for the help and for the great firmware!
 
Last edited:
Thank you for that script. I'll definitely make use of that.

Do you have any idea why I can't see the files on my USB drive when I plug it in to my Ubuntu VM?

The reason I ask is because I'm trying to transfer the SSH keys from the router to my Win10 machine so I can import it into pageant so I can SSH to my router.


I'm not home but I gave this answer to another user that got it working with backups of ssh a.o. :

https://www.myopenrouter.com/comment/41594#comment-41594

https://www.snbforums.com/threads/custom-firmware-build-for-r7800-v-1-0-2-60sf.48805/#post-430540

An example for when a USB memory is at sda1:
Code:
#----------------------------------------------------------------------
# Backup xxx
#----------------------------------------------------------------------

BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
/etc/dropbear
/etc/init.d/stubby
/etc/dnscrypt-proxy-2.toml
/etc/openvpn/config/client
/root/.ssh/authorized_keys
"
cd /
X=$(echo "$BUP" | xargs)
tar -czhf ./${BACKUPFILE} ${X}
sync


#----------------------------------------------------------------------
# Restore xxx
#----------------------------------------------------------------------
BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
etc/dropbear
etc/init.d/stubby
etc/dnscrypt-proxy-2.toml
etc/openvpn/config/client
root/.ssh/authorized_keys
"
cd /
tar --overwrite --warning=no-timestamp -xf ${BACKUPFILE} $BUP -C /
 
No idea.

But by using tar for backing up you can format the USB anyway, even as FAT!

Where and how did you format the USB as ext4?

Does the Kamoj addon correctly identify your USB drive?
(https://www.snbforums.com/threads/k...800-x4s-and-r9000-x10-temperatures-a-o.55063/)

Thank you for that script. I'll definitely make use of that.

Do you have any idea why I can't see the files on my USB drive when I plug it in to my Ubuntu VM?

The reason I ask is because I'm trying to transfer the SSH keys from the router to my Win10 machine so I can import it into pageant so I can SSH to my router.
 
I have an Ubuntu VM running on Virtual Box on Win10 machine to format the USB stick as ext4.

I haven't tried the Kamoj addon. I'll give it a try.

Also, should my USB drive be instantly mounted to /mnt when I plug it in to the router? I have always have to run partprobe to see the drive show up on my router.

No idea.

But by using tar for backing up you can format the USB anyway, even as FAT!

Where and how did you format the USB as ext4?

Does the Kamoj addon correctly identify your USB drive?
(https://www.snbforums.com/threads/k...800-x4s-and-r9000-x10-temperatures-a-o.55063/)
 
Try to check my readme re: how to format USB to ext4 with R7800 router. There is an option -O ^metadata_csum for using with kernel < 3.6.

Most probably you could use this option when formatting under your ubuntu.

P.S. I am out of kbd (abroad now). So just this short remark. And why don't you use my latest fw?
Voxel.
 
Again: HOW do you format the USB drive? Command line? Which command? Tools? Utilities? Have you tried ext3 e.g.?

How do you "see the drive show up on my router"? E.g.: \ls -al /mnt/sda1

If you are running Voxel 63SF it should auto mount. I have used his FW long time and with many USB sticks/drives and different formats.
Only problem is the 4 TB size limit.

I have an Ubuntu VM running on Virtual Box on Win10 machine to format the USB stick as ext4.

I haven't tried the Kamoj addon. I'll give it a try.

Also, should my USB drive be instantly mounted to /mnt when I plug it in to the router? I have always have to run partprobe to see the drive show up on my router.
 
Hi kamoj,

Seems that problem is that tlavarea used default mkfs.ext4 without any options under ubuntu. Since e2fsprogs 1.44.x it is necessary to use an option I pointed above to use resulting USB under R7800. Kernel version of R7800 is 3.4.103 i.e. it is < 3.6
 
ext4 problems:

mkfs.ext4 –L optware -O ^metadata_csum /dev/sda1

Uff... this is typed using the phone screen ;-(

Well, see you later. I am offline now.
 
Using the -O ^metadata_csum parameter worked. Thank you.

If I want to move to your latest firmware v64, do I need to do anything special beforehand other thank backing up files like kamoj suggested? Just a simple upgrade via the GUI?


ext4 problems:

mkfs.ext4 –L optware -O ^metadata_csum /dev/sda1

Uff... this is typed using the phone screen ;-(

Well, see you later. I am offline now.
 
Yes, it's not a big deal. No need to reset.
Try your 2 new scripts for backup and restore!
Good Luck!

Using the -O ^metadata_csum parameter worked. Thank you.

If I want to move to your latest firmware v64, do I need to do anything special beforehand other thank backing up files like kamoj suggested? Just a simple upgrade via the GUI?
 
With all of your help I think I have everything up and running. I installed your addon and I see the following messages on the debug page:

DNSCrypt v2 Servers DNSCrypt v2 is not running, but is enabled.
Stubby DNS Servers OK: v0.2.4. Servers ip4:1 (cloudflare-dns.com), ip6:1 (cloudflare-dns.com)

I assume Stubby is up and running correctly. I saw in another thread you recommended DNSCrypt over Stubby. Is that still true? If so, how do I go from Stubby back to DNSCrypt?


Yes, it's not a big deal. No need to reset.
Try your 2 new scripts for backup and restore!
Good Luck!
 
Don't know what size your USB drive is, but there's not much benefit to use ext4 vs. ext3 for a small thumbdrive to backup some settings, etc.
 
With all of your help I think I have everything up and running. I installed your addon and I see the following messages on the debug page:

DNSCrypt v2 Servers DNSCrypt v2 is not running, but is enabled.
Stubby DNS Servers OK: v0.2.4. Servers ip4:1 (cloudflare-dns.com), ip6:1 (cloudflare-dns.com)

I assume Stubby is up and running correctly. I saw in another thread you recommended DNSCrypt over Stubby. Is that still true? If so, how do I go from Stubby back to DNSCrypt?

To disable stubby run the commands from telnet/ssh console:
nvram set stubby=0
nvram commit

and reboot the router...

To enable DNSCrypt Proxy v.2 run the commands from telnet/ssh console:
nvram set dnscrypt2=1
nvram commit

and reboot your router;

to disable DNSCrypt Proxy v.2 run the commands from telnet/ssh console:
nvram set dnscrypt2=0
nvram commit

and reboot your router. Currently is is configured to use Cloudflare, ipredator, scaleway-fr, dnscrypt.eu-nl, dnscrypt.eu-dk. You may customize your config file /etc/dnscrypt-proxy-2.toml to add/remove your selected servers.

(thats not my brainy knowledge, its all from the man himself, cheers voxel)
 
Thank you. Can any one comment on whether one is better than the other?

To disable stubby run the commands from telnet/ssh console:
nvram set stubby=0
nvram commit

and reboot the router...

To enable DNSCrypt Proxy v.2 run the commands from telnet/ssh console:
nvram set dnscrypt2=1
nvram commit

and reboot your router;

to disable DNSCrypt Proxy v.2 run the commands from telnet/ssh console:
nvram set dnscrypt2=0
nvram commit

and reboot your router. Currently is is configured to use Cloudflare, ipredator, scaleway-fr, dnscrypt.eu-nl, dnscrypt.eu-dk. You may customize your config file /etc/dnscrypt-proxy-2.toml to add/remove your selected servers.

(thats not my brainy knowledge, its all from the man himself, cheers voxel)
 
Thank you. Can any one comment on whether one is better than the other?

I've been using OpenDNS for years as a way to block spam and harmful sites though DNS. OpenDNS only supports Dnscrypt, so that's what I use. You can block sites that way, too.
 
I'm not home but I gave this answer to another user that got it working with backups of ssh a.o. :

https://www.myopenrouter.com/comment/41594#comment-41594
https://www.snbforums.com/threads/custom-firmware-build-for-r7800-v-1-0-2-60sf.48805/#post-430540

An example of scripts making a backup and restore, using a USB memory at sda1.
Create the files router_backup.sh and router_restore.sh on the USB memory,
with contents like these:
Code:
#!/bin/sh
#----------------------------------------------------------------------
# router_backup.sh
#----------------------------------------------------------------------
BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
/etc/profile
/etc/rc.local
/etc/dropbear
/etc/init.d/stubby
/etc/dnscrypt.conf
/etc/dnscrypt-proxy-2.toml
/etc/openvpn/config/client
/etc/dnsmasq.conf
/etc/*hosts
/etc/netwall*.conf
/opt/scripts/firewall-*start.sh
/root/.ssh/authorized_keys
"
cd /
X=$(echo "$BUP" | xargs)
tar -czhf ./${BACKUPFILE} ${X}
sync
Code:
#!/bin/sh
#----------------------------------------------------------------------
# router_restore.sh
#----------------------------------------------------------------------
BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
etc/profile
etc/rc.local
etc/dropbear
etc/init.d/stubby
etc/dnscrypt.conf
etc/dnscrypt-proxy-2.toml
etc/openvpn/config/client
etc/dnsmasq.conf
etc/netwall*.conf
opt/scripts/firewall-*start.sh
etc/hosts
root/.ssh/authorized_keys
"
cd /
tar --overwrite --warning=no-timestamp -xf ${BACKUPFILE} $BUP -C /

Then to make a backup, run:
Code:
/mnt/sda1/router_backup.sh
Then to restore a backup, run:
Code:
/mnt/sda1/router_restore.sh
#A reboot is needed after the restore is done

/mnt/sdb1/router_backup.sh
tar: Removing leading `/' from member names
tar: Removing leading `/' from hard link targets
tar: .//mnt/sda1/R7800backup.tar.gz: Cannot open: Read-only file system
tar: Error is not recoverable: exiting now
tar: .//mnt/sda1/R7800backup.tar.gz: Cannot write: Broken pipe
tar: Child returned status 2
tar: Error is not recoverable: exiting now

What's a problem?
 
You have more than one USB device mounted, or have had since boot, since you run commands from sdb1 instead of sda1.
(Or you change command to use sdb1)
/mnt/sdb1/router_backup.sh
tar: Removing leading `/' from member names
tar: Removing leading `/' from hard link targets
tar: .//mnt/sda1/R7800backup.tar.gz: Cannot open: Read-only file system
tar: Error is not recoverable: exiting now
tar: .//mnt/sda1/R7800backup.tar.gz: Cannot write: Broken pipe
tar: Child returned status 2
tar: Error is not recoverable: exiting now

What's a problem?
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top