Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: ipkg upgrade b0rks my WL-700ge with kFurge 1.7.8_v2

  1. #1

    ipkg upgrade b0rks my WL-700ge with kFurge 1.7.8_v2

    Hi!

    I have been playing with my new WL-700ge and kfurge 1.7.8 v2 trying to get some functionality and learning.
    I have been following your excellent instructions on wl700g.homelinux.net thanks kfurge but when I try to ipkg upgrade, I get warnings when it tries to upgrade dropbear.
    If I let it overwrite, SSH and telnet is no longer accessible after a reboot and if I say no to overwrite it errors out of the update further on with:

    configuring dropbear

    mkdir: cannot create directory '/root': Operation not permited


    and I can no longer elevate to root.
    Any ideas? I have managed to recover the brick several times which has been an experience itself. I figured I wanted to keep it as up to date as possible as it will be directly connected to the internet.
    Thanks very much everyone.

  2. #2
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244

  3. #3
    Thanks Marc.
    I will try it this arvo.

  4. #4
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244
    Quote Originally Posted by Ganker View Post
    Thanks Marc.
    I will try it this arvo.
    arvo? Whatever that means, i hope it helped.
    Marc

  5. #5

  6. #6
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244
    Quote Originally Posted by Ganker View Post
    Marc

  7. #7
    If anyone works out a fix for this, I am most interested. I tried running a 'ipkg upgrade' from telnet root login as suggested by Marc, but this just reported that everything is up-to-date.

    To complicate things further, I only have telnet access for about 30 seconds after a boot. This makes my progress quite slow, to say the least.

    Any good ideas on ways to solve this particular problem within those 30 seconds?

    Does anyone have any ideas why I can't telnet in once those 30 seconds have passed?

    Getting a bit desperate here

    Edit: Ok, the good old trick of launching utelnetd from a cgi script gave me back a shell. So far so good!
    Edit: Aha! dropbear has started listening on port 2222 since upgrade. Nice to know (color me noob)! ssh logins are now working again.
    Last edited by AverySimonsen; 03-08-2008 at 20:49. Reason: Got smarter

  8. #8
    I am doing all my work at the start by logging as root, not admin.
    It does update everything cleaner however I can still not sudo as admin. I understand there is a list of sudo'ers in some config file that I can add admin to but I havn't looked into it yet.
    I am just being a windoze user and doing everything as root.
    Nice work on the 2222 port discovery. I will check it out. Maybe after finding the sudo fix I will update the documentation on the site.

    Avery, don't forget to apply the cpu eating patch! The box is much faster afterwards.

  9. #9
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244
    Quote Originally Posted by AverySimonsen View Post
    If anyone works out a fix for this, I am most interested. I tried running a 'ipkg upgrade' from telnet root login as suggested by Marc, but this just reported that everything is up-to-date.

    To complicate things further, I only have telnet access for about 30 seconds after a boot. This makes my progress quite slow, to say the least.

    Any good ideas on ways to solve this particular problem within those 30 seconds?

    Does anyone have any ideas why I can't telnet in once those 30 seconds have passed?

    Getting a bit desperate here

    Edit: Ok, the good old trick of launching utelnetd from a cgi script gave me back a shell. So far so good!
    Edit: Aha! dropbear has started listening on port 2222 since upgrade. Nice to know (color me noob)! ssh logins are now working again.
    I don't get this. Starting the brick will take at least 3 minutes, after which the power led blinks three times and your rc.local starts.
    KFurge has explained clearly the Asus firmware opens a telnet session for all the interfaces, including the WAN!, and that his fix disables this insecure behaviour and starts telnet on the local interfaces (LAN + WLAN) only.
    That explains why you have telnet for only 30 seconds.
    If you just wait somewhat longer you must have telnet forever. And dropbear for ssh.

    Please study http://wl500g.info/showthread.php?t=12615

    Marc

  10. #10
    Quote Originally Posted by mumsoft View Post
    I don't get this. Starting the brick will take at least 3 minutes, after which the power led blinks three times and your rc.local starts.
    KFurge has explained clearly the Asus firmware opens a telnet session for all the interfaces, including the WAN!, and that his fix disables this insecure behaviour and starts telnet on the local interfaces (LAN + WLAN) only.
    That explains why you have telnet for only 30 seconds.
    If you just wait somewhat longer you must have telnet forever. And dropbear for ssh.

    Please study http://wl500g.info/showthread.php?t=12615

    Marc
    Thanks, I was aware of that Trouble is I closed down utelnetd in my rc.local and on top of that dropbear suddenly decided to listen on port 2222 in stead of 22. Still no idea how to change this - haven't looked that much into it anyway. Not that much of a problem once you're aware of the port change.

    Edit: Found where the port 2222 came from. It's specified in /opt/etc/default/dropbear on my box. The init.d script takes the port from there.
    Last edited by AverySimonsen; 06-08-2008 at 21:16.

  11. #11
    This is my updated instructions based off kfurges details at http://wl700g.homelinux.net/portal/content/view/59/28/

    Can you all please comment and then I will fix it up and submit to replace the old doco.


    Type italics exactly as written

    So you have re-flashed with the kfurge 1.7.8 v2 firmware?
    Time to do some tweaking.

    1: Log into the router via telnet (port:23) using the username: root and your web interface password.
    2: Copy the existing /opt directory to /shares/MYVOLUME1
    (cd /; tar cf - opt) | (cd /shares/MYVOLUME1; tar xf -)
    3: Cycle power on the router with the front power button, Wait 3 minutes and repeat step 1.
    4: Type in
    mount -o bind /shares/MYVOLUME1/opt /opt
    5: Update the optware packages and descriptions to the latest versions
    ipkg update
    ipkg upgrade
    6: Install nano, which is a text editor
    ipkg install nano
    7: Edit the list of users who are allowed to sudo
    nano /opt/etc/sudoers
    8: Copy the line begining with "root" and substitute for "admin" to allow the admin use to elevate privileges.
    9: Edit the dropbear (ssh service) config to change ssh port back to 22 from 2222.
    nano /opt/etc/default/drop
    10: Edit your rclocal to modify the library path for compatibility and to add the cpu load reducing patch.
    nano /opt/etc/rc.local
    Add the line below to free up more cpu time. It should be added in the section that only runs once on reboot.
    echo "interrupt=no" > /proc/miscio/power_enable_config
    Change your lib path to include make sure it inclues /lib and /opt/lib. It should look something like:
    'export LD_LIBRARY_PATH=/lib:/opt/lib: (whatever was here before)'
    10: Reboot the router using the button on the front of the unit. It takes about 3 minutes to fully re-start. Always login via ssh (port 22) and use the admin account or whatever you changed it to. To apply commands as root use:
    sudo bash -l
    in future to lessen the chance of making a mistake.

    Install additional packages as required using the ipkg command. A full list of all packages can be found at:
    http://www.nslu2-linux.org/wiki/Optware/Packages

    Modify (nano) /opt/etc/rc.local as necessary to start them.

    Notes:
    * Updating this as admin elevated to root fails in several places. That is why I suggest using root instead.
    * Dropbear changes to port 2222 for some reason so we change it back
    * We update the lib path to allow things like Twonky to see the lib folder it requires to start and reduce confusion with other apps not starting correctly.
    Last edited by Ganker; 07-08-2008 at 07:00. Reason: fixed accidental frown smilie on one line

  12. #12
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244
    Quote Originally Posted by Ganker View Post
    This is my updated instructions based off kfurges details at http://wl700g.homelinux.net/portal/content/view/59/28/

    Can you all please comment and then I will fix it up and submit to replace the old doco.

    [cut]
    I am quite sure that either asus or Kfurge already have done what is needed to eliminate the need for:
    Add the line below to free up more cpu time. It should be added in the section that only runs once on reboot.
    echo "interrupt=no" > /proc/miscio/power_enable_config
    Furthermore, the documentation you mention is not well kept up-to-date. I would rather refer to:
    http://wl700g.homelinux.net/drupal/?q=node/134

    regards,
    Marc

  13. #13
    Quote Originally Posted by Ganker View Post
    6: Install nano, which is a text editor
    ipkg install nano

    7: Edit the list of users who are allowed to sudo
    nano /opt/etc/sudoers
    8: Copy the line begining with "root" and substitute for "admin" to allow the admin use to elevate privileges.

    9: Edit the dropbear (ssh service) config to change ssh port back to 22 from 2222.
    nano /opt/etc/default/drop

    10: Edit your rclocal to modify the library path for compatibility and to add the cpu load reducing patch.
    nano /opt/etc/rc.local

    Change your lib path to include make sure it inclues /lib and /opt/lib. It should look something like:
    'export LD_LIBRARY_PATH=/lib:/opt/lib: (whatever was here before)'
    I'll throw in my 0.02...

    Regarding:

    #6. Real men use vi (which is included). ;-)

    #7/8. I'm not sure of the value of this step... I added the admin account just to provide a consistent login experience with the web gui. I intended real work to be done as root. You can sudo from the admin account to root. (i.e. use "sudo bash").

    #9. This is legit. Seems the optware pkg changed.

    #10. Don't need this patch any more. Asus fixed it. Don't think you need the additional LD_LIBRARY_PATH goodies either. What doesn't work without them?

    - K.C.

  14. #14
    Quote Originally Posted by kfurge View Post
    I'll throw in my 0.02...

    Regarding:

    #6. Real men use vi (which is included). ;-)

    #7/8. I'm not sure of the value of this step... I added the admin account just to provide a consistent login experience with the web gui. I intended real work to be done as root. You can sudo from the admin account to root. (i.e. use "sudo bash").

    #9. This is legit. Seems the optware pkg changed.

    #10. Don't need this patch any more. Asus fixed it. Don't think you need the additional LD_LIBRARY_PATH goodies either. What doesn't work without them?

    - K.C.
    6: Typing vi didn't work for me. Didn't try before ipkg upgrade. Are you sure it is installed with your 1.7.8 v2 pkg?

    7/8: Got errors with ipkg upgrade for several packages without using root. Probably got to do with different user path statements but I didn't troubleshoot that much. Found it worked straight away with root. If you upgrade sudo ipkg, it doesn't actually keep admin in the sudoers file. Try it because then if you are following the instructions and don't know root works you get stuck.

    10. Wasn't sure about the patch. Twonky wouldn't start without changed LD_LIBRARY_PATH as stated in http://www.wl500g.info/showthread.php?t=7945 as twonky wants something in the default asus lib path.

    Thanks K.C for this distro is a great base and playing with it has taught me much. I think that it does need a upnp media server in it though, that is why I installed Twonky. Lots of people like a console or media server connected to their TV these days. Mt-daapd is a bit limited.

    I think a torrent server that has a scheduler would we sweet to but the only ones I can find are resource hogs. You can't have everything I guess.

  15. #15
    Quote Originally Posted by mumsoft View Post
    Furthermore, the documentation you mention is not well kept up-to-date. I would rather refer to:
    http://wl700g.homelinux.net/drupal/?q=node/134

    regards,
    Marc

    That is the developer documentation AFAIK (plus it is out of date anyway, which is what we are also talking about) so it is not immediately obvious people should be reading that. It seems natural to read the links refferenced on the main page.

    I am just trying to save others from having to troubleshoot the same issues it seems myself and many others have. I don't mind writing documentation. It is part of my real job Call me a dork. Plus I have reasonably fresh eyes when it comes to this, I don't have a lot of exp in linux like many people who bought this tiny white god.

Page 1 of 2 12 LastLast

Similar Threads

  1. Installationsproblem mit ipkg
    By fakehero in forum German Discussion - Deutsch (DE)
    Replies: 7
    Last Post: 21-01-2008, 10:44
  2. ipkg can't configure anymore: syntax error...
    By mumsoft in forum WL-700g Q&A
    Replies: 2
    Last Post: 20-01-2008, 08:46
  3. ipkg cannot upgrade
    By kevin_long in forum WL-500gP Firmware Discussion
    Replies: 4
    Last Post: 23-07-2007, 13:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •