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.
Printable View
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.
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.
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"?
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.
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/HowT...orRemoteAccess
and I see the following comment:
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.Code: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
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.
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.
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
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!
@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/op...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! :)
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.
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.
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.
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?
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
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.
@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 :)
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.