[Howto] Install Optware on Atheros units (such as WNDR3700)

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3 ... 26, 27, 28, 29, 30, 31  Next
Author Message
tazman1937
DD-WRT Novice


Joined: 03 Jan 2013
Posts: 25

PostPosted: Sat Jan 18, 2014 6:42    Post subject: optware with build 23320 Reply with quote
Hello all,

I have a WNDR3700v1
Was happily running optware w/ transmission, lighthttpd, minidlna, others...

Upgraded to build 23320.

BAD NEWS BEARS.

Auto-mount doesn't give you a GUI option for mount location (always goes to /tmp/mnt), meaning you'll have to write your own mounting script (?! steps backwards!).

ipkg doesn't want to update, upgrade, or install.

I get usual missing whiterussian,non-free, and backports... but libc won't unpack or load in any way, shape or form.... do I lack permissions??!

Also, as of this writing (1/18/14), opkg isn't in the ar71xx trunk (?!?!? WHAT THE HELL?)

someone please halp or explain what's happened in 23320 / 2014
Sponsor
routvol
DD-WRT User


Joined: 02 Feb 2009
Posts: 87

PostPosted: Fri Feb 07, 2014 22:40    Post subject: Re: optware with build 23320 Reply with quote
tazman1937 wrote:
Hello all,

Auto-mount doesn't give you a GUI option for mount location (always goes to /tmp/mnt), meaning you'll have to write your own mounting script (?! steps backwards!).

someone please halp or explain what's happened in 23320 / 2014


I have the same problem.
In the tab services/usb there are only 2 fields to automount to /opt and /jffs.
/mnt is missing, installing opkg does not work for me either.

mount looks like this:
Code:

root@DD-WRT:/# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512K)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /opt type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=writeback)


can someone advise?

_________________
my dd-wrt configuration:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=682296
xakep
DD-WRT User


Joined: 23 Jun 2008
Posts: 71
Location: Brooklyn, NY

PostPosted: Sun Feb 09, 2014 2:52    Post subject: Reply with quote
Guys can anyone finally update OP with instructions that actually work ? I mean come on moderatior if you see totally wrong instructions that no longer valid , update topic with **OUTDATED AS OF XXXX* etc, do your duty.

Also is there an updated or clear tutorial that works with latest r23503 to install optware from clean DD-WRT installation and unformatted HDD ? I mean I had this topic for years now and always I saw people updating it and even I suggested few things that was not correct in OP. Now I see nothing.

If possible can you point me to tutorial on how to install optware on external flash/stick with 3700v1.

I know because people who actually know what to do is not that many but if you do know please point us in to right direction.
Thank you !

_________________
=================================
|We Have What it Takes ...I think.|
=================================
bridges86406
DD-WRT Novice


Joined: 25 Feb 2012
Posts: 33

PostPosted: Sun Feb 09, 2014 3:43    Post subject: Re: optware with build 23320 Reply with quote
routvol wrote:
tazman1937 wrote:
Hello all,

Auto-mount doesn't give you a GUI option for mount location (always goes to /tmp/mnt), meaning you'll have to write your own mounting script (?! steps backwards!).

someone please halp or explain what's happened in 23320 / 2014


I have the same problem.
In the tab services/usb there are only 2 fields to automount to /opt and /jffs.
/mnt is missing, installing opkg does not work for me either.

mount looks like this:
Code:

root@DD-WRT:/# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512K)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /opt type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=writeback)


can someone advise?


Let me see if I can help you. I just did the upgrade myself. I'm pretty rough on Linux but I have a couple books and can get myself around when I need to.

So..........**********Disclaimer********** This worked for me but could seriously screw up your life, I take no responsibility for your busted Optware, router if this doesn't work for you.

Little about my previous setup:
My build was 20675 02/11/13
My router is a Buffalo WZR-HP-AG300H
I am using a USB flash drive formatted to ext2
My mount was /mnt/
Opt was installed at /mnt/sda_part1/Opt

