Bekijk de volledige versie : New 1.0.4.6 based custom firmware
As promised in various threads, I've posted my custom 1.0.4.6 based firmware image, instructions, and commentary at:
http://home.comcast.net/~kfurge/wl700ge.html
Usual disclaimers: Dangerous, reflash at your own risk, as-is, no warranties, etc...
Future images to come as significant progress is made. Hope some of you find it useful.
- K.C.
fireflash
16-11-2006, 04:27
As promised in various threads, I've posted my custom 1.0.4.6 based firmware image, instructions, and commentary at:
http://home.comcast.net/~kfurge/wl700ge.html
Usual disclaimers: Dangerous, reflash at your own risk, as-is, no warranties, etc...
Future images to come as significant progress is made. Hope some of you find it useful.
- K.C.
Nice dude! Can't wait to try it!
As promised in various threads, I've posted my custom 1.0.4.6 based firmware image, instructions, and commentary at:
http://home.comcast.net/~kfurge/wl700ge.html
Usual disclaimers: Dangerous, reflash at your own risk, as-is, no warranties, etc...
Future images to come as significant progress is made. Hope some of you find it useful.
- K.C.
OK, I have taken the plunge and installed this. I think I followed all of the instructions correctly.
I can telnet to the router, as advertised, so that works.
I seem to have all of the same functionality as I had with the original firmware ... so no damage to report so far.
How do I know if and when the HDD spins down? The "IDE" light is on faintly, and by feel the disk seems to be spinning. The parameter 180 in the rc.local file means 180*5 = 900 seconds = 15 minutes, does it not?
I guess I'll have to wait a quarter of an hour to find out if that is working then.
I'm keen to try at least the ctorrent_1.3.4-dnh1-1_mipsel.ipk package from the openmss project, but I'm not sure how to proceed on that front.
But anyway, so far, so good. A big "THANKYOU" for your efforts so far, kfurge.
I guess I'll have to wait a quarter of an hour to find out if that is working then.
I can report that HDD spin-down also works.
I have seen no errors so far.
As promised in various threads, I've posted my custom 1.0.4.6 based firmware image, instructions, and commentary at:
http://home.comcast.net/~kfurge/wl700ge.html
Usual disclaimers: Dangerous, reflash at your own risk, as-is, no warranties, etc...
Future images to come as significant progress is made. Hope some of you find it useful.
- K.C.
In Firmware 1.0.4.2 the Switch on the back worked fine in AP mode. but not in the 1.0.4.6 - can you modify the firmware so this works??
The only problem with the switch is that I dont get any IP address - it works fine if I set up the IP manually - but no automatically setup will come through from my VPN router.
Thanks!
>>BARTENS<<
The parameter 180 in the rc.local file means 180*5 = 900 seconds = 15 minutes, does it not?
Yes, it's 15 minutes. It's hard to tell sometimes if the HDD is spinning or not. I find the best way is by feel or by putting my ear on it.
I'm keen to try at least the ctorrent_1.3.4-dnh1-1_mipsel.ipk package from the openmss project, but I'm not sure how to proceed on that front.
To test whether or not the packages worked, I did the steps below. Don't take them too literally, I'm recalling them from memory, but they should help guide you in the right direction.
1. Unpack the .ipk file with ar -x on a linux box
2. Copy the data.tgz file to /shares/MYVOLUME1/MYSHARE1
3. Unpack the data.tgz file (tar xvzf data.tgz)
4. Add opt/bin to your path
export PATH=/shares/MYVOLUME1/MYSHARE1/opt/bin:${PATH}
5. Add opt/lib to your LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/shares/MYVOLUME1/MYSHARE1/opt/lib
6. Run your binary
Steps 4 and 5 will have to be repeated every time you login. This is annoying, so I plan to integrate these steps into my next image.
- K.C.
In Firmware 1.0.4.2 the Switch on the back worked fine in AP mode. but not in the 1.0.4.6 - can you modify the firmware so this works??
The only problem with the switch is that I dont get any IP address - it works fine if I set up the IP manually - but no automatically setup will come through from my VPN router.
Thanks!
>>BARTENS<<
Sorry, right now I don't have time to fix Asus bugs. Perhaps when my to-do list is finished I'll be able to look into bug fixes.
FWIW, it's unlikely this problem is fixable by anyone outside of Asus. The basic router initialization is handled by a program called rc. It was buildable in 1.0.4.2, but is only distributed in binary form with 1.0.4.6.
- K.C.
kfurge - is it possible to password protect utelnetd on your firmware without having to modify the source code further?
I like to telnet into my router from the outside world, so password protection is fairly important :)
Thanks, it works for me, but when i use the third rc.local file, my webserver isnt working. So i switched to the second file.
Sollie.
This Firmware finally solved my problems
THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS THANKS
1000X THANKS :D
For some reason I cannot telnet the router? Is the port number 23? Do you need to make telnet in the boot time? strange. The telnet is always refuses. maybe that's because I change the IP adress to 192.168.1.2 since my ADSL router modem that I connect to wl700ge via a Lan port as the ip 192.168.1.1, don't know ...
I test with telnet wl700ge, and with telnet 192.168.1.2 and none seem to work
Thanks, it works for me, but when i use the third rc.local file, my webserver isnt working. So i switched to the second file.
Sollie.
I probably should have been more clear on the web page. The third rc.local file is only for demonstrating some of what can be done within the script. It's not general purpose like the other two.
If you review the script, you'll notice I kill the Asus thttpd then restart it to point to my content (which is not present on your router).
- K.C.
I test with telnet wl700ge, and with telnet 192.168.1.2 and none seem to work
There's no IP address distinction for the telnet server. Perhaps you may have the router plugged into your lan via the WAN interface (eth0). I configured utelnetd to only listen on the LAN interface (br0). Try removing the "-i br0" part from the utelnetd startup. This will fire up telnet on both the LAN and WAN ports. See if that helps.
Another trouble spot may be the script failing to execute. Prior to gaining telnet access, make sure the script is only present in /shares/MYVOLUME1/MYSHARE1/web. If you have a script in /shares/MYVOLUME1/MYSHARE1 make sure to remove it. This is because the startup script (rcex) prefers the non-web location, but requires that the execute bits be set.
- K.C.
kfurge - is it possible to password protect utelnetd on your firmware without having to modify the source code further?
I like to telnet into my router from the outside world, so password protection is fairly important :)
I'm working on this. It just requires a busybox built with login support.
One of my goals is to limit the amount of changes to the original Asus code. This will help shield me from future Asus upgrades.
To that end, I was hoping that one of the openwrt project busyboxes had login built in so I could just bolt it on, but it seems like they don't, so I'll probably have to enable it in the Asus code.
Another firmware image is coming soon anyway because I stumbled across the /dev/random blocking problem while configuring dropbear. Turns out our little box is starved for random entropy, so I need to tweak devfs a little bit to redirect /dev/random to /dev/urandom.
When I get this image ready, I plan to include some form of login support. Stay tuned...
- K.C.
Another trouble spot may be the script failing to execute. Prior to gaining telnet access, make sure the script is only present in /shares/MYVOLUME1/MYSHARE1/web. If you have a script in /shares/MYVOLUME1/MYSHARE1 make sure to remove it. This is because the startup script (rcex) prefers the non-web location, but requires that the execute bits be set.
- K.C.
Ok.
It's working
Success installing ctorrent, very easy following kfurge instructions. A bit disappointed I aspect a more graphical interface, is only text mode :(
There are a fair few ncurses based bittorrent clients - so it may be possible to get one of those going eventually...
Gregoire.Favre
24-11-2006, 18:47
http://ctorrent.sourceforge.net/ ?
openwrt choosed that one.
fireflash
24-11-2006, 19:52
http://ctorrent.sourceforge.net/ ?
openwrt choosed that one.
That's the client that ships with the wl700g
That's the client that ships with the wl700g
It seem there is a new one, the "Enhanced CTorrent" is that the one who ships with the Wl700g?
If this is a more powerful version, does some one with the right acknowledge to compile or install this in the Wl700gE?
Default there is a gift deamon inside the wl700g (http://gift.sourceforge.net/software/core.mhtml), no ctorrent client. The client inside the wl700g is a webbased gifd client. Look on google and you can find windows and linux clients for giftd. Gift deamon has a cool feature. It can search over the gnutella and fasttrack networks. To use this you have to enable the extra function in the wl700g (Enable Download Daemon?). After that you have to download another windows client with search support and you are able to download more (http://www.kceasy.com/).
Ctorrent doesnt have this kind of features, but it has a ratio option (giftd not) and ctorrent isnt borked as the giftd implementation.
I hope you all know the differents.
Sollie.
PS: http://wl700g.info/showthread.php?t=7170
Life2Short
25-11-2006, 19:55
Stupid question, but how would I know that the upgrade worked?
Initially it stopped a couple of times, then I downloaded the firmware again (I thought I might have corrupted it). Then it seemed to work (following the wl500ge howto from this forum). Just for good measure, I tried again using the software on the brick itself, and again it seemed to step through the upgrade just fine.
The "System Setup - Firmware Upgrade" page still shows "Firmware Version 1.0.4.6" I waited about 20 minutes after the boot, but I think the hard disk was still running (it sure sounded like it). If I telnet to 192.168.1.1 I get a "connection refused" message.
Big thanks to kfurge for all of his efforts!!!:D
Stupid question, but how would I know that the upgrade worked?
Initially it stopped a couple of times, then I downloaded the firmware again (I thought I might have corrupted it). Then it seemed to work (following the wl500ge howto from this forum). Just for good measure, I tried again using the software on the brick itself, and again it seemed to step through the upgrade just fine.
The "System Setup - Firmware Upgrade" page still shows "Firmware Version 1.0.4.6" I waited about 20 minutes after the boot, but I think the hard disk was still running (it sure sounded like it). If I telnet to 192.168.1.1 I get a "connection refused" message.
Big thanks to kfurge for all of his efforts!!!:D
To notice some changes you have to read the explanation in the download page. Read it carefully. The disk keeps on going and the telnet is not working because you didn't install any of the scripts available on the download page, that's why :)
Life2Short
26-11-2006, 01:10
I guess that was an even dumber question than I thought it was... :o :p
Thanks for setting me straight IMM22!!! :D
I got the drive to spin down, and since I can telnet into the box everything is pie. Thanks again kurge!!!:D :D :D
fireflash
26-11-2006, 07:37
Default there is a gift deamon inside the wl700g (http://gift.sourceforge.net/software/core.mhtml), no ctorrent client. The client inside the wl700g is a webbased gifd client. Look on google and you can find windows and linux clients for giftd. Gift deamon has a cool feature. It can search over the gnutella and fasttrack networks. To use this you have to enable the extra function in the wl700g (Enable Download Daemon?). After that you have to download another windows client with search support and you are able to download more (http://www.kceasy.com/).
Ctorrent doesnt have this kind of features, but it has a ratio option (giftd not) and ctorrent isnt borked as the giftd implementation.
I hope you all know the differents.
Sollie.
PS: http://wl700g.info/showthread.php?t=7170
There's a giftd client AND ctorrent. Otherwise the router would have no BT capabilities out of the box, which it does (such as they are). The problem lies with the fact that Asus chose to go with the ctorrent client instead of the enhanced-ctorrent client, which fixes a lot of the bugs the original ctorrent had.
Trust me, the executable is on the router, and the source is in the firmware's source tree. And I've seen it running on the router when running a download.
Compiling enhanced-ctorrent, however is beyond my (limited) abilities. I've tried but I can't even get 'configure' to run properly when I put it in cross-compiling mode and point it to the mipsel-gcc stuff. 'configure' keeps trying to create a test executable to test the compiler, which is stupid since it shouldn't do that in cross-compiling mode because there's a 99.9% chance that if you're cross-compiling a program, it's not going to run on the host machine. :P There's a bug in the script I need to track down.. or just eliminate the compiler test from the script all together.
when can we aspect another release? :)
whith all the goods mentioned in the download page and maybe some other things?
In my opnion this was the best release for the wl700ge ever.
thanks again for the free and uninterested work. Is with members like you we see this comunity getting larger every day.
Damn does asus tecnical support guys who dont do anything.
when can we aspect another release? :)
whith all the goods mentioned in the download page and maybe some other things?
Very, very soon. I have basically everything on my to-do list complete (with the notable exception of ksoftirqd which will take some more in-depth kernel hacking).
To make sure I didn't miss anything in my notes, I need to re-confirm my steps prior to publishing the details. Expect a release and an updated how-to no later than this weekend (Nov 31).
- K.C.
Very, very soon. I have basically everything on my to-do list complete (with the notable exception of ksoftirqd which will take some more in-depth kernel hacking).
To make sure I didn't miss anything in my notes, I need to re-confirm my steps prior to publishing the details. Expect a release and an updated how-to no later than this weekend (Dec 31).
- K.C.
are you able to put UTorrent in it or something ?
so i don't have to use the stupid download master >> UTorrent you can see your torrents live much better
hope this aint a stupid question!
Stupid questions dont exist but stupid answers can be. And no, its not possible.
Sollie.
fireflash
29-11-2006, 00:29
are you able to put UTorrent in it or something ?
so i don't have to use the stupid download master >> UTorrent you can see your torrents live much better
hope this aint a stupid question!
UTorrent is a Windows program, correct? If so, then no, it cannot be added to the router. You need a command-line BT client for Linux that can be compiled to work with the router's hardware. That's where enhanced-ctorrent would come in, if anyone can get it to work.
Any chance of getting rtorrent compiled with this hardware? I really like rtorrent. It's simple and does its job perfectly.
Any chance of getting rtorrent compiled with this hardware? I really like rtorrent. It's simple and does its job perfectly.
I like rtorrent too. I does however have some library dependencies that need to be compiled as well: libcurl, libsigc-2.0 and maybe some more. I guess the dependencies it has (on my standard Debian dist) on libssl, libcrypto and some others are optional.
My general philosophy on software changes is to modify the original Asus firmware as little as possible. Instead, I'm focusing my efforts on enhancing the routers functionality through the addition of external packages. In many cases, the external packages can replace (and greatly enhance) the original Asus binaries.
To that end, my next firmware image will not replace the existing Asus torrent client. Instead, you will be able to run any of the command-line torrent packages from this repository:
http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/
Torrent, ctorrent, and enhanced-ctorrent are all in the package list.
Regarding rtorrent, I looked at the project page. Getting it to work on the router shouldn't be all that hard.
- K.C.
I've posted firmware image #2 at:
http://home.comcast.net/~kfurge/wl700g.html
Same caveats as before... Use at your own risk!
This image greatly enhances the usefulness of the box because it supports running all of the mipsel optware packages. It also adds login protection for telnet access. Many more details are posted at the link.
If you're currently running image #1 and want to upgrade, please read the instructions carefully. I've moved the startup script location to make it more secure.
- K.C.
LeperKing
02-12-2006, 21:50
Thanks for the update kfurge.
But I'm having problems at step 2.4. I can't telnet in. I revert back to WL700gE_1.0.4.6_kc_01 and I've got telnet access back. I have the starter untoched rc.local in /shares/MYVOLUME1/MYSHARE1/web.
Anyone else have the same problem or am I doing something stupid.
LK
Thanks for the update kfurge.
But I'm having problems at step 2.4. I can't telnet in. I revert back to WL700gE_1.0.4.6_kc_01 and I've got telnet access back. I have the starter untoched rc.local in /shares/MYVOLUME1/MYSHARE1/web.
Anyone else have the same problem or am I doing something stupid.
LK
I cannot telnet to. I'd like to revert to the older firmware, but I delete it, does some one knows where to find it ?
Crap! I found the problem. I'm missing a "$" in the rcex script where it executes rc.local from the web location. I'll fix it tomorrow and post the image (I'll call it "kc_02a".
Sorry for the lack of quality control. :-(
- K.C.
LeperKing
03-12-2006, 09:17
I cannot telnet to. I'd like to revert to the older firmware, but I delete it, does some one knows where to find it ?
Here's a temporary link of the first firmware. Download for your own resources.
http://www.redbrick.dcu.ie/~prospero/wl700ge/WL700gE_1.0.4.6_kc_01.nas
OK, I've posted a fixed (and tested) image. Please grab it from the web site. Sorry for the inconvenience.
- K.C.
LeperKing
03-12-2006, 19:31
Step 3.2
Is it meant to be shares/MYVOLUME1/MYSHARE1/opt ?
Thanks,
LK.
every worked fine, all but one thing
the installation of ncursesw
Collected errors:
Package ncurses wants to install file /opt/bin/reset
But that file is already provided by package busybox-links
Package ncurses wants to install file /opt/bin/clear
But that file is already provided by package busybox-links
and man
Configuring groff
Configuring less
Configuring libstdc++
Configuring libuclibc++
Configuring ncursesw
An error ocurred, return value: 2.
Collected errors:
Package ncurses wants to install file /opt/bin/reset
But that file is already provided by package busybox-links
Package ncurses wants to install file /opt/bin/clear
But that file is already provided by package busybox-links
Step 3.2
Is it meant to be shares/MYVOLUME1/MYSHARE1/opt ?
Thanks,
LK.
Yes, thanks for the catch.
- K.C.
every worked fine, all but one thing
the installation of ncursesw
Collected errors:
Package ncurses wants to install file /opt/bin/reset
But that file is already provided by package busybox-links
Package ncurses wants to install file /opt/bin/clear
But that file is already provided by package busybox-links
Yes, I found that too. I just manually deleted reset and clear prior to installing the package.
I think adding the "-force-overwrite" option to ipkg will do the same thing...
- K.C.
Yes, I found that too. I just manually deleted reset and clear prior to installing the package.
I think adding the "-force-overwrite" option to ipkg will do the same thing...
- K.C.
Yes, I use the force-overwrite. but the error is there again.
But the MAN works, I've allready installed the packes. Only one error appears when loading the manual, indicating some limitations ...
And now that we have all this, some cool applications to use, does some one knows some ?
Maybe with WEB interface,, :)
reboot the router, but the path's don't work..
where can I put this:
export PATH=/opt/bin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
for the router to read in the startup?
where can I put this:
export PATH=/opt/bin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
For rc.local, simply put it at the top. For an interactive bash shell, put the same lines into the .profile file located in your user account directory.
I don't think there's anything in ${PATH} or ${LD_LIBRARY_PATH} with an interactive shell login, so I fully configured mine in my .profile. I posted a copy of my .profile on the web page.
- K.C.
For rc.local, simply put it at the top. For an interactive bash shell, put the same lines into the .profile file located in your user account directory.
I don't think there's anything in ${PATH} or ${LD_LIBRARY_PATH} with an interactive shell login, so I fully configured mine in my .profile. I posted a copy of my .profile on the web page.
- K.C.
Ok, I'm doing someting wrong :)
first I put a file named ".profile" in /share/MYVOLUME1/opt/home/<username>
And added this lines
#
# Bash initialization script
#
PS1="[\u@\h \W]$ "
PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH=/opt/lib:/shares/lib
export PS1 PATH LD_LIBRARY_PATH
export PATH=/opt/bin:${PATH} export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
of course all edited with vi
My rc.profile file is locanted in /share/MYVOLUME1/
and contains this entries:
#!/bin/sh
pool=`nvram get apps_pool`
share=`nvram get apps_share`
internal_hdd=/dev/ide/host2/bus0/target0/lun0/disc
if [ \! -f /tmp/rc.local.done ]; then
# Indicate we've already done this
touch /tmp/rc.local.done
#
# Mount /opt and connect in various system files
#
if [ -e /shares/${pool}/opt ]; then
mount -o bind /shares/${pool}/opt /optcat /proc/mounts > /opt/etc/fstab
ln -s /opt/etc/shells /tmp/shells
ln -s /opt/etc/fstab /tmp/fstab
export PATH=/opt/bin:/opt/sbin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
export PATH=/opt/bin:${PATH}
# Start dropbear ssh server
if [ -x /opt/etc/init.d/S51dropbear ]; then
/opt/etc/init.d/S51dropbear
fi
fi
# Start utelnetd on local interface only!
/apps/bin/utelnetd -i br0 &
# Sleep for a little bit to not interfere with normal system startup
# before we kill a bunch of Asus processes.
sleep 5
# Kill processes I don't use. The killing of watchdog is necessary
# to allow the disk to spin down (watchdog is a horribly written hack
# anyway!)
killall -q -9 watchdog
killall -q usbcopymain
killall -q rcamdmain
killall -q waveservermain
# Restart the web server
killall thttpd
thttpd -dd /shares/${pool}/${share}/htdocs -p 8081 -i /var/run/t
# Do the necessary steps so the internal HDD will spin down
mount -o remount,noatime,nodiratime /shares/${pool}
hdparm -S 180 ${internal_hdd}
smartctl -dT ${internal_hdd}
fi
And that's it
...
export PATH=/opt/bin:${PATH} export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
...
mount -o bind /shares/${pool}/opt /optcat /proc/mounts > /opt/etc/fstab
If these two lines are indeed concatinated as shown, things won't work very well. Break them apart at the appropriate spots. The mount must work to get a functional /opt.
Also, you're multiply exporting PATH and LD_LIBRARY_PATH in both scripts. No harm, I think, but you only need to do it once.
Otherwise, things looked OK.
- K.C.
Gregoire.Favre
04-12-2006, 15:09
Hello,
thank to the new firmware I have flashed my router and now I have :
telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
(none) login: admin
Password:
Login incorrect
I have tried to change the password/login in the web interface but all attempts fails.
Any idea ?
Hello,
thank to the new firmware I have flashed my router and now I have :
telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
(none) login: admin
Password:
Login incorrect
I have tried to change the password/login in the web interface but all attempts fails.
Any idea ?
The login is: root
Gregoire.Favre
04-12-2006, 15:51
Great : it works now !!!
Thank you very much (that could be written somewhere...)
If these two lines are indeed concatinated as shown, things won't work very well. Break them apart at the appropriate spots. The mount must work to get a functional /opt.
Also, you're multiply exporting PATH and LD_LIBRARY_PATH in both scripts. No harm, I think, but you only need to do it once.
Otherwise, things looked OK.
- K.C.
ummhh. the line are break apart, that's correct. But I don't manage to put it to work ? Do you have some kind of script allredy made for that, thanks.
All other stuff, well ***** (5 stars)
ummhh. the line are break apart, that's correct. But I don't manage to put it to work ? Do you have some kind of script allredy made for that, thanks.
All other stuff, well ***** (5 stars)
The .profile and last rc.local script I posted on the web page are exact copies of what's currently running on my router. Try using the .profile as-is along with the second rc.local script. If that runs OK, then proceed to modify as necessary.
If that doesn't work, please post your /etc/passwd file (with passwords removed, of course) and the output from the "set" and "mount" commands from a login shell.
- K.C.
Thank you very much (that could be written somewhere...)
It was... In the installing section step 3.1...
However, it's a fine point and easily missed. My incredibly bland web page certainly doesn't help it stand out. ;-)
- K.C.
LeperKing
04-12-2006, 19:27
Point 3.2 part 3
mount -o bind /shares/MYVOLUME1/opt /opt (didn't work)
mount -o bind /shares/MYVOLUME1/opt/ opt/ (did work)
I don't think there is any difference....:confused:
LK
P.S. Sorry KC I'm probably splitting hairs
Question: do i loose my hd content, when i do and firmware upgrade.
Sollie.
Question: do i loose my hd content, when i do and firmware upgrade.
Sollie.
Not from anything I did.
However, during my experimentation, I found out the asus firmware rewrites the content of /shares/MYVOLUME1/MYSHARE1/web every time the router starts up.
- K.C.
Point 3.2 part 3
mount -o bind /shares/MYVOLUME1/opt /opt (didn't work)
mount -o bind /shares/MYVOLUME1/opt/ opt/ (did work)
I don't think there is any difference....:confused:
I tried it both ways on my Ubuntu linux system just now and they both worked. I assume it would be the same for the router.
I'd not recommend the second way without at least a "cd /" before the mount command since the mount point is relative.
Is it possible that /shares/MYVOLUME1/opt existed at boot-up and /opt was automatically mounted by the rc.local script before you manually attempted to run the command?
- K.C.
PsycoMantis
04-12-2006, 20:51
Step 3.2
Is it meant to be shares/MYVOLUME1/MYSHARE1/opt ?
Thanks,
LK.
But then there is also a "bug" in the rc.local....
The entry
"mount -o bind /shares/${pool}/opt /opt"
which is
mount -o bind /shares/MYVOLUME/opt /opt
should then also be changed to:
mount -o bind /shares/${pool}/${share}/opt /opt
or not ?
- PM
But then there is also a "bug" in the rc.local....
The entry
"mount -o bind /shares/${pool}/opt /opt"
which is
mount -o bind /shares/MYVOLUME/opt /opt
should then also be changed to:
mount -o bind /shares/${pool}/${share}/opt /opt
or not ?
- PM
The rc.local file as posted is correct.
I had mistakely put /shares/MYSHARE1 instead of /shares/MYVOLUME1 at the location referred to by the message.
Since I've updated the web page, the post, and subequent reply, no longer have the correct context.
Putting opt within reach of the file sharing utilities at /shares/MYVOLUME1/MYSHARE1 could be very convenient, but also potentially insecure. I chose /shares/MYVOLUME1 because none of the canned Asus utilities can reach it.
- K.C.
hmantsao
06-12-2006, 16:59
Could someone have the same problem which can't kill httpd as me ?
The process of my route don't have thttpd process but those have two httpd process, and this process start by themself after i use "killall" command. It seem this process provide kernel level. Do i right? and how can i stop it?:mad:
===after i use killall the screen as below==
587 admin 304 S /opt/sbin/dropbear
907 admin 1388 S httpd 80 y
1033 herman 2776 S < /usr/local/samba/sbin/smbd
========cut. =================
The process of my route don't have thttpd process but those have two httpd process, and this process start by themself after i use "killall" command. It seem this process provide kernel level. Do i right? and how can i stop it?
As you noted, there are two http servers running on the router. The first one, httpd, is the one that serves up the routers web configuration pages on port 80. I see no reason why you would want to kill this one.
The second one, thttpd, is used to serve up your custom web content on port 8080. Incoming requests to port 80 on the WAN interface are redirected to the internal port 8080. You can easily kill and restart thttpd as demonstrated in this script:
http://home.comcast.net/~kfurge/rc.local_3
The "watchdog" process is very likely what's restarting the web servers after you kill them because it regularly pings them to see if they're still alive. I recommend a "killall -9" of the watchdog process. My router got substantially more stable after killing watchdog.
After reviewing the watchdog the source code provided in the 1.0.4.2 release it's easy to understand why... That watchdog code is not good at all.
- K.C.
first of all, thanks for improving the 700ge, it really needs some love.
anyways, I have some problems getting the brick to load rc.local at bootup.
I've ofcourse updated the firmware, it says it's successful, but I do not know how to check this. (tried both the way you've described and the 'ASUS' way)
I have then uploaded the first rc.local via ftp to the web folder, but when I reboot I still don't have telnet access. I can telnet into the box if I put '/apps/bin/utelnetd -i br0 &' in showmessage.cgi in the web folder. (it brings up the login screen where you type 'root') I've then tried to follow the rest of the instructions and moved the rc.local and it is still not loading. I can install all the different packages, but it is frustrating that I have to manually edit showmessages.cgi, then type in:
export PATH=/opt/bin:${PATH}
and
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
when I want to enter the 700ge
and last but not least: manually start my services :-/
besides the rc.local I have these problems:
in 5.3 I get an error at "chown /opt/home/<username> <username>"
but apparently it succeeds if I type "chown <username> /opt/home/<username>" (it gives no reply)
I also have a problem installing dropbear. I'm logged in as root, but it gives me:
mkdir: cannot create directory '/root': (Operation not permitted)
lastly I'm stuck at 5.6, I cannot find .profiles (tried find . name "*profiles*")
EDIT:
I found 'profile' but only after I installed 'Bash' which is not explained in the tutorial :)
Hope you guys can help me out :)
/regards
Henrik
I've ofcourse updated the firmware, it says it's successful, but I do not know how to check this.
The easy way to check is to cat /apps/bin/rcex and see if it contains the parts which execute rc.local at the end. Also, make sure you flashed the "02a" image because the initial "02" release had a bug which kept rc.local from executing in the web location.
in 5.3 I get an error at "chown /opt/home/<username> <username>"
Yep, documentation problem. Your second way is correct. Will fix, thanks.
in 5.4 I'm not sure were to edit:
I'll add an example passwd file to the web page.
Lastly I'm stuck at 5.6, I cannot find .profiles (tried find . name "*profiles*")
Since Asus never expected you to log in, you won't find a .profile on your system. You must add it to your user account. I put a sample .profile on the web page. You'll have to rename it from profile to .profile.
- K.C.
I am using the 02a image, and it IS successfully installed (checked with cat /apps/bin/rcex)
I have my rc.local in shares/MYVOLUME1/
and it is exactly the same as the 1st on the webpage...
you just answered while I was editing my last post :), but anyways I figured out some of the things and now I'm having problems with dropbear, see my last post
thx for the fast response,
/regards
Henrik
fireflash
07-12-2006, 02:44
I'm in a real pickle here. I was lovin' all the great things that came from your recent firmware. Unfortunately after messing around with it, I rebooted it because dropbear wouldn't let me log in as root (even though i set a root pw and all, so I figured what the heck) and now the damn thing is in a constant state of reboot and never comes up. I've tried every trick listed in this forum for reflashing the firmware with the latest one from Asus. The firmware restoration tool appears to do it's job, but unfortunately that's not enough for it to come back up. I think it may have to do with my rc.local file, but I have no way of accessing the hard drive to remove it, since it's rebooting all the time.
My next question is...Since it's formatted with reiserfs, which linux distro will read the FS? My thought is to remove the HD, plug it into my PC, and attempt to mount the disk and remove the offending file(s). Another possibility I'm considering is dropping a different HD in it temporarily to get it back up and running, and hope doing the firmware restoration will get the drive up and running.
Any help would be appreciated, I'm very angry right now. :mad:
I am using the 02a image, and it IS successfully installed (checked with cat /apps/bin/rcex)
I have my rc.local in shares/MYVOLUME1/
The script prefers the rc.local in /shares/MYVOLUME1 over the one located in the web directory. However, it's more picky about this one. Make sure rc.local has the execute bits set (chmod 755 rc.local). If the x bits aren't set, the script won't be executed. Maybe this is your problem?
- K.C.
The firmware restoration tool appears to do it's job, but unfortunately that's not enough for it to come back up. I think it may have to do with my rc.local file, but I have no way of accessing the hard drive to remove it, since it's rebooting all the time.
Yikes! I had a similar problem with one of my scripts where the HDD was thrashing around and the router wouldn't boot past my script.
To fix it, I simply reflashed back to the stock Asus firmware. Since it knows nothing about rc.local, it started right up. I had to redo the telnet hack to get back in and fix things, but that was it.
One thing to try (it's a long shot)... I've found the boot-up behavior between using the switch on the front and actually unplugging the device from the wall is slightly different. One time, the only way I could get the router to boot properly was to cold-boot the router by yanking the power, holding the ez-setup button, reapplying power, then reflashing the Asus firmwar€e.
Please let us know how you progress.
- K.C.
fireflash
07-12-2006, 05:44
Yikes! I had a similar problem with one of my scripts where the HDD was thrashing around and the router wouldn't boot past my script.
To fix it, I simply reflashed back to the stock Asus firmware. Since it knows nothing about rc.local, it started right up. I had to redo the telnet hack to get back in and fix things, but that was it.
One thing to try (it's a long shot)... I've found the boot-up behavior between using the switch on the front and actually unplugging the device from the wall is slightly different. One time, the only way I could get the router to boot properly was to cold-boot the router by yanking the power, holding the ez-setup button, reapplying power, then reflashing the Asus firmwar€e.
Please let us know how you progress.
- K.C.
I've tried that at least twice. still no luck. I'll take another stab at it.
I've got a 40 gig HD i can slap in it if I get real desperate and try that route until I can plug the 160 into my PC and see if I can mount the drive and remove the rc.local (and probably some other stuff). If all hope seems lost and I can get another HD to work in it, I'll trash the partition on the 160 and start from scratch. :(
Now that it's been unplugged for a while maybe it's feeling lonely and is more willing to cooperate now. :)
I've posted firmware image #2 at:
http://home.comcast.net/~kfurge/wl700g.html
Same caveats as before... Use at your own risk!
- K.C.
I followed the instructions (more or less) and I have the following to report:
(1) At first, login as normal user via telnet did not work for me. I checked /opt/home/<username> , I checked .profile within that directory, I checked /etc/passwd ... all looked OK. Eventually I fixed this by running "ipkg install bash" ... which doesn't appear in your instructions but is a required step befor user logins will work with the rest of your instructions.
(2) I did install dropbear, but I am unable to connect yet via ssh.
(3) programs man,less, mc and nano all install but seem to have problems with my terminal program (I'm running Konsole from KDE 3.5.5 under PCLinuxOS). I did install ncurses, ncursesw and termcap.
I am now going to install ctorrent and enhanced-ctorrent and see how that goes.
Later:
I got less and nano working partly OK. I edited my user .profile to read as follows:
#
# Bash initialization script
#
PS1="[\u@\h \W]$ "
PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH=/opt/lib:/shares/lib
export PS1 PATH LD_LIBRARY_PATH
export TERMINFO=/opt/share/terminfo
export TERM=vt100
mc still does not work. I get the following messages on startup:
Warning: file /opt/lib/mc/extfs/extfs.ini not found
Warning: file /opt/lib/mc/extfs/sfs.ini not found
... later still: I got mc working. I just needed to be patient.
ssh is still not connecting to dropbear.
when I login as a normal user via telnet, and I type "ps -aux", I can see that dropbear is running:
590 root 464 S /opt/sbin/dropbear
... but I cannot connect to that process from another machine on the LAN.
Does it need to be done via the WAN? Is there a setup file somewhere to configure this?
Later still:
I am trying a torrent download, via the web interface. I think this will use the new ctorrent I installed, rather than the one provided by default. I am trying to download the new openSuSe 10.2 DVD, which is a 3.6 GB file. I'll report on how this goes later.
I do have one suggestion for this router to improve on its "download without a PC" advertised capability, and that would be to get this project running on the router:
http://aria2.sourceforge.net/
I'm wondering if someone with some influence can persuade oleg about this?
hal2k1: thanks, nano didn't work for me either, until I made those fixes. but can you tell me what you did to make mc work?
[EDIT]: now I know what you mean about patience.... DOH!
K.C.
it seems after all that rc.local IS loaded, telnet didn't work because in your rc.local the command is '/apps/bin/utelnetd -i br0 &' but for me it is '/bin/utelnetd -i br0 &'... :)
keep up the good work.
/regards
Henrik
theswissguy
07-12-2006, 18:11
Yikes! I had a similar problem with one of my scripts where the HDD was thrashing around and the router wouldn't boot past my script.
To fix it, I simply reflashed back to the stock Asus firmware. Since it knows nothing about rc.local, it started right up. I had to redo the telnet hack to get back in and fix things, but that was it.
One thing to try (it's a long shot)... I've found the boot-up behavior between using the switch on the front and actually unplugging the device from the wall is slightly different. One time, the only way I could get the router to boot properly was to cold-boot the router by yanking the power, holding the ez-setup button, reapplying power, then reflashing the Asus firmwar€e.
Please let us know how you progress.
- K.C.
I had exactly the same problem (constant rebooting) and did what kfurge proposes:
- always reboot by unplugging the power cord (actually: power down, unplug, replug)
- flash Asus firmware
- telnet into router (flashed with Asus firmware) with telnet hack and delete all rc.local files
- flash kfurge firmware version 02a
My router works again, like a charm.
best regards,
theswissguy
fireflash
07-12-2006, 20:02
I had exactly the same problem (constant rebooting) and did what kfurge proposes:
- always reboot by unplugging the power cord (actually: power down, unplug, replug)
- flash Asus firmware
- telnet into router (flashed with Asus firmware) with telnet hack and delete all rc.local files
- flash kfurge firmware version 02a
My router works again, like a charm.
best regards,
theswissguy
Ok, here's what I've done repeatedly to no avail:
Assign a static IP to my computer
Unplug the router
plug it back in while holding down the EZ-Setup button
Wait for READY light to come on
Fire off Firmware Restoration tool with the Asus firmware (1.0.4.6)
Let it boot as normal afterwards
At that point it goes right back to going in circles rebooting over and over. I've even gotten it to the stage where I can use TFTP (hold the EZ-Setup button until the READY light starts flashing) with the split-up image file (using AsusExtractor) and flashing it with the flash file, and still nothing. I'm starting to wonder if it's even writing everything it needs to the hard drive properly. Because with the amount of times I've "successfully" flashed the Asus firmware to it, it still insists on constantly rebooting.
Something of the old configuration is still hanging around as well, even though at this point I should've damn near blitzed the NVRAM with the new image, yet it still hangs on to the IP I assigned the router, and not defaulting back to the old one. I'm guessing that flashing the firmware doesn't touch that part of the NVRAM, which is good otherwise we'd have to redo all our settings each time we flash it. :eek:
I'm at my wits end with it. I'm considering more drastic measures. First maybe to attempt to install another HD into the router, and flash the firmware that way and see if it'll take off. Then, take the HD from the router and plug it into my PC and attempt to mount it under Linux. If I can get it to mount, then I can go in and repair, or otherwise remove the offending file(s), put the HD back into the router and see what it does. Last ditch effort would be to nuke the partition on the router's HD, and force it to start over again. Which I would only do if I could get another HD to play nice with it. But I'm trying to do this without voiding the router's warranty.
UPDATE:
IT'S FIXED!!!!!! I did everything I had been doing, but this time I actually held down the RESET button for a good 10-12 seconds, and that apparently causes it to nuke the NVRAM and re-writes the default settings to it, and finally accepts the firmware. I was so happy to see the AIR light flashing, as I knew that was a good sign since I had turned off the radio weeks ago (don't use wireless). So to see it flashing told me it reset to defaults. Plus the IP address is now back to 192.168.1.1. Now that it's working again, it's time to reconfigure it and see WTF went wrong in the first place.
fireflash
08-12-2006, 02:03
Now that everything is back up and running, I decided to tempt fate twice, and reflashed the kc2a firmware, after doing the telnet hack and replacing the FUBARed rc.local with a brand spankin' new rc.local.
BTW, for future reference and a word of advice to everyone, DO NOT USE WINDOWS TELNET! I believe this is what screwed me up in the first place. Now everything I do shell related with this router is being done in either OS X, or Fedora (running under Parallels in OS X, necessary when I need to use the blasted INSERT key in vi) But I digress..
Now I have a mostly functioning rc.local script (using #2 from your website KC), but I've noticed something. I've followed all the directions on the website to get it up and running with /shares/MYVOLUME1/opt and all the ipkg stuff, and that's all working fine. I manually punch in the mount and export commands to get /opt remounted and so on, so thats all working fine. But the problem I seem to be having with the rc.local script is this part:
if [ -e /shares/${pool}/opt ]; then
mount -o bind /shares/${pool}/opt /opt
cat /proc/mounts > /opt/etc/fstab
ln -s /opt/etc/shells /tmp/shells
ln -s /opt/etc/fstab /tmp/fstab
export PATH=/opt/bin:/opt/sbin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
fi
The problem I'm having is this doesn't seem to run. The directory is there, but there's something about it that the 'if' statement isn't seeing, thus it won't run. Everything else about the script is fine, as telnet pops up and all that. So everytime I log in I have to punch in the mount and export commands to bypass all the default Asus/busybox stuff and use the fancy new stuff. I've even replaced '/shares/${pool}/opt' with '/shares/MYVOLUME1/opt' and it still isn't working.
Although I'm happy to see the router reboot and not get caught in a never-ending loop like before. :)
Any ideas what might be causing this? I may remove the 'if' statement from around those commands and make them run anyways. It's nice that it checks for it, but I know the stuff is there, so at this point I don't see why I need the 'if' statement there.
Awesome work BTW. I'm loving the world of possibilities that has opened up!
EDIT:
I've concluded that it is in fact mounting /opt like it's suppose to, but the export PATH and LD_LIBRARY_PATH aren't holding.. So when I telnet into the router, I have to manually run those each time.
I've concluded that it is in fact mounting /opt like it's suppose to, but the export PATH and LD_LIBRARY_PATH aren't holding.. So when I telnet into the router, I have to manually run those each time.
Congratulations getting your router back! It would have made a very expensive doorstop! Thanks for posting your solution.
Regarding PATH and LD_LIBRARY_PATH sticking, yes, you're right, they don't stick from rc.local. They were sticking until I enabled login support. After that, no environment variables were inherited from rc.local. It makes sense from security viewpoint for login to clear the environment.
I solved the problem by setting both of these within my user account's .profile script and using bash as my login shell. I'll probably add a system wide profile into /etc (symlinked to /opt/etc/profile) in my next release.
Along those lines, I still need to learn how the filesystem that's packaged with the .nas file is generated. That way I can pre-load some of this stuff into the flash image.
- K.C.
To all who are telneting into their boxes and curious why their terminal support is lousy it's because utelnetd does not properly set the terminal type. No matter what you login from, your TERM environment variable will be set to 'linux' which probably won't work very well.
To solve this, you can either set it manually (if you know what it should be as demonstrated within hal2k1's .profile example) or login via dropbear with a good ssh client like openssh (linux) or putty (windoze) where it will be set correctly.
- K.C.
...which doesn't appear in your instructions but is a required step befor user logins will work with the rest of your instructions.
Good point. I'll add it. The whole "Making a better system" was more of a stream of consciousness that a step-by-step how-to. :-)
(2) I did install dropbear, but I am unable to connect yet via ssh.
Try a different client. Both openssh and putty work Ok for me, but QVT-Term does not.
- K.C.
it seems after all that rc.local IS loaded, telnet didn't work because in your rc.local the command is '/apps/bin/utelnetd -i br0 &' but for me it is '/bin/utelnetd -i br0 &'... :)
This is *very* strange. Interesting little Asus'ism here, stuffing two apparently identical binaries, with very different sizes, in an already full flash image! I think the only difference is that /bin/utelnetd is dynamically linked and /apps/bin/utelnetd is statically linked.
Is anyone else seeing this wierdness? If so, I'll change the default scripts to load /bin/utelnetd instead.
Thanks for the info.
- K.C.
The path '/apps/bin/utelnetd -i br0 &' from kfurge works for me, no problem with it. I also have bitchx (irc client) working. Thanks for your work kfurge.
But one question: i like to connect my telnet deamon over wan. How can i do that?
Sollie.
ps: i dont want to use a ssh deamon. Because i use xbmcscripts (xbox) to connect my telnet. Ssh wont work for me!
This is *very* strange. Interesting little Asus'ism here, stuffing two apparently identical binaries, with very different sizes, in an already full flash image! I think the only difference is that /bin/utelnetd is dynamically linked and /apps/bin/utelnetd is statically linked.
Is anyone else seeing this wierdness? If so, I'll change the default scripts to load /bin/utelnetd instead.
Thanks for the info.
- K.C.
do they both work?
But one question: i like to connect my telnet deamon over wan. How can i do that?
you can replace '/apps/bin/utelnetd -i br0 &' and change the 'br0' to one of the following
br0 is your LAN
other choices are:
'eth0' (WAN)
'eth1' (not sure)
if you manage to lock yourself out look here:
http://wl500g.info/archive/index.php/t-5762.html
/regards
Henrik
fireflash
09-12-2006, 20:41
I figured out what was causing my router to flip out and go into a never end cycle of reboots. After I got it back up and running and started observing it's behavior with a working rc.local script in it, I realized that it never got around to running the rc.local script, because the READY light never came on. It would start booting, get to the point that it should've brought up the READY light, and would reboot, and keep doing so until I power it down.
After reflashing the kc2a image, and following KC's instructions, all was going great, and I would reboot it after a few changes to make sure everything was working fine. I then proceeded to enable UBSA mode to create a user account, and as soon as I would hit 'Apply', the hard drive would make some noises, and then it would reboot itself, and start the cycle of never ending reboots over again. Now when I had this problem originally, I was able to create a user name with it, and had started modifying the passwd file when I rebooted it and it began rebooting constantly. So there appears to be something about my router that doesn't like having user names. I've tried this a few different ways now. Once after I RESET it and flashed the 1.0.4.6 firmware (which it had probably already reverted to anyways after a RESET, as it wasn't running rc.local anymore), once after a fresh RESET (no settings changes, just enabling UBSA mode), and once after removing all customizations from /shares/MYVOLUME1, just in case it was still referencing that stuff. Everytime it would never get to the point that I could enter a new user, it would start rebooting non-stop until I stick something in the RESET hole.
This may be a legitimate complaint that I can ask Asus about, but for now I'm gonna have to come up with a Plan B for password protecting telnet, as dropbear is out of the question if I can't create another account on it.
Yesterday i had luck with kfurge documentation. But now i have the same problem as fireflash. When i set is to usermode (webui, windws settings) the router reboots and keep rebooting.
Sollie.
fireflash
09-12-2006, 21:45
Yesterday i had luck with kfurge documentation. But now i have the same problem as fireflash. When i set is to usermode (webui, windws settings) the router reboots and keep rebooting.
Sollie.
I figured out what was causing it. I had some left over crap in the __pdc directory under /shares/MYVOLUME1 that contains a passwd file. The file had been modified (by me) and whatever I did to it caused the whole system to freak. When I enabled UBSA after getting it back up and running, it kept referencing those files and causing it to flip out again. After changing the passwd file to make it look more like the one in /etc/ all is good and I've now got UBSA enabled.
Sollie, hold the reset button for about 10 seconds on the back of the router, that'll restore it to factory defaults and allow you to get back in and reconfigure.
I reset it allready and that worked, but i cant enable UBSA. Coz its rebooting again when i do. So my question: can i remove the __pdc dir?
Sollie.
do they both work?
On my box, yes. They both work.
- K.C.
I reset it allready and that worked, but i cant enable UBSA. Coz its rebooting again when i do. So my question: can i remove the __pdc dir?
Sollie.
Hmmm, I'd be very careful here! On my box,
/etc/passwd
symlinks to
/tmp/passwd
which symlinks to
/shares/MYVOLUME1/__pdc/passwd
So, if you kill the __pdc files, you've killed /etc/passwd.
Fireflash, can you be more specific when you say "After changing the passwd file to make it look more like the one in /etc/ all is good..." because, on my box anyway, they're the same file. Right?
- K.C.
fireflash
10-12-2006, 06:32
Hmmm, I'd be very careful here! On my box,
/etc/passwd
symlinks to
/tmp/passwd
which symlinks to
/shares/MYVOLUME1/__pdc/passwd
So, if you kill the __pdc files, you've killed /etc/passwd.
Fireflash, can you be more specific when you say "After changing the passwd file to make it look more like the one in /etc/ all is good..." because, on my box anyway, they're the same file. Right?
- K.C.
The passwd file was different from the others because it was left over from my first attempt at creating a user account, which blew up in my face after I modified the file a bit too much and caused the system to flip out. When I found it, it wasn't symlinked to anything because it wasn't being used, and didn't need to be there. Once I modified the file to look like the one in /tmp, I was able to enable user accounts without the system rebooting. After that everything was sync'd up and working great. Until....
Has anyone had problems accessing the hard drive via the network after enabling user accounts? After I did that I couldn't connect to the hard drive for nothing. Windows and OS X flat out refused to do anything with it. As soon as I turn user accounts off, everything connects. I noticed when UBSA is off, there are two accounts listed in passwd. root and guest. When UBSA is on, theres only root and whatever user you added. The guest account is what allowed any computer on the network to access the hard drive. But without user accounts enabled, I couldn't SSH into the router. So I got creative....
I enabled user accounts. Made a backup copy of the passwd file in /shares/MYVOLUME1. I then disabled user accounts, and added the guest account to my backup passwd file. Afterwards I copied the backup passwd file to /tmp, and I had the best of both worlds. I had access to the router's hard drive, and kept my user account there as well.
But Fireflash, the file will get replaced when the router reboots!
Yes it will. So, with that in mind, I added a simple line to my rc.local file, which looks something like this:
cp /shares/MYVOLME1/passwd /tmp
Problem solved. :)
So unless I completely over looked something, this is the best way I've found to have a user account on the router, as well as keep 'anonymous' file sharing capabilities within a network to the router's hard drive. And after getting all this up and running, I am LOVING what it can do now! Having a working ipkg repository with a ton of stuff is great! I've got dropbear running, nano, enhanced-ctorrent, and screen running, and it's awesome! The greatest combination so far is enhanced-ctorrent and screen, so I can fire off a download, detach it from the shell, and log out. And having nano working is awesome too, because I have a special hate for vi, especially when I'm working under OS X, because Apple thought people don't need the INSERT key for anything, so lets make it a HELP button instead. :confused: Needless to say working in vi without an Insert key is a bit frustrating, plus vi has always annoyed me.
Good job on the firmware KC!
I removed the passwd from __pdc. Enabled UBSA. It worked. It creates automaticly a new file (passwd).
Sollie.
Try a different client. Both openssh and putty work Ok for me, but QVT-Term does not.
- K.C.
This was regarding my not being able to get dropbear to work. I have installed dropbear via ipkg, and it does seem to be running on the router.
I have tried openssh and kssh from Linux client machines on the LAN, and PuTTY from a Windows client on the LAN, and none of these work.
I can ping the router, I can mount shares (on Windows LAN clients or via mount.cifs on Linux LAN clients), and I can connect via telnet (also from any LAN client).
It is just ssh that does not get through to dropbear running on the router. It is almost like there is a firewall somewhere getting in the way.
Any suggestions? Do I need to enable something via the web interface settings perhaps?
=======
Postscipt: I worked it out. All I needed to do was be patient. I entered "ssh 192.168.1.1" and pressed return, then I just waited. After a few minutes, eventually I got a prompt.
That was the same with mc. Just wait. It gets there in the end.
PPS: With ssh working, I must say the terminal is much better now. I would get rid of telnet entirely, if I could work out how to login as a normal user, then change to root user. "su" does not seem to be installed, nor is it an available package. Does anyone have an idea how to do the equivalent of "su"?
Does anyone have an idea how to do the equivalent of "su"?
sudo?
ipkg install sudo
/regards
Henrik
sudo?
ipkg install sudo
/regards
Henrik
In particular, "sudo bash" will get you a full root shell.
- K.C.
Postscipt: I worked it out. All I needed to do was be patient. I entered "ssh 192.168.1.1" and pressed return, then I just waited. After a few minutes, eventually I got a prompt.
You shouldn't have to be too patient. My connect times are within a second or two unless the HDD's have to spin up. It's been my experience that long connect times are generally the result of an incorrect DNS configuration. You might want to double check your DNS settings.
- K.C.
In particular, "sudo bash" will get you a full root shell.
- K.C.
I tried "sudo bash" and also "sudo -s".
Both said "<user> is not in the sudoers file". Then it told me off. :eek:
You shouldn't have to be too patient. My connect times are within a second or two unless the HDD's have to spin up. It's been my experience that long connect times are generally the result of an incorrect DNS configuration. You might want to double check your DNS settings.
- K.C.
DNS settings of what? My client machine, or the router itself?
It's been my experience that long connect times are generally the result of an incorrect DNS configuration. You might want to double check your DNS settings.
- K.C.
Confusion reigns on this. My DNS values could well be awry.
If I type "ssh 192.168.1.1", why is a DNS lookup involved anyway?
PS: I found this page:
http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess
and I see the following comment:
If you've problem logging into your slug with dropbear,
i.e. if you wait the login prompt for ages, it may be a problem
related to the random number generator. Try this quick and dirty trick:
cd /dev
mv random random.orig
cp urandom random
Does anyone think this will help? After I start the ssh command, it takes about 20 seconds for the prompt from the WL700ge to appear for the password.
I tried "sudo bash" and also "sudo -s".
Both said "<user> is not in the sudoers file". Then it told me off. :eek:
You need to edit /opt/etc/sudoers as root to tell sudo what you can and cannot run. The easiest way is to simply add a new entry with your username that's otherwise exactly the same as root's like this:
# User privilege specification
root ALL=(ALL) ALL
you ALL=(ALL) ALL
- K.C.
Does anyone think this will help? After I start the ssh command, it takes about 20 seconds for the prompt from the WL700ge to appear for the password.
No. We can't do this. Details are on my web page (search for devfs).
The only time dropbear cranks on the random number generator is when it needs to initially generate keys during the first connection with an unknown host. After that, the keys are simply confirmed.
Regarding DNS, servers generally do a reverse DNS lookup to put a sane name into the system log.
- K.C.
DNS settings of what? My client machine, or the router itself?
The router.
- K.C.
Hello Kfurge
First thanks a lot for all your contribution with your custom firmware. ;)
I want to instal it but i faced two problems... :o
On the one hand i'm not good enough in computer sience to do all the instructions step by step.
On the other hand i'm french and i don't understand all the instructions.
I think we are a lot in the same case.
So to make all your work and contribution within the reach of everyone, can you (or another member that installed it) make an english tutorial with screenshots of every step ?
I offer to traduce it in french and german... and after we can post it here and in the WL-700g Tutorials section.
Hope someone will be interested.... :)
Regards
Jerome
You shouldn't have to be too patient. My connect times are within a second or two unless the HDD's have to spin up. It's been my experience that long connect times are generally the result of an incorrect DNS configuration. You might want to double check your DNS settings.
- K.C.
OK, I fixed that. It was the DNS settings. All sweet now.
You need to edit /opt/etc/sudoers as root to tell sudo what you can and cannot run. The easiest way is to simply add a new entry with your username that's otherwise exactly the same as root's like this:
# User privilege specification
root ALL=(ALL) ALL
you ALL=(ALL) ALL
- K.C.
Fixed that too. Everything working, so I disabled the telnet in rc.local.
I tried the enhanced-ctorrent, in conjunction with screen. Worked like a charm ... I downloaded all of the 3.6 GB of the OpenSuSe 10.2 DVD iso file. No 2GB limit in sight, and no stopping mid-torrent. Also sweet.
So the only thing left now, really, is that I'd like to run rtorrent instead!
OK, I fixed that. It was the DNS settings. All sweet now.
Fixed that too. Everything working, so I disabled the telnet in rc.local.
I tried the enhanced-ctorrent, in conjunction with screen. Worked like a charm ... I downloaded all of the 3.6 GB of the OpenSuSe 10.2 DVD iso file. No 2GB limit in sight, and no stopping mid-torrent. Also sweet.
So the only thing left now, really, is that I'd like to run rtorrent instead!
That's fine !!
But what is the propose of the screen?
It is possible to link enhanced-ctorrentwith the ASUS web interface, and maybe add some other configurations avaible in enhanced-ctorrent
Thanks
That's fine !!
It is possible to link enhanced-ctorrentwith the ASUS web interface, and maybe add some other configurations avaible in enhanced-ctorrent
Thanks
source code of webhooks is not included. you'll have to create your own :(
source code of webhooks is not included. you'll have to create your own :(
is it possible to use the package 'ctcs'?
Description: CTorrent Control Server (CTCS) is an interface for monitoring and managing Enhanced CTorrent clients
sounds good but it is dependent on 'perl' and perl is apparently not an available package.
/regards
Henrik
gratitude182
14-12-2006, 19:50
@hal2k1
could you tell me, how do get c-torrent to work? i would like to try this....
thanks
gratitude182
hmm, this firmware is working fairly well for me - the one thing I am trying to get working now is the nameserver on the router. ipkg provides the bind package for this purpose, but the install fails with
Installing bind (9.3.2-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/bind_9.3.2-1_mipsel.ipk
Configuring bind
/bin/ash: error while loading shared libraries: /bin/ash: symbol vprintf, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
postinst script returned status 127
ERROR: bind.postinst returned 127
Is there any chance that this can be fixed? It looks like some undefined library issue, which I would have though would be handled via the ipkg dependency checker... but obviously not! :)
So the only thing left now, really, is that I'd like to run rtorrent instead!
I compiled rtorrent (on the router actually!) and it seems to work OK. If someone is willing to work with me to test out the dependent libraries, I think I could fairly easily turn it into a hand-built ipkg. I believe all of the required libs are already built and ready.
I'm not a big torrent guy, but the combination of screen+rtorrent seems like it would be very good.
- K.C.
/bin/ash: error while loading shared libraries: /bin/ash: symbol vprintf, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
Try manually running the postinstall script using /opt/bin/bash instead of /bin/sh.
FWIW, I've installed the gcc toolset on my router and while natively compiling various libraries and software packages, I have noticed that *lots* of scripts, makefiles, etc. assume that /bin/sh is actually a bash shell. Your script is probably trying to do something tricky that our busybox ash shell cannot do.
For my next firmware image, I want to give advanced users the ability to hook/replace certain system binaries. This would include being able to redirect /bin/sh to /opt/bin/bash.
- K.C.
But what is the propose of the screen?
Screen allows you to keep a program (or multiple programs) running even while logged out. You can then log back in, reconnect, and pick up where you left off. The program never even knows you were gone... It's very nice.
- K.C.
IMM22: But what is the propose of the screen?
gratitude182: could you tell me, how do get c-torrent to work? i would like to try this....
OK, first thing is to follow all the kfurge instructions, and thus get the firmware installed and running. You have to get an rc.local in the right spot with the right permissions. You have to set up a user account via the web interface, and you have to edit a .profile file for that user. Include the setting of TERM and TERMINFO environment variables. (These are part of kfurges instructions).
In short, you have to do everything in steps 1 through 5, and use rc.local #3 (although you can comment out the section "# Restart the web server").
After doing all that, you should have wget ncurses, ncursesw, termcap & ipkg installed, and bash, dropbear and sudo all installed.
You have to install the following additional optware packages: screen & enhanced-ctorrent. I also installed nano, less & mc.
I also created a symbolic link between /shares/MYVOLUME1/MYSHARE1/Download and /opt/home/<user>/Download.
You have to have an ssh client program running on your client PC. I used ssh or kssh under Linux, but PuTTY under Windows will do as well.
Using ssh or PuTTY on your PC, log in to the dropbear server on the WL700GE. Now we find out how (and why) to use "screen".
On the WL700ge at the command-line prompt, type: 'screen -R' (without the quotes). This creates a new "virtual screen" (which you can "detach" and "re-attach" later on).
On the virtual screen, type 'cd Download' (or cd /shares/MYVOLUME1/MYSHARE1/Download if you don't have the symbolic link).
Type 'wget http://path.to.torrent.file.that.you.want/file.torrent' <== you get the idea here. I always find it best to copy the text of URLs from my browser and paste that text into the terminal programs directly.
Once you have got a local copy of the .torrent file in the Download place, then type:
'enhanced-ctorrent file.torrent'. (... where file.torrent is the name of the torrent file you downloaded in the previous step. I always find it best to type the 'enh', then press the tab key, then type the first few letters of the .torrent filename, then press the tab key).
OK, the bitorent download should start, and begin displaying progress on the screen. After you have got bored watching that for a while, press and hold the Ctrl key, press 'a' and then 'd'. (Ctrl-a-d). This will "detach" the screen.
Type 'screen -R' to re-attach the screen. Press (Ctrl-a-d) to detach it again. Do this as many times as you want. This demonstrates the effect.
When the screen is detached, you may logout (type 'exit'). The torrent download will continue on the WL700GE. You can shutdown your client PC and turn it off, but still the torrent download will continue on the WL700GE.
Even days later, you can fire up your PC, start PuTTY or ssh again, login to the WL700GE, and type 'screen -R' to see how your torrent download is progressing. Once the download has finally completed, type (Ctrl-C) to stop the enhanced-ctorrent program from running. Type 'exit' to kill the virtual screen. Type 'exit' again to logout.
Your torrent download is ready.
fishin_gnome
15-12-2006, 10:05
Hi all,
This is my first post on this group. I have been watching this forum for a while, generally being very interested in the potential of this box. I have to say that I'm impressed at the speed the firmware is progressing.
Anyway getting back to my original question, I use newsgroups as opposed to torrents and in particular I use hellanzb to get the posts via .nzb files. I was wondering whether anybody thinks that it would be able to be complied and ran on this box, before I spend some money to investigate it further.
Cheers..
I see that the file /etc/hosts on the router is a symlink to /tmp/hosts , and that it contains the very minimalist contents:
--------------------
127.0.0.1 localhost.localdomain localhost
--------------------
The file /etc/nsswitch contains the contents:
--------------------
hosts: files dns
--------------------
That means the the router will use local files for dns lookup and then, if there is no entry for the IP address of interest, it will look up an address on the wider internet.
OK, so that means if I can put static addresses in the /etc/hosts file, my router will know the local LAN addresses when it does a DNS lookup.
At present, my router has a problem finding the hostnames of linux machines on the LAN. I'd rather use MAC addresses and DHCP to assign IP addresses, then put those addresses into /etc/hosts.
So does anyone have a suggestion on how I can get additional info (perhaps on boot) into the /etc/hosts file?
Can anyone suggest some commands to put into rc.local, perhaps?
Possibly something along the lines of :
----------------------------
cat /opt/etc/hosts.lan >> /tmp/hosts
----------------------------
Can I put such a thing in rc.local, or would it have to be part of the firmware?
I compiled rtorrent (on the router actually!) and it seems to work OK. If someone is willing to work with me to test out the dependent libraries, I think I could fairly easily turn it into a hand-built ipkg. I believe all of the required libs are already built and ready.
I'm not a big torrent guy, but the combination of screen+rtorrent seems like it would be very good.
- K.C.
I'd be willing to test rtorrent, but I have no way of installing anything that is not an ipkg.
lewislin
15-12-2006, 16:24
Dear K.C.
Thanks for the great work!
One quick question, does Step 5.7 (changing default login shell & home directory) survive over router reboot? Any chance to make it do so?
Thanks,
Lewis
...does Step 5.7 (changing default login shell & home directory) survive over router reboot? Any chance to make it do so?
it already 'survives' at reboot. The info is stored in etc/passwd which is loaded (and not cleared) at each reboot
/regards
Henrik
Try manually running the postinstall script using /opt/bin/bash instead of /bin/sh.
For my next firmware image, I want to give advanced users the ability to hook/replace certain system binaries. This would include being able to redirect /bin/sh to /opt/bin/bash.
- K.C.
Thanks - pointing the script at /opt/bin/bash worked for me. If you could set it up so that you can change where /bin/sh points in the next release it would be good.
----------------------------
cat /opt/etc/hosts.lan >> /tmp/hosts
----------------------------
Can I put such a thing in rc.local, or would it have to be part of the firmware?
Sounds like a great solution. Should work fine.
Or even better, symlink /tmp/hosts to /opt/etc/hosts.lan.
- K.C.
Anyway getting back to my original question, I use newsgroups as opposed to torrents and in particular I use hellanzb to get the posts via .nzb files. I was wondering whether anybody thinks that it would be able to be complied and ran on this box, before I spend some money to investigate it further.
I don't see why not. Look at the huge collection of packages already available!
I've installed the gcc toolkit on my box and compile my applications directly on it. I've even gone so far as to get gphoto (and all of it's dependent libraries) working. I use the front USB port to download pictures straight off of my camera. Works great!
IMHO, the potential of this box is only limited by your desire and expertise.
Some time soon I plan to rework the "copy" button on the front to auto-download pictures when the camera is pugged in, and auto-backup the HDD when an external drive is plugged in. I've already begun experimenting with manipulating the gpio pins. I had a close call, actually, since one of them apparently controls power to the internal HDD.... ;-)
- K.C.
gratitude182
16-12-2006, 12:55
@hal2k1
thanks for the tutorial... i will try it when i'm back in my flat to test it (so about in 2-3 weeks)... thanks
@kfurge
great work and thanks to post that all ;-)
Nice - I have the transmission package working on my router - this does some proper upload/download speed limiting and has a web access page to manage torrents.
Anyone who is interested, this is how I set it up: http://wl700g.info/showpost.php?p=43330&postcount=5
kfurge - do you know if it's possible to use gpio to turn off the front panel lights - I would like to keep my router on, but it's in my bedroom and the flashing lights keep me awake :)
Sounds like a great solution. Should work fine.
Or even better, symlink /tmp/hosts to /opt/etc/hosts.lan.
- K.C.
Neither one worked. :(
No matter if in rc.local I put:
cat /opt/etc/hosts.lan >> /tmp/hosts
or if I put:
ln -s /opt/etc/hosts.lan /tmp/hosts
... neither has any effect on the file /tmp/hosts after booting.
Neither one worked. :(
Maybe it's getting configured after rcex/rc.local is called. Try something like this in rc.local:
(sleep 10; cat /opt/etc/hosts.lan >> /tmp/hosts) &
Dial in the sleep time so that it's not too long. From the looks of the date/time stamps on my box, this file might get touched regularly after boot-up... The hack above might be better as a script to see if the file changes, then update it via a cron job.
We might be able to make this more elegant with the next firmware if I'm able to hook into the system binaries as they're run.
- K.C.
kfurge - do you know if it's possible to use gpio to turn off the front panel lights - I would like to keep my router on, but it's in my bedroom and the flashing lights keep me awake :)
It's your post from a few weeks ago that piqued my interest. From my initial attempts, I can say for sure that it's possible to turn off all of the front panel lights. As an experiment, I set all gpio outputs to zero. All the leds, but the power led, turned off. Unfortunately, the HDD also turned off! The box itself, including the wireless link, was still running.
I think there's enough info in the 1.0.4.2 code to easily figure out the gpio<->led /button relationship. Turning them on and off should be as simple as fiddling with /dev/gpio/*. I'm still going to play around with this because I want to use the copy button for other purposes.
- K.C.
I'd be willing to test rtorrent, but I have no way of installing anything that is not an ipkg.
I'm also willing to test rtorrent. I realy need that client instead of enhanced-ctorrent. Does there a ipkg exists?
Greetz Jeremia
Maybe it's getting configured after rcex/rc.local is called. Try something like this in rc.local:
(sleep 10; cat /opt/etc/hosts.lan >> /tmp/hosts) &
File looked OK initially, but ...
From the looks of the date/time stamps on my box, this file might get touched regularly after boot-up...
After a while (I'm not sure if it was elapsed time or some other event) the files went back to its original contents.
Is there a better way (other than via /etc/hosts) to have the router know the host names of the machines on the lan?
Is there a better way (other than via /etc/hosts) to have the router know the host names of the machines on the lan?
DNS services are provided by dnsmasq. A quick google search turned up the project page (http://thekelleys.org.uk/dnsmasq/doc.html). Along with being a mini DNS server, it also supports DHCP and will maintain DNS entries for the IP addresses it configures.
So... You could probably kill udhcpc then restart dnsmasq with the correct option flags to also be the DHCP server. Of course by doing this, you'll lose the ability to configure DHCP via the web interface.
- K.C.
So... You could probably kill udhcpc then restart dnsmasq with the correct option flags to also be the DHCP server. Of course by doing this, you'll lose the ability to configure DHCP via the web interface.
- K.C.
I have used dnsmasq in the past - the beauty of it is that it's really easy to configure. I just tried it on my router and it works perfectly - much better than bind which is what I was trying to use!
All you have to do is
1. modify your /opt/etc/dnsmasq.conf - I recommend you set dhcp to only run on the interface br0 to avoid affecting your WAN-side connection. Just uncomment the interface= line and put br0 after =
2. put in a domain name for you local domain (mine is based upon my internet side DynDNS homelinux.org domain)
3. add in lines for your dhcp-host machines based upon each interfaces mac address - there are examples in the conf file. You can assign a name and "static ip" in one line to match to a MAC address.
4. then killall -9 udhcpd and run sudo /opt/etc/init.d/S56dnsmasq
if this works - edit your rc.local to kill udhcpd and start dnsmasq
and thats it! :)
I have used dnsmasq in the past - the beauty of it is that it's really easy to configure. I just tried it on my router and it works perfectly - much better than bind which is what I was trying to use!
All you have to do is
1. modify your /opt/etc/dnsmasq.conf - I recommend you set dhcp to only run on the interface br0 to avoid affecting your WAN-side connection. Just uncomment the interface= line and put br0 after =
2. put in a domain name for you local domain (mine is based upon my internet side DynDNS homelinux.org domain)
3. add in lines for your dhcp-host machines based upon each interfaces mac address - there are examples in the conf file. You can assign a name and "static ip" in one line to match to a MAC address.
4. then killall -9 udhcpd and run sudo /opt/etc/init.d/S56dnsmasq
if this works - edit your rc.local to kill udhcpd and start dnsmasq
and thats it! :)
That was brilliant! Thanks. This fixed the problem and met the need exactly!
OK.
So now to set up CUPS and HPIJS for my next project.
PS: Oops, I spoke too soon!
'ipkg update' now doesn't work any more. In fact, 'wget anything' does not work either.
It looks like dnsmasq isn't working right for the local machine.
Later PS: Fixed now. I should not have disabled the DHCP server via the web interface, it would seem.
bmonninkhof
18-12-2006, 13:04
@all
Is it possible to change de sorting method (to filename) the router for the “browse share” explorer interface and uPnP server with telnet?
See discussion:
http://www.wl700g.com/showthread.php?t=6028&highlight=sorting+files
Greatings B
I've installed the gcc toolkit on my box and compile my applications directly on it.
- K.C.
kfurge - could you describe how you got gcc going on your router? I am trying to get wake on lan working, which appears to require busybox with ether-wake functionality (meaning I have to recompile it...)
thanks
d3viant
kfurge - could you describe how you got gcc going on your router?
Sure.
The magic package you need to install is "buildroot". I manually installed it (without the use of ipkg) because it's a 30M monster. You'll also want to install the dependent packages listed in the buildroot package including make, autoconf, m4, etc.
For gnu "configure" to work properly, you'll need to replace some of the buysbox utilities with their heavyweight versions. Packages like awk, sed, and grep come to mind. There's probably more. I manually installed them as needed when I noticed funny behavior while configuring.
Addtionally, I added this to my .profile
PATH_SEPARATOR=:
CONFIG_SHELL=/opt/bin/bash
AWK=/opt/bin/gawk
export PATH_SEPARATOR CONFIG_SHELL AWK
Finally when you run configure, make sure you do "bash configure --prefix=/opt". You'll still find some configure scripts and makefiles won't work right, especially when installing the package. I've found the main reason is because some Makefile.in files don't use the @SHELL@ macro and have /bin/sh hardcoded inside instead. Replace all /bin/sh with /opt/bin/bash and they usually always work.
Hope this helps.
- K.C.
Hmm, I am having some trouble trying to compile busybox - I get the following error
$ make
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf.o: In function `check_stdin':
conf.c: (.text+0x19c): undefined reference to `dcgettext'
conf.c: (.text+0x1e0): undefined reference to `dcgettext'
conf.c: (.text+0x220): undefined reference to `dcgettext'
scripts/kconfig/conf.o: In function `check_conf':
conf.c: (.text+0x1190): undefined reference to `dcgettext'
scripts/kconfig/conf.o: In function `main':
conf.c: (.text+0x1fb0): undefined reference to `dcgettext'
scripts/kconfig/conf.o:conf.c: (.text+0x2020): more undefined references to `dcgettext' follow
collect2: ld returned 1 exit status
scripts/kconfig/conf -s Config.in
make[2]: scripts/kconfig/conf: Command not found
make[2]: *** [silentoldconfig] Error 127
make[1]: *** [silentoldconfig] Error 2
make: *** [include/autoconf.h] Error 2
Can anyone suggest what is happening here - there was no configure script, so it may not be looking in the right place for libraries?
Hmm, I am having some trouble trying to compile busybox - I get the following error
$ make
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf.o: In function `check_stdin':
conf.c: (.text+0x19c): undefined reference to `dcgettext'
conf.c: (.text+0x1e0): undefined reference to `dcgettext'
conf.c: (.text+0x220): undefined reference to `dcgettext'
scripts/kconfig/conf.o: In function `check_conf':
conf.c: (.text+0x1190): undefined reference to `dcgettext'
scripts/kconfig/conf.o: In function `main':
conf.c: (.text+0x1fb0): undefined reference to `dcgettext'
scripts/kconfig/conf.o:conf.c: (.text+0x2020): more undefined references to `dcgettext' follow
collect2: ld returned 1 exit status
scripts/kconfig/conf -s Config.in
make[2]: scripts/kconfig/conf: Command not found
make[2]: *** [silentoldconfig] Error 127
make[1]: *** [silentoldconfig] Error 2
make: *** [include/autoconf.h] Error 2
Can anyone suggest what is happening here - there was no configure script, so it may not be looking in the right place for libraries?
what are you trying to do? witch version?
That was the latest version - 1.3.0, but I get similar errors out of version 1.2.0 and 1.1.3.
LeperKing
21-12-2006, 13:05
Hi KC,
Just a quick question, this could be dumb but why do you recommend using GerardNL's tutorial for flashing firmware, is the asus webpage not able to flash your custom firmware?
I'm asking because I want to rule out some problems I'm having at the moment. The asus webpage firmware upload is far easier to use. I would have PM'd this question but you've turned it off.
Thanks,
LK.
LeperKing: I have always used the asus firmware upload page with no problems. I used the GerardNL approach only when my router stopped giving out IP addresses at one point. Other than that, the ASUS upload page has always worked for me
Just a quick question, this could be dumb but why do you recommend using GerardNL's tutorial for flashing firmware...
At the time I was doing this, there were a number of posts from people who were having trouble with the web upload. I took the conservative path and decided to use the firmware upload tool.
Perhaps whatever the issue was has since been fixed...
- K.C.
Just followed your instructions....
I'm loving it! Thanks a lot!
LeperKing
23-12-2006, 12:38
At the time I was doing this, there were a number of posts from people who were having trouble with the web upload. I took the conservative path and decided to use the firmware upload tool.
Perhaps whatever the issue was has since been fixed...
- K.C.
d3viant and KC, thanks for the clarification.
Another question: Is it possible to have debugging info sent to the syslog in http://192.168.1.1/log.asp (i.e. to confirm that every line of rc.local is working correctly)
Thanks,
LK.
I think that the log active script looks in the wrong place for messages by default (at least, I've never seen anything in that log!) - this may have to be changed at the source code level.
Kfurge - can you confirm this?
Hello
I have just intalled the custom firmware but i have a problem !
The internal HDD (Seagate Barracuda 7200.10 500Gb) never spindown :confused:
In the tutorial i carried out all the steps until 3.2 included...
Enyone have a solution ? It's very important because my hard disk heats much
Thanx in advance.
Jerome
First of all, thanks Kfurge and others for the excellent work on replacement SW for WL700, it is really a great improvent over the Asus firmware.
I have installed the Kfurge 02a firmware, primarily to get the HD spin down feature, and it worked just great... ..for a while.
I am an embedded programmer, but this my first encounter with the Linux environment, so I have a few things to learn :) After I have been playing around with the little beast for a while, it now keeps accessing the HD every other second :(
I tried to start all over, resetted the box using the reset button, reinstalled the 02a SW, but it still keeps on accessing the HD. The rc.local is in place, and I can log in using Telnet, so I can not really see what could be the problem. Also, using the "ps" command, I can see that the Watchdog prosess is terminated:
# ps
PID Uid VmSize Stat Command
1 root 1268 S init
2 root SW< [keventd]
3 root RWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
7 root SW [mtdblockd]
8 root SW [khubd]
13 root SW< [mdrecoveryd]
80 root SW [gpio_out_pulse]
81 root SW [button_notify_u]
84 root SW< [ksed]
85 root SW [ksechanged]
100 root SW< [raid1d]
105 root SW< [raid1d]
108 root SW [kreiserfsd]
173 root 644 S syslogd -R 255.255.255.255
175 root 396 S klogd
177 root 784 S httpd 80 y
179 root 680 S httpd 8080 share_browsing
185 root 832 S upnp -D -L br0 -W eth0
197 root 508 S udhcpd /tmp/udhcpd_lan.conf
202 root 720 S dnsmasq -i br0 -r /tmp/resolv.conf
210 root 1284 S /usr/local/samba/sbin/smbd
219 root 1232 S /usr/local/samba/sbin/nmbd
221 root 688 S vsftpd /etc/vsftpd.conf
239 root 488 S udhcpc -i eth0 -p /var/run/udhcpc.pid -s /tmp/udhcpc
268 root 828 S waveservermain
270 root 836 S rcamdmain
271 root 676 S infosvr br0
282 root 816 S usbcopymain
489 root 892 S dms /shares/DMSRoot WL700gE 00:17:31:A4:53:27
495 root 892 S dms /shares/DMSRoot WL700gE 00:17:31:A4:53:27
496 root 892 S dms /shares/DMSRoot WL700gE 00:17:31:A4:53:27
499 root 892 S dms /shares/DMSRoot WL700gE 00:17:31:A4:53:27
512 root 228 S ./dmathined /shares/MYVOLUME1/MYSHARE1 2
514 root 976 S mt-daapd -c /tmp/mt-daapd.conf -s WL700gE
515 root 1628 R mt-daapd -c /tmp/mt-daapd.conf -s WL700gE
518 root 1628 S mt-daapd -c /tmp/mt-daapd.conf -s WL700gE
519 root 1628 S mt-daapd -c /tmp/mt-daapd.conf -s WL700gE
522 root 2180 S giftd --home-dir=/shares/MYVOLUME1/MYSHARE1/Download
526 root 868 S asus_gift /shares/MYVOLUME1/MYSHARE1/Download
545 root 336 S /apps/bin/utelnetd -i br0
556 root 656 S -sh
557 root 724 R ps
#
Is there a way to find out what process is accessing the HD?
Can I verify somehow that Hdparm and the other rc.local instructions have been performed correctly?
/Martin
Hello
I have found my problem, the HDD never spin down because there was a friend connected to my FTP :p
Now it works very fine but i have an other question :
After aproximatly 15 min the HDD spin down but after when i want to access it, it don't spin up (maybe it's normal :(). I have an error message "Z:/ is not accessible".
I must always restart the WL700gE to access the HDD ?
There is a solution to spin up it automatically when i want to access it ?
It's very important because when i'm not at home the HDD spin down and i can't access my FTP from my work... the HDD don't spin up automatically
Thanks for help
Jerome
It should spin up again when a request is sent to the router to access the drive - mine still has the original 160GB drive in it, and it does spin up, but the first request is usually denied as the hard drive hasn't spun up properly yet - the second request usually goes through OK...
Right.. I'm having some trouble now :P
I installed kfurge's custom firmware and followed the instructions he wrote with it. All good and I first had Telnet and after that SSH access.. great!
However, after rebooting the server, I can no longer login to the router. Using SSH I always get "Access denied" even after I recreated the user using the Web-Gui.
So I tried to place the rc.local again in /MYSHARE1/web, which would start telnet after a reboot.. However, Telnet doesn't seem to get started anymore.. This is maybe because there is another rc.local file (the one that starts SSH?)
I also replaced kfurge's firmware again with one from Asus. All works good then.. But after putting kfurge's firmware again on the router, I get the same problems.. apparently all settings are still stored... (probably in /opt, I guess.. would a rc.local file in /MYSHARE1/web that does not mount /opt solve anything?)
So ideas on howto get on the router again?
Is there a way to find out what process is accessing the HD?
Set the HDD to spin down in 10 seconds, then start killing processes one at a time waiting 10 seconds between kills. Eventually the HDD will stay spun down. You may have to repeat the process since you've got a lot more stuff running than I do so it's possible that more than one process is touching the HDD.
One other thing, make absolutely sure you've remounted the HDD with the "noatime" option. Not doing so will keep it spun up.
Can I verify somehow that Hdparm and the other rc.local instructions have been performed correctly?
/Martin
Look for /tmp/rc.local.done. If it exists, the script executed. If you need more debug, just work it into your script.
- K.C.
I must always restart the WL700gE to access the HDD ?
There is a solution to spin up it automatically when i want to access it ?
No, it's not normal. Your HDD should automatically spin up when accessed. Try experimenting around with different hdparm settings.
http://www.die.net/doc/linux/man/man8/hdparm.8.html
For me, other than a syslog message, the spin-up / spind-down is completely transparent. Perhaps your HDD is going into sleep mode instead of standby when the timer expires?
- K.C.
So ideas on howto get on the router again?
To start over, just completely delete everything in /opt (rm -rf /opt) and remove your rc.local script(s). Then try setting things up again, this time take smaller steps between reboots to help narrow down what's going on.
- K.C.
I think that the log active script looks in the wrong place for messages by default (at least, I've never seen anything in that log!) - this may have to be changed at the source code level.
Kfurge - can you confirm this?
I wish I could! I can't find any trace of the log file on this thing! If anyone knows where it is, please post. Not being able to find it has been bugging me for a while now...
- K.C.
To start over, just completely delete everything in /opt (rm -rf /opt) and remove your rc.local script(s). Then try setting things up again, this time take smaller steps between reboots to help narrow down what's going on.
- K.C.
Yes, I figured ;) However, my problem is... I cannot get to /opt ;)
My problem is probably in this:
# Run rc.local. Prefer the one out of reach by the file
# sharing applications. If not available, look in the web
# folder on the internal HDD.
if [ -x /shares/${pool}/rc.local ]; then
/shares/${pool}/rc.local $1 &
else
if [ -e /shares/${pool}/${share}/web/rc.local ]; then
/bin/sh /shares/${pool}/${share}/web/rc.local $1 &
else
echo Found no rc.local to run!
fi
fi
This little addition is skipping the web-rc.local if it finds a rc.local in /shares/MYVOUME1/ (which I created). So my only option is to edit the little if-statement and cut away the first if statement.. and force web-rc.local to load.
My biggest problem now however is the F*#%$*cking Asus-site, which is sooooo slow.. and I need the 400MB source-packages :(
Maybe it is a good idea to switch the if-statement.. This will allow you to edit the startup procedure at any time by adding a web-rc.local file?
Maybe it is a good idea to switch the if-statement.. This will allow you to edit the startup procedure at any time by adding a web-rc.local file?
The reason I put the if statement in that order is due to security. The ability to break into the stock Asus firmware in the first place underscores the fundamental problem of putting the rc.local file within reach of the file sharing utilities.
Put the stock Asus firmware back on then follow the directions for gaining telnet access to the box with the stock firmware:
http://www.wl700g.info/showthread.php?t=7434
Once you're in, remove rc.local and /opt. Then reload my firmware and try again.
- K.C.
Thanks for all K.C. it seems to work now !
Thanks for your active contribution and support !!!
I have a question too :
http://wl500g.info/showthread.php?t=7700
Is it possible to install in the WL-700gE a CMS website like Xoops or PHPNuke which use PHP and MYSQL?
If it possible, what i must do to make it works?
Regards
Jerome
gratitude182
09-01-2007, 17:10
at first: thanks for kfurge work on the firmware ;-)
i have less linux knowledge and i don't know much about how the router works. but i tried to install the custom firmware. i followed kfurge's installing guide, and i completed all the steps in step 3 (busybox, ipkg, etc)
i tried to install dropbear. then i restarted the router and now i have the old version of busybox etc and i think i have to do step 3 again.
now my question: is this normal or i have i made something wrong to save the settings and the files?
i hope that nobody asked that already.
thanks for a answer.
grat182
i tried to install dropbear. then i restarted the router and now i have the old version of busybox etc and i think i have to do step 3 again.
you are not saving your paths between each reboot so each time you have to type:
export PATH=/opt/bin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
to void this install bash and put those two lines in your .profile file in your home directory.
http://home.comcast.net/~kfurge/profile
it is described in step 5.9
/regards
Henrik
gratitude182
09-01-2007, 23:13
thanks for the answer henrik. now i have again the new installed busybox etc.
but could someone tell me this:
i have done all steps from 5 1-9 except 3 and 9.
3) how can i give me supreme permissions?
9) what is meant with .profile? is the path written to rc.local (i don't think so). what have i to do to add the enviroment variables?
i excuse me again that i am so a newbie.
3) you need to edit /opt/etc/sudoers (it should be there if you did step 2)
under #user privilege specification edit it so it says :
root ALL=(ALL) ALL
yourusernamehere ALL=(ALL) ALL
9) '.profile' is a file, which is run each time you log in. edit '.profile' ... in that file you put the content that kfurge has in his sample file.
/regards
Henrik
kfurge,
could it be possible to use a USB memory stick for storing the needed files (OS system) instead of the HDD. If possible (I'm not an expert) you’ve solved the problems around the spin down of the HDD. The HDD has its own function for this.
Kind regards,
Gert-Jan
could it be possible to use a USB memory stick for storing the needed files (OS system) instead of the HDD.
Yes, it's certainly possible. I would guess doing this would involve modifying the bootloader, and reconfiguring pivot-root to boot from a different physical device. I considered doing this myself. However, it is not trivial and is not something I'm prepared to experiment with on my box since I actually use it.
If I find another box on sale, I might buy it for experimentation... Until then, I can't do anything quite this extreme.
If possible (I'm not an expert) you’ve solved the problems around the spin down of the HDD. The HDD has its own function for this.
Sorry, I don't quite understand...
The HDD has to be configured to spin down. It won't do so automatically.
FWIW, I've actually stopped spinning down my HDD. I didn't like how long it takes to spin up. I didn't like the mechanical wear and tear either.
After reviewing the datasheet for the Toshiba HDD in the router I discovered it supports an APM mode where it spins in a low power state at about 40% of the full rotational speed. This mode dissipates only slightly more power than a full spin-down. However, the drive spins up in about half the time with much less tortional stress. For those interested, after installing the hdparm ipkg, put these lines in your rc.local:
# Do the necessary steps so the internal HDD will enter low power
# idle after 5 minutes and low RPM idle after 1 hour
mount -o remount,noatime,nodiratime /shares/${pool}
/opt/sbin/hdparm -B 164 ${internal_hdd}
/opt/sbin/hdparm -B 114 ${internal_hdd}
smartctl -dT ${internal_hdd}
The timing equations and details for the two calls to hdparm can be found in the datasheet.
- K.C.
whoops - I appear to have rebooted my router with a duff rc.local!
Half of the services don't start, and I can't get into my router to fix it (ssh/telnet don't start). Kfurge, is there any way to get back into my router to fix the rc.local?
EDIT: Never mind, just found the cgi exploit to do it in the howto section :P
velovite
14-01-2007, 00:48
Hi everyone!
I have followed this thread and the detailled instructions by kfurge (excellent job!) to update my router. Now the drive spins down, I can ssh to the router, etc. However I encountered a problem with sudo complaining that it must be setuid. I infer that I must have screwed up something somewhere, but could not find what I did wrong. I cannot fix the problem either because I can't find setuid or an alternate way to do that. Any idea?
Big thanks to you all for making this router usable!
FIXED
Alright, googling a little more this morning I found that "setuid sudo" command is equivalent to "chmod u+s sudo". This show my poor linux knwoledge!!
I can now close this telnet hole!
3) you need to edit /opt/etc/sudoers (it should be there if you did step 2)
under #user privilege specification edit it so it says :
root ALL=(ALL) ALL
yourusernamehere ALL=(ALL) ALL
9) '.profile' is a file, which is run each time you log in. edit '.profile' ... in that file you put the content that kfurge has in his sample file.
/regards
Henrik
It's possible to create a .profile for root? If it is where can I put it?
I'm asking this because with the user I have created I cannot have privileges to install any pack. It always give me a bunch of errors, that's hod, since I have followed al the steps in kfurge Tutorial with success, that I mean without errors.
And yes, I put in sudoers:
root ALL=(ALL) ALL
yourusernamehere ALL=(ALL) ALL
And run the the packs with; ex:
sudo ipkg install XXXXXX
And it gives me:
sudo: /opt/etc/sudoers is mode 0755, should be 0440
ok, that's easy to resolve
chmod 440 sudoers
And now when I write (telneting as user)
sudo root
He ask me for a passwd... But I don't have password in root :confused:
ok ok , I know, give a passwd to the router...
nano /etc/passwd
edit the file, and copy de exact passwd that I have in the user, encripted of course...
Written the file and done.. Let's test it.
sudo root
sudo: root: command not found
....
login
login: root
Password:xxxxxx
and
login: cannot set groups: Operation not permitted
That's why I'm asking if it is possible to create .profile for the root.
Because I have to write all the time I log as root
export PATH=/opt/bin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
Thanks:D
Not sure, but doesn't the NOPASSWD-tag solve your problem??
http://www.gratisoft.us/sudo/man/sudoers.html#nopasswd_and_passwd
ok ok , I know, give a passwd to the router...
nano /etc/passwd
edit the file, and copy de exact passwd that I have in the user, encripted of course...
Written the file and done.. Let's test it.
Damn, I tried this one and somehow messed my root-password :( Any way to reset it? I only can log in with my new user account, which has no access to all the folders...
Try to install kfurge his first custom firmware. The root account in that one did not uses a pass. So this might work to recover.
Sollie.
sudo root
sudo: root: command not found
It's working OK! When you say "sudo root" it means "execute the file root as user root". :-)
What you meant to say is "sudo bash" which will give you a root shell.
- K.C.
And with this, all problems are resolved !
Thanks Kfurge for the great help to this community.
A work without interest, it's a thing very rare this days and should be appreciated.
:)
Take a look at this
http://pugio.net/
dolphine
21-01-2007, 18:36
After reviewing the datasheet for the Toshiba HDD in the router I discovered it supports an APM mode where it spins in a low power state at about 40% of the full rotational speed. This mode dissipates only slightly more power than a full spin-down. However, the drive spins up in about half the time with much less tortional stress. For those interested, after installing the hdparm ipkg, put these lines in your rc.local:
# Do the necessary steps so the internal HDD will enter low power
# idle after 5 minutes and low RPM idle after 1 hour
mount -o remount,noatime,nodiratime /shares/${pool}
/opt/sbin/hdparm -B 164 ${internal_hdd}
/opt/sbin/hdparm -B 114 ${internal_hdd}
smartctl -dT ${internal_hdd}
The timing equations and details for the two calls to hdparm can be found in the datasheet.
- K.C.
Strange things happen - if I set it the way you describe, the hdd goes standby in few minutes (i hear the sound of going standby and hdparm -C /dev/... says suspend) and i hear the same when I wake it up.
I have downloaded the datasheet, but there are some strange characters in the equations and honestly I don't get the idea of the two parameters y1 and y2 and if there is any relation to the fact that you are issuieng two commands to the device.
In any case the hdparm -I /dev/ide... says APM is enabled but unknown setting (AdvancedPM level: unknown setting (0x00a4)).
I even turned the device off and on again to be sure that I issue the right commands (if clearing it with 0 ir 255 does not work), but same issue there.
My HDD is Hitachi HDT722516DLAT80.
Anyone else trying KF's second approach who had (overcame) similar issues?
Thanks!
Regarding the APM modes in the Toshiba HDD:
The "click" you hear after 5 minutes is the drive entering low power idle mode. The platter is still spinning at near full speed, but the heads are parked. That's the click you hear. The drive can recover from this mode very quickly since it only needs to unpark the heads, and relock the platter servo.
After an hour, the platter will slow down to about 40% speed. It's very difficult to hear the drive spin in this mode, but you still can if you listen carefully. Since the heads are already parked, this mode is sliently entered. The drive runs very cool in this mode, but spin-up is faster.
The equations are indeed confusing, but to engage both Y1 and Y2, you need to set Y1 first. If you only set Y2, Y1 will be set to the default value of 120 seconds. Either Y1 or Y2 are set depending on the range of the value being written. Writes between 80h-BFh (128d-191d) set Y1 and 01h-7Fh (1d-127d) set Y2. It requires two writes to set both.
So according to the datasheet,
Y1=(x-80h)*5+120 = (x-128d)*5+120 = (164-128)*5+120 = 300 sec
Y2=(x-40h)*60+600 = (x-64d)*60+600 = (114-64)*60+600 = 3600 sec
One final thing, make sure you don't call "hdparm -S". Also, I use the latest hdparm ipkg, not the one already installed on the router (note the full path to /opt/sbin/hdparm) though I don't think it's required.
- K.C.
dolphine
23-01-2007, 20:50
Y1=(x-80h)*5+120 = (x-128d)*5+120 = (164-128)*5+120 = 300 sec
Y2=(x-40h)*60+600 = (x-64d)*60+600 = (114-64)*60+600 = 3600 sec
One final thing, make sure you don't call "hdparm -S". Also, I use the latest hdparm ipkg, not the one already installed on the router (note the full path to /opt/sbin/hdparm) though I don't think it's required.
- K.C.
Thanks a lot!
I was confused by the result of hdparm -I ... and -C which just says suspend :-(
I notice when trying to install openssh, sudo and even dropbear, as the root user, that the package install scripts complain about...
mkdir: Cannot create directory `/root': Operation not permitted
The ipkg-web package complains about...
ipkg: extract_archive: /home/: Operation not permitted
I tried using the ipkg -d and -dest args to force the installation inside the writtable /opt area but being an ipkg and optware novice this didn't seem to work. Anyone have some suggestions how to work around this problem ?
I notice when trying to install openssh, sudo and even dropbear, as the root user, that the package install scripts complain about...
Hmmm... I don't remember seeing this when I installed my packages a few months back. Maybe something has changed.
I'll make a note to add a symlink from /root into /tmp in my next image so it can be customized.
- K.C.
How about adding mkdir root and home to rootprep.sh and then we could mount -o bind them, like /opt, so they can become real dirs on the hard drive ? Or at least for only /home and add a link from /root to what could become /home/root on the hard drive. With a real /home we could have multiple persistent user accounts on the hard drive in some kind of standard place. Perhaps some fancy linking could make them usable from the various web/ftp/cifs servers.
On a similar related note, would you, or anyone out there, be interested in cooperating with the ASUS code pushed into a subversion repository, and also using a wiki for notes ?
I suspect if a few of us could coop on the same codebase then we could accelerate development. I've managed to build the ASUS codebase and I hope to try it out today. I think at least 2 other users have built the codebase too so there could be 1/2 folks that could build the firmware and test the results.
Here's an example error I've bumped into with a few packages...
# ipkg configure
Configuring procps
+update-alternatives --install /opt/bin/kill kill /opt/bin/procps-kill 80
syntax error
+update-alternatives --install /opt/bin/uptime uptime /opt/bin/procps-uptime 80
syntax error
postinst script returned status 255
ERROR: procps.postinst returned 255
Nothing to be done
An error ocurred, return value: 255.
Trying the update-alternatives command on it's own gives...
# update-alternatives --install /opt/bin/uptime uptime /opt/bin/procps
syntax error
A simple workaround to make sure the packages are otherwise successfully installed is to comment out the updates-alternative lines in the /opt/lib/ipkg/info/*.postinst files.
#!/bin/sh
set -x
#update-alternatives --install /opt/bin/kill kill /opt/bin/procps-kill 80
#update-alternatives --install /opt/bin/uptime uptime /opt/bin/procps-uptime 80
FWIW
Maybe someone will find this script handz for installing fundamental packages:
#!/bin/sh
#
# Optware pre-installation script, Leon Kos 2006
#
REPOSITORY=http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable
TMP=/tmp
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin
install_package()
{
PACKAGE=$1
echo "Installing package ${PACKAGE} ..."
wget -O ${TMP}/${PACKAGE} ${REPOSITORY}/${PACKAGE}
cd ${TMP}
tar xzf ${TMP}/${PACKAGE}
tar xzf ${TMP}/control.tar.gz
cd /
if [ -f ${TMP}/preinst ] ; then
sh ${TMP}/preinst
rm -f ${TMP}/preints
fi
tar xzf ${TMP}/data.tar.gz
if [ -f ${TMP}/postinst ] ; then
sh ${TMP}/postinst
rm -f ${TMP}/postinst
fi
rm -f ${TMP}/data.tar.gz
rm -f ${TMP}/control.tar.gz
rm -f ${TMP}/control
rm -f ${TMP}/${PACKAGE}
}
_install_package uclibc-opt_0.9.28-12_mipsel.ipk
_install_package ipkg-opt_0.99.163-9_mipsel.ipk
/opt/sbin/ldconfig
/opt/bin/ipkg update
/opt/bin/ipkg install -force-reinstall uclibc-opt
/opt/bin/ipkg install -force-reinstall ipkg-opt
is it possible to install the linux version of hamachi on the WL700ge?
How about adding mkdir root and home to rootprep.sh and then we could mount -o bind them, like /opt, so they can become real dirs on the hard drive ?
That's what I ended up doing.
On a similar related note, would you, or anyone out there, be interested in cooperating with the ASUS code pushed into a subversion repository, and also using a wiki for notes ?
I've been working towards a similar goal since my list of diffs against the original source is starting to pile up. I've pruned the source tree to about 180M and have eliminated some of the time consuming redundancy in the makefile. I'm well down the path of putting the entire tree into version control on my local machine, but it's been absolute torture getting the build to succeed with the source files read-only. I now have it building, but I'm very nervous about the resulting binary. Confirming nothing is broken will be difficult...
If you've got a good place to host the source, I'd be more than happy to post it up there.
- K.C.
Kfurge i have made the quick installation guide website and i have posted it for you at this adress :
http://wl500g.info/showthread.php?t=7701&page=2
Regards
Jerome
Kfurge i have made the quick installation guide website and i have posted it for you at this adress :
http://wl500g.info/showthread.php?t=7701&page=2
Regards
Jerome
Thank you. I expect to have another binary at the end of February. One of my co-workers recently bought a 700gE and has graciously offered to let me use it for a little while to confirm some of the more risky elements of this image.
I'd like to use your guide as the basis for the installation section for the new image.
- K.C.
I install
Installing the new firmware image
Step #5, Making a better system
11.Disable telnet by removing it from rc.local to completely eliminate any chance of root logins
mkdir -p /opt/etc/dropbear
dropbear -t dss -f /opt/etc/dropbear_dss_host_key
dropbear -t rsa -f /opt/etc/dropbear_ rsa_ host_key
add to rc.local
# Start dropbear ssh server
if [ -x /opt/etc/init.d/S51dropbear ]; then
/opt/etc/init.d/S51dropbear
fi
fi
I not disable Telnet.
From the reboot router always till boot in led ready not blinking.
From the hard reset router work
Router work if Manager-Workgroup member-password mode-User Based Share Access (UBSA) disabled.
How i can use this UBSA mode now? :(
respect all
Thank you. I expect to have another binary at the end of February. One of my co-workers recently bought a 700gE and has graciously offered to let me use it for a little while to confirm some of the more risky elements of this image.
I'd like to use your guide as the basis for the installation section for the new image.
- K.C.
OK Good luke for the new binary.
If you want help for your next binary tutorial page you can contact me.
I will help you with pleasure !
What the next binary will do better?
Jerome
gratitude182
30-01-2007, 18:31
@Amlet1
i had got the same problem... my problems where solved with one of these solutions (with telnet onto the router):
http://www.wl500g.info/showthread.php?t=7431&highlight=ubsa
http://www.wl500g.info/showthread.php?t=7778&highlight=ubsa
maybe that helps!
grat182
What the next binary will do better?
Jerome
The primary new feature will be the ability to hook into the system binaries. For starters, I'll be redirecting rc, rc.asus, busybox, and sh/ash and their assorted symlinks. For each binary or symlink, you'll have the ability to pre-exec and/or post-exec a user script. You'll also be able to choose whether or not you want the Asus binary to run at all.
This will allow us to add more flexibility to the stock firmware at runtime similar to what we have at startup with rc.local.
It will also help clear up some quirks with optware packages expecting certain versions of certain binaries to reside in bin.
I'll also be adding some more stub directories like /root.
- K.C.
While using the custom 1.0.4.6 firmware i got to a point where i got stuck with a device that does not mount the HDD anymore.
In the beginning everything worked fine by following the instructions of the tutorial. I flashed the custom firmware using the routers webpage. Then i was able to make ipkg work, installed dropbear, users, etc. Rebooting was not a problem, everything worked smooth.
Then in a final step I added two things to the rc.local:
1. Start TwonkyMusic
2. Added the 3 suggested lines for HDD spin down
Then I did a reboot. Now apparently something was wrong, the device would not boot in the beginning. I heard the HDD working for 6 seconds, and then a "spin down"-noise. This repeated several times (about 10 Minutes). During that time i could not ping, sometimes i saw a strange "default" WLAN SSID.
After the 10 minutes, I could log in again, but VOLUME1 was not mounted anymore :-(. If i go to "Disk Managment" on the routers page it says: Type: "raw" and Status: "unmounted" !?
Telnet, FTP and CFIS does not work because of this. So i am essentially locked out of the router. The initial telnet trick via CGI also does not work anymore because of this :-(
When i go to "Applications - Basic Config" it says: "Applications is disabled temporarily for building system mirror." !?!?
-----------
I think i may have created a corrupt rc.local. Either the start of the TwonkyServer does hold the script, or more likely the "spin-down" commands do unmount the HDD (since a remount is involved, btw. I have the 250GB version of the WL-700g)
Question 1: when is the rc.local executed? I am wondering how this could affect the boot behaviour?
Question 2: Can anyone suggest a recovery procedure? The most obvious for me was to install the original firmware, which should just ignore the rc.local and boot up fine. However, this did not work: i flashed using the webpage, got only a blank page as result, rebooted after 4 Minutes, but nothing changed.
Question 3: I dont even know how to check if i now have the custom or the original firmware installed :-( Any easy way to see this, e.g. on the routers webpage?
Flashing using the Asus Tools is not possible for me, since i am on MacosX. I will try playing with tftp now.
Any help is highly appreciated :-)
Stefan
gratitude182
31-01-2007, 18:35
@stefan
do you have rested the router already?
grat182
Thanks gratitude182.
The solution was indeed to hold the reset button until the ready light blinks.
After that all settings were reset and the hdd was mounted again. Then i could use the cgi trick to telnet in again, edit the rc.local, and install the custom firmware again.
I think I could even reproduce the error: it happened again, when i switched on the "User Management" and then rebooted...
So i will leave the user management switched off for now - which means the box will be wide open.
Anyway, TwonkyMusic is now running nicely and I am happy for now...
gratitude182
31-01-2007, 22:30
@Stefan
for the usba mode (user mangagment) try this... that should help.
grat182
i had got the same problem... my problems where solved with one of these solutions (with telnet onto the router):
http://www.wl500g.info/showthread.php?t=7431&highlight=ubsa
http://www.wl500g.info/showthread.php?t=7778&highlight=ubsa
maybe that helps!
grat182
gratitude182
31-01-2007, 22:37
@Stefan
i think this one helped for me:
http://www.wl500g.info/showthread.php?t=7749&highlight=ubsa
grat182
medsource
15-02-2007, 19:06
Does the custom firmware (which still rocks BTW) have the same QOS modules in the kernel as the original firmware??? I ask as I'm having a terrible time trying to layer some bandwidth management on the wl-700ge. I've been running the 1.0.4.6 2a firmware for a few months and want to cap the FTP outbound so my network doesn't become saturated when ftp transfers are going on.
I've tried the GUI interface for the bandwidth shaping (couldn't find any difference)
I've also tried suggestions from other posts (including wondershaper from the 500g section in reference to their own custom firmware). I made progress with wondershaper but even using the default syntax (eg an already functioning script on the 500g) there are errors that come up with invalid arguments in the qdisc syntax (these don't seem to be mentioned as issues for users in the 500g section). These errors made me think about the QOS modules and how they might be different or missing (in part) on the custom firmware kernel for the 700ge series. If they are different from the original firmware this might explain why the GUI bandwidth util doesn't (at least for me) seem to do anything.
Can anyone comment on this???
(I apologise in advance if this question is silly as my Linux knowledge is meager compared to the resident gurus here)
As always, thanx in advance.
Does the custom firmware (which still rocks BTW) have the same QOS modules in the kernel as the original firmware???
The kernel, and all modules, should be the same though I've never actually confirmed this.
- K.C.
medsource
21-02-2007, 07:18
Another proposal for kfurge is to create firmware-kfurge.mk script looking at my firmware-oleg.mk to provide revisable build for wl700g firmware as a package. See http://trac.nslu2-linux.org/optware/browser/trunk/make/firmware-oleg.mk for example.
In my dealings with oleo (to get a working pure-ftpd in the oleg ipkg which he has almost finished!), he suggested this (the above message). Granted this is over my head (for now at least) but it might be something you'd be interested in?
In my dealings with oleo (to get a working pure-ftpd in the oleg ipkg which he has almost finished!), he suggested this (the above message). Granted this is over my head (for now at least) but it might be something you'd be interested in?
Thanks for the info. I'll think about it...
- K.C.
Hi,
When I try to follow the steps of the HowTo, i can easily flash and get to telnet. But when i try to untar the packet's i downloaded i get something like this:
# tar xvzf data.tar.gz
#
.
./opt
./opt/bin/busybox
tar: ./opt/bin/busybox: Input/Output error
so i got no write access on that path, altough i'm quite sure i did everything as i should have (tried it several times without success...)
when i do "mount" there are the following entry's in the end:
/dev/se/2 on /shares/MYVOLUME1 type reiserfs (rw)
/dev/se/2 on /opt type reiserfs (rw)
/dev/se/2 on /opt type reiserfs (rw)
it looks quite wrong, but i don't know how to go on =( any ideas?
thanks
Rafael
back2basic
07-03-2007, 02:12
when i do "mount" there are the following entry's in the end:
/dev/se/2 on /shares/MYVOLUME1 type reiserfs (rw)
/dev/se/2 on /opt type reiserfs (rw)
/dev/se/2 on /opt type reiserfs (rw)
it looks quite wrong, but i don't know how to go on =( any ideas?
thanks
Rafael
this can be fixed by a simple reboot
tar: ./opt/bin/busybox: Input/Output error
Input/Output errors usually indicate something very wrong at the device level. Is the HDD ok?
To help debug, please post the last few lines from the output of the 'dmesg' and 'logread' commands to see if the kernel logged any errors.
FWIW, I just configured a new router from scratch and, besides the uclibc package name changing to uclibc-opt, I had no problems.
- K.C.
Thanks for your help! I tried restarting it after flashing without success.
This is the output of logread
Mar 7 10:10:34 printd[379]: Startup
Mar 7 10:10:34 printd[379]: Opened server descriptor 4
Mar 7 10:10:34 printd[381]: Create print queue OfficeJet-G55 device /dev/usb/lp0
Mar 7 10:10:45 utelnetd[573]: utelnetd (port: 23, ifname: br0, login: /bin/login) startup succeeded
Mar 7 10:10:53 utelnetd: connection from: 192.168.1.50
Mar 7 10:10:55 login[578]: root login on `pts/0'
Mar 7 10:11:53 printd[594]: Startup
Mar 7 10:11:53 printd[594]: bind: Address already in use
The dmesg command does not exist. (?)
if found this in /tmp/var/log/samba.log (proably of no help, but i'm getting desperate)
[2007/03/07 09:10:07, 0] smbd/qos.c:qos_init(143)
QoS is disabled
[2007/03/07 09:10:07, 0] smbd/server.c:main(784)
standard input is not a socket, assuming -D option
[2007/03/07 09:10:08, 0] printing/nt_printing.c:nt_printing_init(298)
nt_printing_init: Failed to open nt drivers database /usr/local/samba/var/lock
s/ntdrivers.tdb (No such file or directory)
edit2:
there really seems to be something seriously wrong. i can't create users via the webinterface, i can't remove a share i addet (getting an input/output error), i can't access the share via smb or nfs (anymore, this worked in the beginning), printer doesn't work either (i could add it on my computer from the network place but it wouldn't print) ...
i guess i'll have to return it to the vendor ... :(
Chris Thompson
15-03-2007, 04:26
Maybee not the exact place to ask this but I have been following this thread, upgrading the software on my wl700ge. I have apart from one issue had compleat sucess.
It has been a steep learning curve for me but it was fun.
My one remaining problem is when, using putty to log on via dropbear to the root I do not know the default password. Or how to change it. I get the message telling me my key or my password is wrong.
How do I change the password and where do I put the authorized_keys file obtained from puttygen? And will it work, what are the files in opt/etc/dropbear/dropbear_dss_host_key and dropbear_rsa_host_key?
I have tried all the user guids, FAQ etc but still no luck
TIA Chris.
My one remaining problem is when, using putty to log on via dropbear to the root I do not know the default password.
The default password for root is empty. That's why you can telnet in as root without any difficulty. I'm pretty sure dropbear will not allow root logins at all. I'm even more sure it won't allow a root login if the account does not have a password.
You'll need to add a user account, use that to log in, then use 'su' to switch to root when needed. This is the best way anyway.
How you add the account depends on your router's configuration. In particular whether your in AP or Gateway mode and whether or not you've enabled UBA mode (user based authentication). Please post your configuration.
...where do I put the authorized_keys file obtained from puttygen? And will it work, what are the files in opt/etc/dropbear/dropbear_dss_host_key and dropbear_rsa_host_key?
The ipkg installation should have configured everything you need. The first connection from a client will exchange the keys and confirm your trust level. Once trust has been established, the client machine will confirm the keys every time you log in behind the scenes. If the keys change, your client will tell you so.
- K.C.
@Stefan
i think this one helped for me:
http://www.wl500g.info/showthread.php?t=7749&highlight=ubsa
grat182
While I was testing my mt-daapd configuration, I removed the user that was authenticated for MYSHARE1. Then I re-entered the same user to restore my previous configuration. I had rebooted the asus many times before with the reset-buttton (very fast), so I did again. But this time it did not reach the Ready-state anymore, but showed just the same mad behaviour that others have experienced.
Only resetting to factory defaults helped.
But applying UBSA mode got the system mad again and again.
So, finally I was saved by this lovely forum: I removed __pdc\passwd
It's definitely a BUG from Asus that causes this idiot behaviour. :eek: Remember never to delete a user and reentering it. I did not test a different username.
Marc
patrickquek
16-03-2007, 10:43
FWIW, I've actually stopped spinning down my HDD. I didn't like how long it takes to spin up. I didn't like the mechanical wear and tear either.
After reviewing the datasheet for the Toshiba HDD in the router I discovered it supports an APM mode where it spins in a low power state at about 40% of the full rotational speed. This mode dissipates only slightly more power than a full spin-down. However, the drive spins up in about half the time with much less tortional stress. For those interested, after installing the hdparm ipkg, put these lines in your rc.local:
# Do the necessary steps so the internal HDD will enter low power
# idle after 5 minutes and low RPM idle after 1 hour
mount -o remount,noatime,nodiratime /shares/${pool}
/opt/sbin/hdparm -B 164 ${internal_hdd}
/opt/sbin/hdparm -B 114 ${internal_hdd}
smartctl -dT ${internal_hdd}
The timing equations and details for the two calls to hdparm can be found in the datasheet.
- K.C.
Hi KC,
I would like to do the same like you did but my harddisk model is HDT722516DLAT80 (HITACHI Deskstar T7K250). I've checked the datasheet from Hitachi and it says the following which I do not know how I should set the parameters for hdparm:
10.14 Advanced Power Management feature set (APM)
This feature allows the host to select an advanced power management level. The advanced power management level
is a scale from the lowest power consumption setting of 01h to the maximum performance level of FEh. Device
performance may increase with increasing advanced power management levels. Device power consumption may
increase with increasing advanced power management levels. The advanced power management levels contain
discrete bands described in the section of SET FEATURES command in detail. This feature set uses the following
functions:
• A SET FEATURES subcommand to enable Advanced Power Management
• A SET FEATURES subcommand to disable Advanced Power Management
Advanced Power Management is independent of the Standby timer setting. If both Advanced Power Management
and the Standby timer are set, the device will go to the Standby state when the timer times out or the device's
Advanced Power Management algorithm indicates that the Standby state should be entered.
The IDENTIFY DEVICE response word 83, bit 3 indicates that Advanced Power Management feature is supported
if set. Word 86, bit 3 indicates that Advanced Power Management is enabled if set. Word 91, bits 7-0 contains the
current Advanced Power Management level if it is enabled.
I read from your reply to dophine who is using the same Hitachi HD at http://wl500g.info/showthread.php?t=7109&page=12&highlight=spindown -- do you mean i can use the same settings like you did?
/opt/sbin/hdparm -B 164 ${internal_hdd}
/opt/sbin/hdparm -B 114 ${internal_hdd}
Could you kindly advise? I'm using "hdparm -S 180 ${internal_hdd}" now which spinsdown the harddisk, not the best option from the advice you had given.
Btw, i noticed that S.M.A.R.T. is not enabled when i look at the admin page for the harddisk details. It doesn't look right to me, am i missing something?
Many thanks for your help!
cheers,
Patrick
Could you kindly advise?
Sure. From section 12.39.3 of d7k250p_spv1.8.pdf it looks like the timing equations for your HDD are the same as mine. Therefore, the values should work OK for you too. That section contains everything you need to adjust the timing to meet your needs.
I've been running with the 5min/1hr timing for a few months now and it works pretty well for me.
Btw, i noticed that S.M.A.R.T. is not enabled when i look at the admin page for the harddisk details. It doesn't look right to me, am i missing something?
Unfortunately, SMART has to be disabled to allow the drive to enter low power modes. This is because the httpd process (yes, the same one that serves up the web configuration interface) regularly polls the SMART status from the HDD. With my drive, this kept it from entering any of the low power modes.
- K.C.
Chris Thompson
17-03-2007, 02:09
The default password for root is empty. That's why you can telnet in as root without any difficulty. I'm pretty sure dropbear will not allow root logins at all. I'm even more sure it won't allow a root login if the account does not have a password.
You'll need to add a user account, use that to log in, then use 'su' to switch to root when needed. This is the best way anyway.
How you add the account depends on your router's configuration. In particular whether your in AP or Gateway mode and whether or not you've enabled UBA mode (user based authentication). Please post your configuration.
The ipkg installation should have configured everything you need. The first connection from a client will exchange the keys and confirm your trust level. Once trust has been established, the client machine will confirm the keys every time you log in behind the scenes. If the keys change, your client will tell you so.
- K.C.
OK, now what I need ssh access for is to replace Telnet when I dissable it from rs.local. I can now see how I can log in to root with no password. However, I am sure I must be doing something wrong as I can not log into any of my user accounts via telnet either. Only the root. I have three user accounts created by the web interface. The wl700ge is set up as a Gateway and I am using USBA. If I was able to access any of my user accounts by telnet I may be able to sort the rest out, but right now I am lost for an answer.
Chris.
The wl700ge is set up as a Gateway and I am using USBA. If I was able to access any of my user accounts by telnet I may be able to sort the rest out, but right now I am lost for an answer.
Chris.
Everything you've said so far seems OK. Can you post the output of 'cat /etc/passwd' to make sure all of the links are OK. XXXX out the password field if necessary.
It should look something like:
root:XXXXX:0:42000:root:/:/bin/sh
kfurge:XXXXX:1001:42000:kfurge:/opt/home/kfurge:/opt/bin/bash
Also, make sure all shells you want to use are listed in /etc/shells. Finally, to help troubleshooting further, please post the last few lines of 'logread' immediately after an invalid login.
- K.C.
Kfurge, i think you did a great job. I still use you mod above openwrt. So my question: Why dont you change more things in the firmware? I dont think asus will do. So we can make a better firmware. I will help.
Sollie.
So my question: Why dont you change more things in the firmware?
This thread sums up my thoughts on this topic:
http://wl500g.info/showthread.php?t=8590
So far, there's nothing I've wanted to do that couldn't be done with the existing firmware. In fact, the only thing that currently can't be changed on a running system at boot time via rc.local is the kernel itself.
What I think is missing is the transfer of this know-how so everyone benefits from the collection of tricks that makes all of this magic possible. I think a wiki can help with this communication and keep the information within up-to-date.
- K.C.
Chris Thompson
18-03-2007, 00:06
Everything you've said so far seems OK. Can you post the output of 'cat /etc/passwd' to make sure all of the links are OK. XXXX out the password field if necessary.
It should look something like:
root:XXXXX:0:42000:root:/:/bin/sh
kfurge:XXXXX:1001:42000:kfurge:/opt/home/kfurge:/opt/bin/bash
Also, make sure all shells you want to use are listed in /etc/shells. Finally, to help troubleshooting further, please post the last few lines of 'logread' immediately after an invalid login.
- K.C.
The passwd file is as follows:
root::0:42000:root:/:/bin/sh
nora:XXXXX:35001:42000:nora:/opt/home/nora:/bin/false
thompsoncm:XXXXX:35002:42000:thompsoncm:/dev/null:/bin/false
test:XXXXX:35000:42000:test:/dev/null:/bin/false
I was unable to find anything in /etc/shells, that does not mean that there is nothing there ;-)
The puty log is as bellow:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2007.03.17 23:58:03 =~=~=~=~=~=~=~=~=~=~=~=
(none) login: nora
Password:
warning: cannot change to home directory
The last line might hold the clue! But where should the home directory be and how should it be pointed to?
The passwd file is as follows:
root::0:42000:root:/:/bin/sh
nora:XXXXX:35001:42000:nora:/opt/home/nora:/bin/false
thompsoncm:XXXXX:35002:42000:thompsoncm:/dev/null:/bin/false
test:XXXXX:35000:42000:test:/dev/null:/bin/false
I was unable to find anything in /etc/shells, that does not mean that there is nothing there ;-)
OK, three problems:
1) Your home directories, with the exception of nora, all point to /dev/null. Make them all point somewhere real, and make sure they're all owned by the appropriate user.
2) Your shells. All accounts have a shell of /bin/false. This is what is normally put in when you absolutely want to deny a login to an account. Put a valid shell here such as /opt/bin/bash.
3) If you don't have a valid /etc/shells or the shells listed within /etc/shells do not include the shells listed in the password files, then you will also be denied a login. You must fix this too. One of the modifications to the custom firmware was a symlink from /etc/shells to /tmp/shells. Symlink from /opt/etc/shells to /tmp/shells within rc.local. Now make sure /opt/bin/bash is listed in /etc/shells.
- K.C.
patrickquek
18-03-2007, 12:44
Sure. From section 12.39.3 of d7k250p_spv1.8.pdf it looks like the timing equations for your HDD are the same as mine. Therefore, the values should work OK for you too. That section contains everything you need to adjust the timing to meet your needs.
I've been running with the 5min/1hr timing for a few months now and it works pretty well for me.
Unfortunately, SMART has to be disabled to allow the drive to enter low power modes. This is because the httpd process (yes, the same one that serves up the web configuration interface) regularly polls the SMART status from the HDD. With my drive, this kept it from entering any of the low power modes.
- K.C.
Hi KC,
Thanks for the prompt response and advice, appreciate it!
I'm running into another unexpected problem with my 700ge's wireless connection (arrgghh).
I can connect wirelessly fine if i do not setup any encryption. The connection is stable as well.
Once i setup WEP, the performance is erratic. Often i cannot even associate (though i can see the SSID with full signal strength when i View Wireless Network from XP). When i attempt to "Connect", it waits at "Waiting for network" for very long or "Detecting network type"... and nothing happens after that. For the times when I am able to connect, i run continuous ping to see how stable the connection is -- it gets disconnected after about 3 minutes, then back on again.. very erratic.
I've reflashed back to the original ASUS 1.0.4.6 rom to try it out with the same results. I've performed resets many times (by holding down reset > 5s)
with no improvements.
Also, I'm also not able to complete EZSetup successfully. It was always stop at the 3rd box, and it says there's a problem with the EZSetup connection. Tried with box LAN and wireless connection. I figured it wasn't a big deal to use EZSetup since i can set it up manually but with the above problem i described, it worries me :-(
I've used 2 laptops and my PDA to verify. Looks like a hardware problem?
Thanks for any advice in advance.
cheers,
Patrick
Thanks.
gratitude182
18-03-2007, 13:53
@patrick
my settings are:
Authentication Method: wpa-psk
WPA Encryption: TKIP
WEP Encryption: 128bits
and everything works fine. maybe this works also for you.
grat182
patrickquek
18-03-2007, 14:38
@patrick
my settings are:
Authentication Method: wpa-psk
WPA Encryption: TKIP
WEP Encryption: 128bits
and everything works fine. maybe this works also for you.
grat182
Hi grat182,
Thanks for helping. I tried that and it worked for a while, after that the same problem like I described happen. Really weird huh.
Tried all the permutations (64 bit, AEP/TKIP etc) but no good. I guess if the simplest WEP encryption didn't work than something aint' right :-(
Any thing else I could have missed?
cheers,
Patrick
I've used 2 laptops and my PDA to verify. Looks like a hardware problem?
Yes, I'd suspect you've got a dud. I'm sure there's HW acceleration for encryption/decryption in the SoC device. This block is probably flakey.
- K.C.
Chris Thompson
19-03-2007, 01:55
OK, three problems:
1) Your home directories, with the exception of nora, all point to /dev/null. Make them all point somewhere real, and make sure they're all owned by the appropriate user.
2) Your shells. All accounts have a shell of /bin/false. This is what is normally put in when you absolutely want to deny a login to an account. Put a valid shell here such as /opt/bin/bash.
3) If you don't have a valid /etc/shells or the shells listed within /etc/shells do not include the shells listed in the password files, then you will also be denied a login. You must fix this too. One of the modifications to the custom firmware was a symlink from /etc/shells to /tmp/shells. Symlink from /opt/etc/shells to /tmp/shells within rc.local. Now make sure /opt/bin/bash is listed in /etc/shells.
- K.C.
Thank you very much. I have done as you said and now it works.
I did not realise that some of the steps, i.e. file modifications had to be done manually.
I carried out the following steps:
1&2/ The passwd file was edited to give all users a path to their home directory;
(nora:XXXXX:35003:42000:nora:/opt/home/nora:/opt/bin/bash).
The relevant directories were created, (mkdir -p /opt/home/nora) and given ownership by the respective user (chown nora /opt/home/nora)
3/ The path opt/bin/bash was added to shells (echo "opt/bin/bash">> /etc/shells). The symlink was already in rc.local.
There is no way I would of fixed those three snags myself, thank you again.
What I did manage to do was to get putty working with SSH and dropbear.
Was really quite easy compared to the above.
Use Puttygen to create the public and private keys.
Copy the private one to the PC hard drive.
Create a hidden directory SSH in the user folder (mkdir /opt/home/nora/.ssh)
Copy & Past the public key, all of it with no additions, from Puttygen into a new file authorized_keys into this directory (echo ((right click past)) > /opt/home/nora/.ssh/authorized_keys)
And that is it just configure Putty to use the private key you saved on the PC hard drive. At the login prompt enter your user name and it should connect.
I hope this may be of some help to any others with problems connected with SSH on dropbear.
Chris.
Hi,
After installing KFurge's image, is it possible to hook the router to a pc with an usb cable and access the hard disk as if it were a usb hard disk? Combined with the methods to mount such a disk, it would give us the possibility to get a better grip on the internal disk.
But I don't know if this a hardware feature or a software feature. In the latter case, with some knowledge, it would be feasable, I guess.
Greetz,
Marc
But I don't know if this a hardware feature or a software feature.
It's both. Only USB OTG (On The Go) is able to flip flop between a host and device endpoint. The USB ports on this box are host only. There's no chance.
- K.C.
Fullback
05-04-2007, 07:47
Hey i just got a wl-700ge been using it for about 2 weeks. seems that download master does not work...lol but can someone send me a step by step guide on how to load the custom firmware. because my understanding is that after i can load another bittorrent client. sorry for the stupid question! thank you. P.S i also have suse 10.2 installed and can use it is fairly okay. Thank you
can someone send me a step by step guide on how to load the custom firmware.
http://home.comcast.net/~kfurge/wl700g.html
Linux experience (which you have) is required.
- K.C.
Fullback
06-04-2007, 18:24
Hey, thank you for responding on my previous forum. But i am looking at your guide and i can't seem to understand it to much.. My questions are first do i just Download the 18M file from http://home.comcast.net/~kfurge/WL700gE_1.0.4.6_kc_02a.nas.
and upload it to to my router using the router firmware upgrade tool. and the Second question is, i don't clearly understand the next step. I am trying and i would like to learn how so i can help some people around me that have the same router as well. In addition to i don't even know what to do after i flash the firmware. Thank you !! for you help!!! :)
THANK YOU!:confused:
LeperKing
06-04-2007, 19:12
See...
http://wl500g.info/showthread.php?t=8237
It has pictures.
LK
Fullback
06-04-2007, 19:31
Hey thank you so much for the picture tutorial i am going to give it a try after school! Thanks aging man this will help many! :)
Fullback
07-04-2007, 03:30
I can't get ipkg update, i added the ipkg.conf file in to the correct directory and all. this is the problem i am having can someone please help me out, thank you!
" # Add the following line to /opt/etc/ipkg.conf with the newly installed busybox version of vi: "src optware http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable". Here's a copy of mine.
# Run "ipkg update"
# For completeness, re-run "ipkg install" for uclibc, busybox, ipkg, and wget to fully install them. You may have to use the -force-overwrite flag."
i followed these steps and also "mv /shares/MYVOLUME1/MYSHARE1/web/ipkg.conf /shares/MYVOLUME1/opt/etc/ipkg.conf" and then after that i tired to type
ipkg update and that's when i get the error """""" ipkg update
ipkg: not found
#
# ipkg install
ipkg: not found
#
#
# # ipkg Update
# ipkg: not found
ipkg:: not found
# #
# # ipkgupdate
# ipkgupdate: not found
ipkgupdate:: not found
# #
# # ipkg update
# ipkg: not found
ipkg:: not found
# #
# # ipkg install
# ipkg: not found
ipkg:: not found""
can someone please help me i have no idea what i might be doing wrong. Thank you!
GerardNL
07-04-2007, 09:36
It seems that you have not set the path, so the OS doesn't know which commands you want to execute.
So, either include the full path:
/opt/bin/ipkg
or, copy & paste the following lines to your telnet session:
export PATH=/opt/bin:/opt/sbin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
as you can see, the directory "/opt/bin" is added to your path (so it knows to look thee for the ipkg command.
Fullback
07-04-2007, 09:42
Thank you that fixed the problem
back2basic
07-04-2007, 10:42
Thank you that fixed the problem
now you can run
ipkg install uclibc-opt busybox ipkg-opt wget
Fullback
07-04-2007, 23:16
hey thanks for the help Basic2Basic but i am having problems install the second command. i Got u "uclibic" to install just fine, but i can't get "ipkg opt" to install
this is the error i am getting also i am running the Terminal on puttytel :
Downloading: not found
# Installing busybox-links (1.5.0-1) to root...
syntax error
# Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/busybox-links_1.5.0-1_mipsel.ipk
Downloading: not found
# Package ipkg-opt (0.99.163-9) installed in root is up to date.
syntax error
# Package wget (1.10.2-3) installed in root is up to date.
syntax error
# Successfully terminated.
Successfully: not found
# Collected errors:
Collected: not found
# Package busybox-links wants to install file /opt/bin/reset
Package: not found
# But that file is already provided by package ncurses
But: not found
# Package busybox-links wants to install file /opt/bin/clear
Package: not found
# But that file is already provided by package ncurses
But: not found
Thanks for the help bro!
back2basic
08-04-2007, 17:41
Hi,
export PATH=/opt/bin:/opt/sbin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
(every time you log in until you set up a .profile see the tutorials on how to install the custom firmware on various pages)
ipkg install uclibc-opt busybox ipkg-opt wget
tutorials:
http://wl500g.info/attachment.php?attachmentid=1280&d=1170263169
http://home.comcast.net/~kfurge/wl700ge.html
http://wl700g.homelinux.net
glenmaroney
22-04-2007, 21:53
Hi,
Can anyone help me please?
I have followed the windows based instructions for updating to KC's firmware and the firmware is successfully uploaded to the router. I then get a minute or two of IDE activity. Whenever I run EZSetup after that though it fails and doesn't tell me why!?
The router then works absolutely fine, as if I hadn't done anything to it. My share is still there with data on it. Some settings have returned to default but other than that it's as it was before.
Is there a way to tell if I have the custom firmware on it now?
Thanks for your help.
glenmaroney
23-04-2007, 16:20
the rc.local isn't being executed when the router reboots. Any ideas why not?
the rc.local isn't being executed when the router reboots. Any ideas why not?
I will ask the obvious question: Did you rc.local move it to /shares/MYVOLUME1 and chmod the file to 775?
I guess I should ask the other question: How do you know it is not getting executed? :D
glenmaroney
24-04-2007, 18:10
I will ask the obvious question: Did you rc.local move it to /shares/MYVOLUME1 and chmod the file to 775?
I guess I should ask the other question: How do you know it is not getting executed? :D
Unfortunately, I have got it in the right place and I chmod ed it to 755...should it be 775?
I know it's not being executed because after a reboot I have to modify the path and mount /opt again.
Unfortunately, I have got it in the right place and I chmod ed it to 755...should it be 775?
Sorry, typo on my part. It should be 755.
Have you tried executing the operations in the rc.local file separately to determine if they are valid? I am wondering if the if statements are not getting through properly.
Hacksaw.
BrianKDav
25-04-2007, 07:38
The two lines in rc.local assume the pre-existence of two exports: PATH and LD_LIBRARY_PATH. After some fiddling, I found that PATH existed on my system, but LD_LIBRARY_PATH did not. This seemed to break the second export in my system, so I changed it from
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
to a simpler
export LD_LIBRARY_PATH=/opt/lib:/shares/lib
This was done in both rc.local and .profile. After that, ipkg and other things behaved more to expectation.
Dropbear never starts automatically for me. Anyone have an idea why
if [ \! -a /var/run/dropbear.pid ]; then
is not working for me?:confused:
--Brian
BTB: Here's to you, kfurge, for all your work and continued support. Thank you! :D
This was done in both rc.local and .profile. After that, ipkg and other things behaved more to expectation.
Same for my .profile. I agree rc.local should match.
Dropbear never starts automatically for me. Anyone have an idea why
if [ \! -a /var/run/dropbear.pid ]; then
is not working for me?
Does this it work OK when executed under a standard login shell? If so, you might be seeing a busybox shell quirk. If not, please post more of your rc.local file. Maybe the shell is terminating prior to executing the if statement?
An interesting quirk I found is that the busybox /bin/shell, when executing a script under a login shell, properly sets $VAR in the following:
VAR=`/bin/pwd`
but when the same script is executed directly from the kernel as a replacement for /bin/miscio_input_change (which is called whenever one of the buttons is pressed) $VAR remains empty. Writing to syslog indicated that /bin/pwd executed OK. However, the shell refused to set the variable regardless of what I tried.
- K.C.
BrianKDav
27-04-2007, 07:44
Here's the entire rc.local
#!/bin/sh
pool=`nvram get apps_pool`
share=`nvram get apps_share`
internal_hdd=/dev/ide/host2/bus0/target0/lun0/disc
if [ \! -f /tmp/rc.local.done ]; then
# Indicate we've already done this
touch /tmp/rc.local.done
#
# Mount /opt and connect in various system files
#
if [ -e /shares/${pool}/opt ]; then
mount -o bind /shares/${pool}/opt /opt
cat /proc/mounts > /opt/etc/fstab
ln -s /opt/etc/shells /tmp/shells
ln -s /opt/etc/fstab /tmp/fstab
export PATH=/opt/bin:/opt/sbin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:/shares/lib
fi
# Start utelnetd on local interface only!
/apps/bin/utelnetd -i br0 &
# Test for and start dropbear
echo "dropbear?" | logger -p local0.notice
if [ \! -a /var/run/dropbear.pid ]; then
echo "dropbear!" | logger -p local0.notice
/opt/etc/init.d/S51dropbear
echo "dropbear started" | logger -p local0.notice
fi
# Stop & Start web server
echo "thttpd" | logger -p local0.notice
killall thttpd
/apps/bin/thttpd -dd /shares/webbase -p 8081 -i /var/run/thttpd.pid -v
# Add confirmation that rc.local was executed
echo "rc.local executed" | logger -p local0.notice
fi
Not much different from your samples...
I'll try rebooting if necessary to review the log messages.
--Brian
Not much different from your samples...
Yep, that should work OK. Any chance that the dropbear startup script is not set as executable?
- K.C.
Quick question as I am slightly confused. I have just gone throught he instructions for building the 1.0.4.6 based firmware and am now up to applying K.C.'s modifications.
http://home.comcast.net/~kfurge/wl700ge.html indicates in step 2.3 to "cd to ./exinstall/apps/bin" but I don't have an apps directory under exinstall. Here is the path I found rcex under: /opt/WL700g/nasoc/src/apps/tarfiles/exinstall/bin
Is this the file I should be looking for?
Here is another one. Step 6.1 states:
# Disable the config rewrite nonsense in $(apps)/Makefile by commenting out the line immediately under the "busybox:" target label.
I assume then that this line would be the one that starts with "cd busybox"?
busybox:
cd busybox && rm -f .config && ln -s NASoC_config .config
$(MAKE) -C busybox dep
$(MAKE) -C busybox STRIPTOOL=$(STRIP)
I guess I leave the "cd busybox" command in and remove the rest?
Thanks,
Hacksaw.
Here is the path I found rcex under: /opt/WL700g/nasoc/src/apps/tarfiles/exinstall/bin
Is this the file I should be looking for?
It's been a while since I posted the instructions, and I've modified my build environment since, but I believe you're right. The makefile uses exinstall.tar to build the image so you'll have to tar up any of your changes in the exinstall directory back to exinstall.tar to make them stick.
I guess I leave the "cd busybox" command in and remove the rest?
Comment out the whole line.
- K.C.
Thanks K.C.!
I have rebuilt the image using your instructions and attempted to apply the iptables recent module support. I have applied the patches to the kernel and rebuilt it, but am having issues getting the libipt_recent.so built. I might not need it, so i am going to flash the load I have and see what happens.
Hacksaw.
I locked myself out of my shell (no telnet, no valid shell for ssh), so cannot get into my WL700.
Although I have tried various approaches described on the forum, I cannot prevent the rc.local in /MYVOLUME1/ from being executed (and preventing me from logging in). The telnet hack described, does not work for me (see my other post http://wl500g.info/showthread.php?t=8858).
Therefore I was wondering if a previous version of Kfurge's firmware might do the trick. Especially the one that expects an rc.local in /MYVOLUME1/MYSHARE1/. This location I can reach (by nfs) and can modify files in.
I'm thinking that downgrading to that custom firmware might force the WL700 to use the rc.local in /MYSHARE1/ which I could make to enable telnet. Right?
Only problem, Kfurge doesnt offer this version for download, and I do not know which version of Kfurge's firmware it should be. Can anybody help me with this? Thanks.
Downgrading to the previous version worked like a charm...
LeperKing
08-05-2007, 14:38
To get previous version of Kfurge's firmware, go to post 36 of this thread!:p
LK
To get previous version of Kfurge's firmware, go to post 36 of this thread!:p
LK
Right... that was the one thing I didn't search the whole forum for... *oops*
Thanks!
BrianKDav
09-05-2007, 06:45
I locked myself out of my shell (no telnet, no valid shell for ssh), so cannot get into my WL700.
Did that myself once, and had to resort to the hack where you put the telnet startup in one of the cgi scripts. Only problem was that I couldn't mark as executable the script I wanted to use to start telnet. (This I could see by failures to execute, and a directory command in FTP access.) I got around the inability to mark it executable it by putting the script, with the executable properties already set, on a USB drive. This was done from my Ubuntu system - not sure how to do it with Windows. I then plugged the USB drive in and hit copy. Once the script was in the USBCOPY folder, I used FTP to copy it to a location accessible in a browser session. Invoking the cgi via a browser started telnet (on br0, of course).
I hope this helps! :o
--Brian
Here's the link to telnet / cgi hack. My only problem is that, as mentioned above, I couldn't make the CHMOD command work.
http://www.wl500g.info/showthread.php?t=7434
BrianKDav
11-05-2007, 08:05
Yep, that should work OK. Any chance that the dropbear startup script is not set as executable?
- K.C.
Nope, it's set executable. If the ASUS box is starting due to a power failure, do you think it could be actually finding the dropbear.pid file? I thought the /var/run folder got rebuilt and/or cleared on a restart. Sometimes these computers frustrate us by doing exactly what we tell them to do!
--Brian
As I get moments here and there, I want to improve the message logging on this system.
/var is actually part of the readonly cramfs. /var/run is permanently symlinked into /tmp so any pid files are definitely not being saved across reboots.
- K.C.
Chris Thompson
24-05-2007, 12:00
I have just noticed the following error in the system log, not sure if it has been doing it all the time or not. Neither do I know what it means.
Please can any one tell me if I need to do anything.
May 23 09:29:44 portmap[802]: user rpc not found, reverting to user bin
May 23 09:29:44 rpc.statd[808]: Version 1.0.5 Starting
May 23 09:29:44 rpc.statd[808]: statd running as root. chown /var/lib/nfs/sm to choose different user.
TIA Chris
I'd say if NFS is working OK then these warnings can be ignored.
- K.C.
the instruktions is gone and asus has no description on how to do it.?
LeperKing
06-07-2007, 21:09
the instruktions is gone and asus has no description on how to do it.?
Instructions are still there. Have you read this thread?
LK
Hi there,
Bought a WL-700 eG Yesterday and it looks quite nice to me. Ive bought it becaus of its BT feature. Ive looked in many fora last night about my wl, because i have the feeling bt isnt working like i want it. In this forum ive seen many solution for upgrading firmware. But loads of posts is abacadabra for me! Still i see lots of people upgrading the firmware to Kfurge its version, but i dont have too many experience with linux and telnet. Could somebody make a walktrough or post a link how to upgrade to Kfurge's version. Ive read his website also, but it is still to hard for me. I think this walktrough will help a lot of people like me, who want to share data whit the WL700.
Hope to hear from someone soon.
Woffels
woffels@hotmail.com
@ kfurge
many thanks for your excellent work and investigations !
as many others i finally worked it out to get a much better WL700g router than ASUS sold me !
there are a few issues, where i got into trouble and after reading completely this monster-thread, i found all relevant informations how to solve these issues. it seems that most people get into the same troubles if any.
1. forget to chmod the rc.local
2. problems when editing /opt/etc/sudoers
3. continous reboot of the router after editing /etc/passwd while there exists another /shares/MYVOLUME1/__pdc/passwd file with different content.
this led me to the idea, to update your instructions, and commentary at:
http://home.comcast.net/~kfurge/wl700ge.html
in order to prevent others to get in troubles.
there are only a few steps to watch, my proposal for the updated instructions in Step #5:
Step #5, Making a better system
1. Install the bash package for a better shell
2. Install the sudo package so you don't have to login as root to perform administrative functions (you can't login as root via ssh anyway)
3. Add a non-root <username> account via the web interface
4. Give yourself <username> supreme permissions in /opt/etc/sudoers, e.g.
# User privilege specification
root ALL=(ALL) ALL
<username> ALL=(ALL) ALL
5. Add /opt/bin/bash to /etc/shells (echo "/opt/bin/bash" >> /etc/shells)
6. Give yourself <username> a home directory (mkdir -p /opt/home/<username>; chown <username> /opt/home/<username>)
7. Modify /etc/passwd to make /opt/bin/bash your login shell and /opt/home/<username> your home directory (vi /etc/passwd). See here for a non-functional sample.
8. Optionally symlink yourself <username> directory into /shares/MYVOLUME1/MYSHARE1 if you want it accessable via cifs (Samba). This trick won't work for ftp, nfs or the web interface. You'll have to make your home directory in /shares/MYVOLUME1/MYSHARE1 if you want full access from all methods. (cd /shares/MYVOLUME1/MYSHARE1; ln -s /opt/home/<username>)
9. Within your .profile, add /opt/bin and /opt/lib to your PATH and LD_LIBRARY_PATH environment variables
10. Install dropbear and start it manually at first (/opt/etc/init.d/S51dropbear), then via rc.local, see the last rc.local file below.
11. Test your configuration if everything works fine and that you can login using ssh too.
12. WARNING: Before you test a reboot of your router, change the share management to use PBSA (Password Based Share Access) , then check if there exists the file /shares/MYVOLUME1/__pdc/passwd and remove it (rm /shares/MYVOLUME1/__pdc/passwd), then switch back to UBSA (User Based Share Access) and reboot your router. If everything works well you should be able to login by telnet and ssh.
13. Disable telnet from rc.local to completely eliminate any chance of root logins,
WARNING: test ssh login before commenting out utelnetd, otherwise you can lock out yourself of your router!
14. Install ncurses, ncursesw, and termcap packages for better terminal support. You may need to use the -force-overwrite option when installing ncurses.
15. Install man and man-pages packages, install hdparm package too, if you plan to use the APM features of your HDD
thanks again,
best regards,
--
tiwag
Thanks for the feedback. The section you referred to was more of a "stream of consciousness" than a step-by-step. I figured that if you'd gotten that far then the rest would be easy. ;-)
I've cut out your text and will put it on the website soon.
- K.C.
Fullback
10-08-2007, 04:53
7. Modify /etc/passwd to make /opt/bin/bash your login shell and /opt/home/<username> your home directory (vi /etc/passwd). See here for a non-functional sample.
** what do i add here? i have no clue Thank you. My username is Bhavdip that i made in the web interface. i can login via telnet. and i am on the "making a better system" and i been stuck on that. Sorry i don't understand unix systems very much. But i have made enhanced-ctorrent work :) on my router and it is operating great.
gratitude182
10-08-2007, 10:43
@fullback
you have to modify it as like this if this is your username (Bhavdip):
Bhavdip
root:PASSWORDXXXXX:0:42000:root:/:/bin/sh
user1:PASSWDORYYYYY:1001:42000:Bhavdip:/opt/home/Bhavdip:/opt/bin/bash
don't modify all before 1001:42000!!!! thats your password!
grat182