What's new

Bricked router?

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

kcobain1992

Occasional Visitor
Hi,

As I was playing with my RT-AC56U, I was following this tutorial: http://forums.smallnetbuilder.com/showthread.php?t=15528 to run some stuff in Debian chroot at startup.
Unfortunately, at reboot, it seems that my router executes /jffs/scripts/services-start, but never gets out of it.
If I remember correctly, it was something like this:
Code:
ln -s /jffs/configs/profile.add /home/root/.profile
ln -s /jffs/configs/.vimrc /home/root/.vimrc
sleep 10
/usr/bin/debian-mount
The first two commands worked, but I think it didn't like the sleep command. FWIW, the "debian-mount" script looks like this:
Code:
mount -o bind /dev/ /opt/debian/dev/
mount -o bind /proc/ /opt/debian/proc/
mount -o bind /sys/ /opt/debian/sys/
Similar stuff was happening in the services-stop script:
Code:
/usr/bin/debian-umount
but I don't think it gets until there.
Well, as I said, now, after reboot, it never completely starts, the lights don't go on (only the power light), and I can't ssh into it. I tried unplugging the USB stick that was mounted as /opt, and rebooting again, but no succes that way either. I also reset the NVRAM (I think) by holding the reset button for 30 seconds. What can I do?
 
Well, the actual question is:
What scripts are executed by the OS before /jffs/configs/services-start?
Which of these scripts source any other script mounted in /opt? I only know of /etc/profile that sources /opt/etc/profile if it exists.
What I have to do is create /opt/etc/profile (or whatever other script that starts before services-start) on the USB stick, and make it remove that ugly script before it gets executed.
 
I'm able to telnet into my router many times before services-start is initiated, so I don't think your services start is the problem here.

You could try a reset by turning off, holding in wps/radio button (and/or reset button) in 30 secs, then turning it on while still holding the reset/wps button, then keep pressing it for 30 seconds more, then let go, then let the router brreathe for a couple of minutes, then turn if on/off like normal again.

Eventually you can put a huge HDD into the USB-slot, which should make it try to scan the disk on bootup for errors like normal, in which it will give you time to telnet in before services-start is initiated.

I always make my startup scripts check for the presence of a "stop" file or dir on the external disk I have mounted on USB, making it exit the script immediatly e.g. if it finds the directory mnt/system/stop (i cant post the code here due to smallnetbuilder blocking it.

I use a neverneding services-start loop instead of crond, without any problems, containing a sleep 5 on each loop. I can still use my router like normal, and access everything, webgui, telnet etc. I dont see how a running or stuck services-start would brick or prevent your router from actually booting or running.
 
Last edited:
Ok, how else can I diagnose what's wrong? I disabled telnet login, as it was unencrypted.

Do you have entware installed? If so you can insert a command directly in /opt/etc/init.d/rc.unslung if you have rc.unslung started from another script in /jffs/scripts/ (e.g. post-mount etc.)

Then you could insert "rm /jffs/scripts/services-start" directly in rc.unslung since rc.unslung is a sh-script just like services-start is. rc.unslung is reachable on whatever external hdd you have connected aswell if you have entware installed, so connect it physically to your pc/windows, edit rc.unslung in notepad++ from there, save and reconnect hdd, and restart router.

If you don't have entware installed, then you need to go into recovery mode.

Check this: https://code.google.com/p/rt-n56u/issues/detail?id=54

And google: N56u recovery mode.

I'm 100% confident you'll get your router back. Hard-bricking a NXXu is very very seldom, those whom have managed to do so actually deserve a medal.
 

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