Here are the steps I took to upgrade from previous version to this one.

1) Log into SSH (Putty) and enter the following command based on your current mount point.
Code:
mv /mnt/sda_part1/optware.enable /mnt/sda_part1/optware.disable

2) Reboot the router
3) Upgrade the router via webgui (I went to 23320)
* Just reset to default settings, no need to Hard Reset
4) Setup the router, per your liking
5) Turn on SSH and USB Support per the guide in post OP
6) Insert Startup script per OP (see mine below)

Code:

#!/bin/sh

sleep 5
/bin/busybox swapon /dev/sda2

sleep 10
if [ -f /opt/optware.enable ]; then
mount -o bind /opt/etc /etc
mount -o bind /opt/root /tmp/root
mount -o bind /opt/opt /opt
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi

sleep 10
/opt/usr/sbin/asterisk -C /opt/etc/asterisk/asterisk.conf

sleep 2
mkdir -p /var/spool/asterisk/voicemail/default/105
cp -p /opt/unavail.wav /var/spool/asterisk/voicemail/default/105
cp -p /opt/greet.wav /var/spool/asterisk/voicemail/default/105

* some of my Startup is not applicable to you, as I have it setup to do some Asterisk trickery Smile
7) Reboot the router
8 ) Now to copy over the settings (this may or may not be necessary). SSH into the router and enter the following command:
Code:
cp -a /etc/* /opt/etc/

* I got some errors when I did this, however I don't remember what they were. As I said this may or may not be necessary.
9) Lastly, turn back on your Optware
Code:
mv /opt/optware.disable  /opt/optware.enable


This should keep Optware functioning through upgrades to the builds, unless a drastic change is made.
routvol
DD-WRT User


Joined: 02 Feb 2009
Posts: 87

PostPosted: Sun Feb 09, 2014 10:06    Post subject: Reply with quote
If I understand correctly our problem is the following:
/mnt cannot be used as mountpoint directly within the services tab,

Replacing /mnt with /opt does not seem to work.
Although I can update via "opkg update" I cannot install a package because it complains about a missing dependency "libc".

So we can either downgrade to a dd-wrt version where /mnt can be used as mountpoint or change the mounts/scripts.

I played around for 1 hour now, but can't find out the correct combination.

@bridges86406: Note that you are assuming already that optware was installed on /mnt/sda_part1/Opt which is not the case for us.

_________________
my dd-wrt configuration:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=682296
bridges86406
DD-WRT Novice


Joined: 25 Feb 2012
Posts: 33

PostPosted: Sun Feb 09, 2014 14:47    Post subject: Reply with quote
routvol wrote:
If I understand correctly our problem is the following:
/mnt cannot be used as mountpoint directly within the services tab,

Replacing /mnt with /opt does not seem to work.
Although I can update via "opkg update" I cannot install a package because it complains about a missing dependency "libc".

So we can either downgrade to a dd-wrt version where /mnt can be used as mountpoint or change the mounts/scripts.

I played around for 1 hour now, but can't find out the correct combination.

@bridges86406: Note that you are assuming already that optware was installed on /mnt/sda_part1/Opt which is not the case for us.


Actually I didn't assume anything. I told you what my prior mount point was; I then told you what I did to make my previous mount point work with the new mount point given via the upgrade. Have you even tried what I suggested?

If your previous mount point was /mnt/xysyxyxys/opt or /mnt/mymountpointis/screwed with the new upgrade your mount point would be /opt/opt or /opt/screwed. Have you checked /opt/opt to verify if your Optware setup is still there?

About libc, do you have that package installed? If not have you tried installing it? My opkg has libc and libgcc installed.
nullifier
DD-WRT Novice


Joined: 02 Jan 2007
Posts: 19

PostPosted: Mon Feb 17, 2014 2:21    Post subject: Fixing OP Reply with quote
Code:
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
opkg install libc_0.9.33.2-1_ar71xx.ipk


This fixes the libc problem.

If you turn on automounting (which is the easiest method) the original install script should instead be:
Code:

cd /mnt
mkdir /sda1
cd /mnt/sda1
mkdir etc opt root
touch optware.enable
chmod 755 etc opt root
mkdir opt/lib
chmod 755 opt/lib
cp -a /etc/* /mnt/sda1/etc/
mount -o bind /mnt/sda1/etc /etc
mount -o bind /mnt/sda1/opt /jffs


And the startup script changes to:
Code:
#!/bin/sh

sleep 5
if [ -f /mnt/sda_part1/optware.enable ]; then
mount -o bind /mnt/sda1/etc /etc
mount -o bind /mnt/sda1/root /tmp/root
mount -o bind /mnt/sda1/opt /opt
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi
gyurman
DD-WRT Novice


Joined: 16 Sep 2013
Posts: 5

PostPosted: Thu Feb 20, 2014 22:00    Post subject: Re: Fixing OP Reply with quote
Thanks Idea nullifier
VaMPiRiC_CRoW
DD-WRT User


Joined: 26 Mar 2008
Posts: 77
Location: pt

PostPosted: Tue Mar 18, 2014 15:10    Post subject: Reply with quote
Off Topic:

After install Optware on my router, how can I install and configure NFS Server for my USB drive? The configuration will have a GUI, or will be by command line?

Thanks for this Tutorial! Wink

_________________
Netgear WNDR3700 v1 | DD-WRT v24-sp2 (05/19/15) std - build 26947M
gyurman
DD-WRT Novice


Joined: 16 Sep 2013
Posts: 5

PostPosted: Wed Mar 19, 2014 19:11    Post subject: Reply with quote
http://www.dd-wrt.com/wiki/index.php/NFS
Jotao_GZ
DD-WRT Novice


Joined: 22 Apr 2014
Posts: 1

PostPosted: Tue Apr 22, 2014 19:41    Post subject: Help Wdr4300 Reply with quote
unlucky1 wrote:
msantos2007, you are awesome.



I Need Help. plz

-sh: opkg: not found
corrinewinslow
DD-WRT Novice


Joined: 28 Apr 2014
Posts: 9

PostPosted: Wed Apr 30, 2014 6:17    Post subject: [Howto] Install Optware on Atheros units - Reply with quote
Amended HOWTO after reading 27 pages ...

I did this on a Buffalo WZR-HP-AG300H running build 23919

1. Prepare the USB disk
    Create an ext3 partition using GParted for instance


2. Configure DD-WRT
    Under Services->Services->Secure Shell:
    * Enable SSHd
    * Click Apply Settings

    Under Services->USB:
    * Enable Core USB Support
    * Disable USB Printer Support (enable it if you need printing support)
    * Enable USB Storage Support
    * Enable Automatic Drive Mount
    * Set Disk Mount Point to /mnt
    * Click Apply Settings


3. Plug the USB drive into the router and reboot it
    * SSH into your box using user root and make sure, using mount, that your USB stick was mounted correctly (you can also check this on the web interface under Services->USB).

4. Create and prepare necessary structure
    * SSH into your box using user root if not already done at previous step:

Code:
cd /mnt/sda1
mkdir etc opt root
touch optware.enable
chmod 755 etc opt root
mkdir opt/lib
chmod 755 opt/lib
cp -a /etc/* /mnt/sda1/etc/
mount -o bind /mnt/sda1/etc /etc
mount -o bind /mnt/sda1/opt /jffs

5. Install the required libraries for the MIPS (big-endian) architecture and OpenWRT's opkg
Code:
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-6_ar71xx.ipk
ipkg install libc_0.9.33.2-1_ar71xx.ipk opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-6_ar71xx.ipk


You will get the following output with error messages. You can't avoid it so don't worry about it.

    ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian
    You probably want to run `ipkg update'
    ERROR: File not found: //usr/local/lib/ipkg/lists/non-free
    You probably want to run `ipkg update'
    ERROR: File not found: //usr/local/lib/ipkg/lists/backports
    You probably want to run `ipkg update'
    Unpacking libc...Done.
    Configuring libc...Done.
    ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian
    You probably want to run `ipkg update'
    ERROR: File not found: //usr/local/lib/ipkg/lists/non-free
    You probably want to run `ipkg update'
    ERROR: File not found: //usr/local/lib/ipkg/lists/backports
    You probably want to run `ipkg update'
    Unpacking opkg...Done.
    Configuring opkg...Done.

    Type the following lines to create the configuration file for opkg:


Code:
cat > /etc/opkg.conf << EOF
src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
dest root /opt
dest ram /opt/tmp
lists_dir ext /opt/tmp/var/opkg-lists
EOF


    Let's make sure everything works properly:


Code:
mount -o bind /mnt/sda1/root /tmp/root
mount -o bind /mnt/sda1/opt /opt
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
opkg update




6. Set the startup script to make the changes take effect each time upon reboot

    Under DD-WRT’s web interface, Administration->Commands, input the following commands in the window then click "Save Startup":

Code:
#!/bin/sh

sleep 5
if [ -f /mnt/sda1/optware.enable ]; then
mount -o bind /mnt/sda1/etc /etc
mount -o bind /mnt/sda1/root /tmp/root
mount -o bind /mnt/sda1/opt /opt
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi


    Note that some users have reported issues that they were able to fix by making the script sleep 10 seconds instead of 5.


7. Modification of the profile file

    SSH into your box then copy/paste the commands below to PuTTY window to create a script running each time when user root logins:

Code:
cat > /mnt/sda1/root/.profile << EOF
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib:/opt/usr/local/lib'
export PATH='/sbin:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/usr/bin:/usr/sbin:/opt/usr/local/bin'
export PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
export TERMINFO='/opt/usr/share/terminfo'
EOF


    The above script will set the variables for us and also provide a nice colored command line prompt.


8. Reboot and check

    Reboot your device with reboot
    When it's back on the track, SSH into your box.
    Run
    Code:
    opkg update
Geoff42
DD-WRT Novice


Joined: 24 Apr 2014
Posts: 9

PostPosted: Thu May 01, 2014 9:08    Post subject: Reply with quote
Don't forget that if you create your own writable /etc, as above, then when you update the firmware, you will need to update your copy of /etc. Thus when updating from 23898 to 23919, if you fail to update /etc, the web interface does not work properly. This is probably because /etc/www has been updated.

What you need to do when updating the the firmware is to disable your writable /etc. Then you need to find where your writable version is temporarily mounted and save it. E.g. mine lives on /jffs so :-

cd /jffs
mv etc etc.old
mkdir etc
cp -a /etc/* /jffs/etc/

Then you can compare them to see what files in the new copy you may need to modify.

cd /jffs
ls -alftr etc.old

This directory listing is sorted by date and it should therefore be easy to spot which files in the old etc you have modified and you can then decide what to do about it. I ended up copying over my versions of :-
profile hosts ethers passwd group ipkg.conf & TZ
In some cases it involves deleting the link to /tmp before copying the old file to the new directory.
Once you have that sorted out you can re-enable the mounting of /etc and probably reboot.

Geoff
james3
DD-WRT Novice


Joined: 28 Apr 2014
Posts: 10

PostPosted: Thu May 01, 2014 18:36    Post subject: activate Transmission Daemon Reply with quote
I installed last beta 23919 on my Netgear WNDR4300

Could anyone help me to install transmission so i can use my router to donwload torrent into the attached 320GB usb drive?

thanks

I followed the old guid but didn't worked for me
routvol
DD-WRT User


Joined: 02 Feb 2009
Posts: 87

PostPosted: Mon May 05, 2014 19:47    Post subject: Reply with quote
this solved my optware problems:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=894618#894618

_________________
my dd-wrt configuration:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=682296
Goto page Previous  1, 2, 3 ... 26, 27, 28, 29, 30, 31  Next Display posts from previous:    Page 27 of 31
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum