Posted: Sat Jan 18, 2014 6:42 Post subject: optware with build 23320
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
Posted: Fri Feb 07, 2014 22:40 Post subject: Re: optware with build 23320
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)
Joined: 23 Jun 2008 Posts: 71 Location: Brooklyn, NY
Posted: Sun Feb 09, 2014 2:52 Post subject:
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.|
=================================
Posted: Sun Feb 09, 2014 3:43 Post subject: Re: optware with build 23320
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.
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
* some of my Startup is not applicable to you, as I have it setup to do some Asterisk trickery
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.
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
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.
Posted: Mon Feb 17, 2014 2:21 Post subject: Fixing OP
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
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! _________________ Netgear WNDR3700 v1 | DD-WRT v24-sp2 (05/19/15) std - build 26947M
Posted: Wed Apr 30, 2014 6:17 Post subject: [Howto] Install Optware on Atheros units -
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:
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.