What's new

Asuswrt-Merlin 378.51 is out

  • 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!

I don't think that will work.

Given there aren't any user space utilities I'm guessing the kernel is expected to do this but it looks like the kernel code won't touch anything that looks corrupt so I think it has to be corrected manually.

However, it also looks like (although I'm not sure) the kernel will be happy to do it if it looks like it's been erased, whether that's all F's or all 0's I'm not sure, and I don't know if the mtd-erase2 leaves block headers in place and erases the block contents, again a user space manual file system create might help.

Or maybe a dd of a copy of an empty jffs2 partition, ;)

It's not done by any userspace tool, it's done by the rc daemon using lowlevel system calls. Same way it has always done, regardless of the state of the JFFS partition.
 
I just updated from an RT-N16 to a 87R. installed the .51 here. Router is great but one issue is the DLNA media server stops responding after a bit. If I reboot or toggle DLNA off and back on it comes back up. Any suggestions?
Forgot to add I put Entware-Arm on and Debian with transmission.

Either running out of RAM (running all of this on a router with 256 MB of RAM is asking a bit too much), or minidlna is running into a corrupted media file causing it to crash.
Hi,

I am already fighting a possible memory shortage with Transmission alone (see this thread) - so you need to makeup your mind which applications you want to run on the (small) router... :rolleyes:

With kind regards
Joe :cool:
 
Last edited:
It's not done by any userspace tool, it's done by the rc daemon using lowlevel system calls. Same way it has always done, regardless of the state of the JFFS partition.

Not sure about the rc daemon, but making the recommended nvram settings doesn't work, as I suspected.
OTOH, the rc command (aka. /sbin/rc) won't allow the brcmnand partition to be erased.
Changing it to allow an erase of that partition and then erasing it does work.

Would you be willing to make this change or are you concerned about people complaining about losing their jffs contents by accident?
 
OTOH, the rc command (aka. /sbin/rc) won't allow the brcmnand partition to be erased.
Changing it to allow an erase of that partition and then erasing it does work.

That is of course when the rc command is executed via its mtd-erase2 symlink.
 
The 378_xxxx codebase isn't fully compatible with the older MIPS routers at this time. A lot of things related to the firewall are flat out broken, especially when IPv6 is enabled. That would explain why Asus is still releasing firmwares in the 376_xxxx code branch for the RT-N66/RTAC66.

So for now, keyword filtering and parental control are broken on the N66 and AC66, and there's no simple solution in sight.

EDIT: parental control was actually broken even before the switch to 378, as it's also failing to apply the firewall rules in 376.49.

EDIT2: This is also still broken in Asus's 376_3861 own FW, so the problem isn't with my code. I sent a bug report to Asus so hopefully they can eventually resolve it.
Gotcha. Didn't think it was a problem with your code. Just wanted to ensure that the problem was documented. Thanks for the feedback Merlin.
 
Not sure about the rc daemon, but making the recommended nvram settings doesn't work, as I suspected.
OTOH, the rc command (aka. /sbin/rc) won't allow the brcmnand partition to be erased.
Changing it to allow an erase of that partition and then erasing it does work.

Would you be willing to make this change or are you concerned about people complaining about losing their jffs contents by accident?

Where do you see it specifically rejects erasing the JFFS2 partition? The option to erase it at boot time has been there for years - that it never worked at all would be news to me.
 
Where do you see it specifically rejects erasing the JFFS2 partition? The option to erase it at boot time has been there for years - that it never worked at all would be news to me.

Ok, as you wish, I'll track the system calls the rc program uses and verify where in the kernel this happens, then describe where to look.

That's going to take a while though.
 
postconf script not working

When I try to use "smb.postconf" that don't work, when I using "pc_replace". an agument missing in "helper.sh" file.

Command '"./smb.postconf"'
failed with return code 1 and error message
sed: -i requires an argument.

=========== helper.sh ===========
#!/bin/sh

# Asuswrt-Merlin helper functions
# For use with Postconf scripts (and others)

_quote() {
echo $1 | sed 's/[]\/()$*.^|[]/\\&/g'
}

# This function looks for a string, and inserts a specified string after it inside a given file
# $1: the line to locate, $2: the line to insert, $3: Config file where to insert
pc_insert() {
PATTERN=$(_quote "$1")
CONTENT=$(_quote "$2")
sed -i "/$PATTERN/a$CONTENT" $3
}

