:edit:
Hmm I seem to have lost my sda_part2 partition. Its there in Drive info but is [not available] under the samba settings and nowhere to be seen through SSH.
Do I have to add something to the startup script to get it to mount now that the opkg stuff is working?
:edit2:
This is killing me now. Ive tried repartitioning different ways, swap, no swap, different order of partitions etc but still cant get anywhere with the data partition.
First (Optware) partition is always found and mounted but nothing after that. If I transfer to p1 then plug the hdd back into linux its all there but nadda for the data partition.
All partitions are shown in Services/USB/Disc Info just cant get to them
All I get with mount is:
rootfs on / type rootfs (rw)
Code:
/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 /tmp/mnt/sda_part1 type ext2 (rw,relatime,errors=continue,user_xattr)
Really struggling at the mo, my linux is not this strong...
ls -hla /dev and dmsge are attached as well, hoping they show some insight.
First off I want to thank 'dynek' for his tutorial, and all the members that are reading this post.
Using: WNDR3800 running (at the time of the install) 10-12-12-r20119-testing since then moved back to 07-20-12-r19519.
My USB drive initial configuration:
MBR partitioned:
1st (sda1) ~450GB of data (ext 3)
2nd (sda2) 25GB of data (ext 3)
3rd (sda3) ~450GB of data (NTFS)
4th (sda4) 2GB partition for OpenWRT (named the partition OptWare)
Followed all instructions and kept changing 'sda_part1' with OptWare as I have created a mount point /tmp/mnt/OptWare (I have also created a mount point for the other three partitions but they weren't involved in the install).
I had no problems going through all the instructions and the places where packages have been switched for newer ones went without a hitch.
My problem started once the last reboot happened as since then the only partition that is automounting is sda1 under 'sda_part1'. What is confounding me is that I have changed all the 'sda_part1' with 'OptWare' and yet after reboot for some reason it picks sda1 (not sda4) and mounts it as 'sda_part1'.
Since then I have hoped to start over so I reflashed my router with an 'older' FW (07-20-12-r19519), and asked for all the settings to be moved back to default.
Even after all that I still have only sda1 being automounted under 'sda_part1'.
Could anyone help me with setting my router so all the settings are back to normal and 'sda_part1' does not get mounted any more? What file should I look into/change to make this happen?
Also, what I find strange is that when I tried to use a Web GUI to run following commands 'mount -t ext 3 -o rw /dev/sda1 /mnt/optware' (since then I have re-formated my HD and put optware as sda1) nothing happens but when I run that command within the SSH session it works fine.
Edit - I built a second router and followed my own instructions. The original posting has been revised in-place for clarity.
I'm completely new to DD-WRT and had a difficult time reading hundreds of posts in order to figure out how to install Optware onto a WNDR3700v1. My goal was to create an http server for the Roksbox movie player, using an USB attached 500 GB hard drive. I also wanted to install a DLNA server. Fellow newbies, I hope this summary helps you out.
Background:
SSH is used to remote login into the router. I used putty.exe to ssh into the router. Be sure to turn on "SSHd" under the router config "Services->SSHd->enable". Use puttygen.exe to create a public passkey; paste into the router SSHd "Authorized Keys." In putty.exe, link to the private key under "Putty->connection->SSH->Auth".
DD-WRT Versions
I found, with great pain and suffering, that DD-WRT doesn't flash on all WNDR3700 V1 routers. It kept bricking the router. I ended having to flash build 17201, which ultimately wasn't compatible with minidlna (got segmentation faults). I finally found that I could flash from build 17201 to 19342 without bricking. This write-up is for a WNDR3700V1 with DD-WRT std - build 19342.
Set it as a service
chmod a+x /opt/etc/init.d/lighttpd ln -s /opt/etc/init.d/lighttpd /opt/etc/init.d/S80lighttpd
Mount data partition, utilize swap partition, and start lighhtpd using the "Administartion->Commands-> Save Startup":
#!/bin/sh
sleep 5
/bin/busybox swapon /dev/sda2
sleep 2
if [ -f /mnt/sda_part1/optware.enable ]; then
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/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 2
mount -t ext3 /dev/sda3 /mnt
/opt/etc/init.d/lighttpd
sleep 2
minidlna -f /opt/etc/config/minidlna.conf
Install minidlna opkg install minidlna
Also change the following:
rm /opt/etc/config/minidlna
vi /opt/etc/config/minidlna.conf and add the following:
#port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interface to bind to (this is the only interface that will serve files)
network_interface=br0
# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
# can prepend the type, followed by a comma, to the directory:
# + "A" for audio (eg. media_dir=A,/home/jmaggard/Music)
# + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)
# + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
media_dir=A,/mnt//Music
media_dir=V,/mnt/Videos
#media_dir=P,/mnt/Pictures
# set this if you want to customize the name that shows up on your clients
friendly_name=Media Server
# set this if you would like to specify the directory where you want MiniDLNA to store its database and alb
db_dir=/mnt/tmp/minidlna
# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg
# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes
# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no
# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
# which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no
# default presentation url is http address on port 80
presentation_url=http://192.168.1.1:8200/
# notify interval in seconds. default is 895 seconds.
notify_interval=900
# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1
Enable Samba (allows you to read/write to drive from Win 7):
"Services->NAS->Samba->enable" (leave everything else blank of disabled
add path to "/tmp/mnt;" name it "USB Drive;" check "Public" and "Read/Write"
Reboot
In Win 7, computer, connect network drive, browse to router IP.
Lessons Learned
My USB attached hard drive didn't show up as a disc, but instead as /dev/sda1 (Optware ext3 partition), /dev/sda2 (linuxswap partition), and /dev/sda3 (Data ext3 partition)
Edit
I wanted to create a script that will generate an html file linking all the movie poster art to the movie itself. The script is below:
Posted: Wed Dec 12, 2012 4:06 Post subject: Re: WNDR3700 v1 using DD-WRT v24-sp2 (03/19/12) std r18777
fusiooon wrote:
This is an excellent tutorial, thank you dynek!!
To start I have a WNDR3700 v1 running DD-WRT v24-sp2 (03/19/12) std (SVN revision 18777).
I followed the tutorial in the original post and everything seemed to be OK after section 8, run opkg update, which ran as described.
Obviously I had to change the libc package in section 5 to:
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_618-2_ar71xx.ipk
ipkg install libc_0.9.33.2-1_ar71xx.ipk opkg_618-2_ar71xx.ipk
as there is a new version.
A problem arose when I actually tried to install any packages. Having listed all the packages I noticed Snort. After issuing the command opkg install snort I got an error that the dependencies libc * libc * libc * libc * were missing and that installation could not be completed. This happened when trying to install any package.
I solved it by manually reinstalling libc using opkg:
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
Hope this helps.
PS: I haven't tried this but this may also work: Skip the libc install in section 5:
Code:
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-2_ar71xx.ipk
ipkg install opkg_618-2_ar71xx.ipk
and apply my fix in section 8.
Thanks I was getting the "* libc * libc * libc * libc * libc * libc * " error when trying to install anything. This was the fix.
Does anyone know what the reason a Bus Error would appear when trying to start a service (Asterisk) in my case?
This has been working perfectly for over 6 months, had power drop on the router, after it rebooted, I'm getting this error.
I've verified space is not an issue I have 3.1GB's free on a 4 Gig USB. I'm reboot and power reset the router, still not luck in getting the service back started. Help please.
Posted: Wed Dec 26, 2012 19:45 Post subject: Re: WNDR3700 v1 using DD-WRT v24-sp2 (03/19/12) std r18777
nux1 wrote:
fusiooon wrote:
This is an excellent tutorial, thank you dynek!!
To start I have a WNDR3700 v1 running DD-WRT v24-sp2 (03/19/12) std (SVN revision 18777).
I followed the tutorial in the original post and everything seemed to be OK after section 8, run opkg update, which ran as described.
Obviously I had to change the libc package in section 5 to:
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_618-2_ar71xx.ipk
ipkg install libc_0.9.33.2-1_ar71xx.ipk opkg_618-2_ar71xx.ipk
as there is a new version.
A problem arose when I actually tried to install any packages. Having listed all the packages I noticed Snort. After issuing the command opkg install snort I got an error that the dependencies libc * libc * libc * libc * were missing and that installation could not be completed. This happened when trying to install any package.
I solved it by manually reinstalling libc using opkg:
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
Hope this helps.
PS: I haven't tried this but this may also work: Skip the libc install in section 5:
Code:
cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-2_ar71xx.ipk
ipkg install opkg_618-2_ar71xx.ipk
and apply my fix in section 8.
Thanks I was getting the "* libc * libc * libc * libc * libc * libc * " error when trying to install anything. This was the fix.
I really appreciated
It solve my problem too _________________ Netgear R7000
(Latest SVN revision)
Does anyone know what the reason a Bus Error would appear when trying to start a service (Asterisk) in my case?
This has been working perfectly for over 6 months, had power drop on the router, after it rebooted, I'm getting this error.
I've verified space is not an issue I have 3.1GB's free on a 4 Gig USB. I'm reboot and power reset the router, still not luck in getting the service back started. Help please.
Ok I did a lot of problems solving and don't necessarily know which thing I did fixed it. The last thing that I did was this:
Code:
root@DD-WRT root $ opkg list-upgradable
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
asterisk18 - 1.8.10.0-1 - 1.8.10.1-4
asterisk18-voicemail - 1.8.10.0-1 - 1.8.10.1-4
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
libpthread - 0.9.33-104 - 0.9.33.2-1
asterisk18-format-sln - 1.8.10.0-1 - 1.8.10.1-4
asterisk18-sounds - 1.8.10.0-1 - 1.8.10.1-4
asterisk18-app-system - 1.8.10.0-1 - 1.8.10.1-4
zlib - 1.2.5-1 - 1.2.7-1
asterisk18-app-mixmonitor - 1.8.10.0-1 - 1.8.10.1-4
libopenssl - 1.0.1-1 - 1.0.1c-1
asterisk18-codec-g726 - 1.8.10.0-1 - 1.8.10.1-4
root@DD-WRT root $ opkg upgrade asterisk18
I then when through and updated each of the packages stated above. After that I ran Asterisk -C and it synced right up.
So which of these was the culprit? I have no idea however now it's working and I'm happy!
Posted: Thu Jan 03, 2013 17:49 Post subject: Update
Ok, came back to this after some reading and fiddling.
Basically my problem was /mnt/sda_part2 was getting 'deleted' after a reboot.
I had to manually mkdir -p /mnt/sda_part2 everytime.
Everything else was working great using the OPs guide, and some of the above. Many many thanks to you all!
I solved this by adding a file called 'mountsda2.enable' in the same place as 'optware.enable' and added this to the startup command:
#!/bin/sh
sleep 5
/bin/busybox swapon /dev/sda2
sleep 2
if [ -f /mnt/sda_part1/optware.enable ]; then
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
else
exit
fi
sleep 2
if [ -f /mnt/sda_part1/mountsda2.enable ]; then
mkdir -p /mnt/sda_part2
mount -t ext3 /dev/sda3 /mnt/sda_part2
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
This probably isnt the best way to do it but it works and my 230gb data partition is mounted after a reboot
Now could someone tell me how I can tell if the swap partition is active and being used?
Posted: Sat Jan 05, 2013 16:29 Post subject: Mysql over OPTWARE
using these guides i got my WDR3600 with optware+lighttpd+php but i cant finish mysql instalation, can someone help me?
i installed it by opkg command, it goes all right but i cant start it, tried a lot of differente combinations and configs and got a lot of diferent errors.
Posted: Wed Jan 09, 2013 14:46 Post subject: Read-Olnly mounts
For a long time everything works fine on my router tp-link 1043 with dd-wrt + 500Gb HD + Transmission.
Suddenly transmission start an error, when I check I found following situation:
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 /tmp/mnt/sda_part1 type ext2 (ro,relatime)
/dev/sda1 on /etc type ext2 (ro,relatime)
/dev/sda1 on /tmp/root type ext2 (ro,relatime)
/dev/sda1 on /opt type ext2 (ro,relatime)
/dev/sda2 on /tmp/mnt/sda_part2 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
Devices mounted on /dev/sda1 are RO.
Someone could help-me to found why this is happening.
PS: /tmp/mnt/sda_part1 are mount automatically, configured by GUI from dd-wrt and it works mounting as RW, but when it runs the script to mount the others it turns to RO
These are commands I use mount in the script:
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
ntfs-3g -o rw /dev/sda2 /mnt/sda_part2
Posted: Thu Jan 24, 2013 3:58 Post subject: Loss of private/public key functionality
I use private/public key to ssh into my router. After executing the following command, the private/public key login fails to work. The normal password based ssh login continues to work:
Posted: Mon Feb 04, 2013 14:34 Post subject: Mounting a 1TB USB drive
This is a great list and many thanks for sharing it.
I have a 1TB USB drive (Western Digital Smartbook) that needed some additional startup script options.
Instead of
sleep 5
in the startup script, I needed to have
/sbin/udevtrigger
sleep 15
The udevtrigger is needed for some larger USB drives that take a little time to spin up and initialize. The added sleep time gives time for the udev scripts which automount the drive when detected.
Posted: Thu Feb 14, 2013 19:16 Post subject: Linksys wrt160nl ruter use r20453 firmware.
Hi,
I have wrt160nl ruter.
I currently use 14929 build firmware.
I would like to switch firmware r20453.
My problem is, I didn't mount pen drive and use nvram.
How to use nvram via pen driver.
Currently, I need to install it. (r14929)