# This function looks for a string, and replace it with a different string inside a given file
# $1: the line to locate, $2: the line to replace with, $3: Config file where to insert
pc_replace() {
PATTERN=$(_quote "$1")
CONTENT=$(_quote "$2")
sed -i "s/$PATTERN/$CONTENT/" $3
}

# This function will append a given string at the end of a given file
# $1 The line to append at the end, $2: Config file where to append
pc_append() {
echo "$1" >> $2
}

EDIT: I believe that "a" has crept into the helper.sh script

Octopus
 
Last edited:
Where do you see it specifically rejects erasing the JFFS2 partition? The option to erase it at boot time has been there for years - that it never worked at all would be news to me.

Btw, I don't see any option to erase the jffs, only one to reformat it which I believe is not the same, and the evidence I'm seeing indicates that to be the case.
 
Either running out of RAM (running all of this on a router with 256 MB of RAM is asking a bit too much), or minidlna is running into a corrupted media file causing it to crash.
So the new AC87R doesn't have enough memory? Wow.... maybe I should have gone with something else. What would you suggest? I thought I was making a major upgrade. I was having issues with the RT-16N and you were stopping support so I moved on.

I ran transmission on my 16N with the media server for a long time. transmission would sometimes crash but could manually start it up again without a problem. And I did all that without a swap file.
 
Last edited:
Under tools=> sysinfo => Network=> Wireless clients (5 GHz) and guest 5Ghz not showing connected clients,
regular are showed just fine, work fine under systemlog => wirelesslog.
 
Btw, I don't see any option to erase the jffs, only one to reformat it which I believe is not the same.

It's the same. That option does an mtd_erase on the partition. The code is in rc/jffs.c.
 
So the new AC87R doesn't have enough memory? Wow.... maybe I should have gone with something else. What would you suggest? I thought I was making a major upgrade. I was having issues with the RT-16N and you were stopping support so I moved on.

I ran transmission on my 16N with the media server for a long time. transmission would sometimes crash but could manually start it up again without a problem. And I did all that without a swap file.

I haven't seen any router with more than 256 MB of RAM yet, as it's more than enough to do what the router is intended to do (routing).

If you want to start using it as a DLNA server AND a torrent client in a reliable way, you'll have to get a swap file set up.

Personally, I don't recommend using a router for torrenting. Torrents are very intensive I/O wise, so it's easy to overload the limited resources of a router (both RAM and disk I/O wise).
 
Under tools=> sysinfo => Network=> Wireless clients (5 GHz) and guest 5Ghz not showing connected clients,
regular are showed just fine, work fine under systemlog => wirelesslog.

It's a known limitation. Would be possible to get around it by also polling all virtual interfaces, but it involves a fair amount of work and it's not really a priority at this time. Too much to do already for one single developer, sorry.
 
postconf script not working

When I try to use "smb.postconf" that don't work, when I using "pc_replace". an agument missing in "helper.sh" file.

Post your script. The helper script and postconf functionality are both working, most likely it's the string you are using in your pc_replace() call that's not being escaped properly.
 
It's a known limitation. Would be possible to get around it by also polling all virtual interfaces, but it involves a fair amount of work and it's not really a priority at this time. Too much to do already for one single developer, sorry.
Okay, I remember it now, you've said it. It went on the fly when I tested. Sorry
 
Post your script. The helper script and postconf functionality are both working, most likely it's the string you are using in your pc_replace() call that's not being escaped properly.
I'm using this, smb.postconf :
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh

pc_replace "use sendfile = yes" "use sendfile = no" $CONFIG
 
I haven't seen any router with more than 256 MB of RAM yet, as it's more than enough to do what the router is intended to do (routing).

If you want to start using it as a DLNA server AND a torrent client in a reliable way, you'll have to get a swap file set up.

Personally, I don't recommend using a router for torrenting. Torrents are very intensive I/O wise, so it's easy to overload the limited resources of a router (both RAM and disk I/O wise).

I have a swap file set up but I guess I need to check if it's working. Not sure how I would go about that. I haven't seen much documentation other than the commands of how to enable it.
 
make linux swap partition (type 82) and activate it using command
swapon /dev/sdxx

IMO
type free command
and when you see swap size, then swap is working.
 
Ok, as you wish, I'll track the system calls the rc program uses and verify where in the kernel this happens, then describe where to look.

That's going to take a while though.

Just to be clear, I'm not arguing with you and saying you are wrong, I just thought you already had seen the code where it was specifically refusing to erase the brcmnand partition, which is why I was asking if you could point me to it.
 

Latest threads

Sign Up For SNBForums Daily Digest

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