Asus RT-N13U B1 - DD-wrt thread

Status
Not open for further replies.
Optware is not the right way I say it again you were getting permisssion denied setup since you didn't setup correctly at first places. The optware guide unnecessarily install programs which u won't ever be using and also it occupies memory
 
@dinjo

hmm if u insist i can try installing by your method AGAIN. but i must say i tried it just as it was in your guide.

here just to be precise here is what i did :-

Formatted a usb drive in ubuntu as 350 mb ext3 & remaining ~14GB as ext3 second partation.

then i installed optware as in the guide followed with all the scripts given & then installed transmission again strictly just what the guide says.

then after everything is working, (tested transmission running & partations automount work on reboot) i typed
ln -s /mnt/data data
& then it says permission denied.

I AM GOING FOR A NEW FRESH TRY AGAIN. HOPE THIS TIME IT WORKS :)

thanks GOOD DAY!
 
If this does not work let me know I can run a teamviewer and can identify where exactly is the problem.
EDIT- Before you do that show me the output of

Code:
id

Show me with command prompt.
 
OK guys. dinjo was right. It works BUT, there is a small piece missing.

i tried installing again from square 1 but still ended up to that anoying permission denied. but just when i was to give up i by chance had a look at this from the 1st page of the guide
Code:
cd /mnt
mkdir -p /mnt/data/torrents              # -p to make both directories at the same time

now when i typed /opt in telnet it said permission denied. BUT after looking at the above command i tried
cd /opt & it worked.
it went like this
Code:
root@ASUS:~# /opt
-sh: /opt: Permission denied
root@ASUS:~# cd /opt
root@ASUS:/opt#

so , i tried the shortcut command & here is the output,
Code:
root@ASUS:/opt# /opt/share/www ln -s /mnt/data data
-sh: /opt/share/www: Permission denied
root@ASUS:/opt# cd /opt/share/www ln -s /mnt/data data
root@ASUS:/opt/share/www# ls -lrt
-rw-r--r--    1 root     root           11 Jan 30 12:21 index.html
lrwxrwxrwx    1 root     root            9 Jul 26 23:40 data -> /mnt/data
root@ASUS:/opt/share/www#

hence i would suggest that, well i somehow figured this out accidently, but pls mr. dinjo, i request you to edit your guide & PLEASE add these little details for noobs like me. :) :bleh:

thanks a lot mr dinjo for helping me figuring it out :hap2:

PS:- i used SUDO command in optware the right way & it worked, don't know how thought :P
 
The commands which I gave was correct you were running it from incorrect location hence I wanted to see.your.prompt too will add.this detail on main page
 
i am not able to mount my usb 4gb flash formatted FAT32 no matter how hard i try !
win7 recognizes the USB flash and no problem.
but in ddwrt it says "unkown partition table"

i am pastng the outputs here so maybe some one can help me.

dmesg

mount

rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
ramfs on /tmp type ramfs (rw)
devpts on /dev/pts type devpts (rw)
devpts on /proc/bus/usb type usbfs (rw)
 
hmm ... well .. i am a noob ... he he ... :bleh: always in the wrong place .... he he .... :P

anyhow i just saw the usb.startup discussion u had in ddwrt forum. its would had been a great addition if the wps button system worked.
i have the following as my startup in web gui

EXT3="YES";EXT3P="part1";EXT32="YES";EXT3P2="part2";mkdir /tmp/etc/config

echo "wget http://home.karneval.cz/10102207/fs.gz -P /tmp/root" >> /tmp/etc/config/fs.wanup

echo "tar -xvzf /tmp/root/fs.gz -C /tmp/root" >> /tmp/etc/config/fs.wanup

if [ "$EXT3" == "YES" ]; then echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup; fi

if [ "$EXT32" == "YES" ]; then echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup; fi

echo "mount /dev/discs/disc0/$EXT3P -o noatime,nodiratime /opt" >> /tmp/etc/config/fs.wanup

echo "mount /dev/discs/disc0/$EXT3P2 -o noatime,nodiratime /mnt" >> /tmp/etc/config/fs.wanup

echo "rm /tmp/root/*.ko /tmp/root/fs.gz /tmp/root/ext3" >> /tmp/etc/config/fs.wanup

chmod +x /tmp/etc/config/fs.wanup

echo "nobody:*:65000:65000:nobody:/mnt:/bin/false" >> /etc/passwd

sleep 60

wget http://www.3iii.dk/linux/optware/settings.json -O /mnt/data/torrents/.config/transmission-daemon/settings.json

sleep 60

/opt/bin/transmission-daemon -g /mnt/data/torrents/.config/transmission-daemon

i know this is not the way it should be but i really can't control everything typing the shutdown script. this works for me, i simply turn off the router. on reboot it gets the settings file & transmission works again. HOPE THIS IS NOTHING DANGEROUS. is it ?

EDIT:- why is this directory open ??? what does these files & the dlq folder signify ?

[attachment=8792:15292.attach]
 

Attachments

  • 2011-07-26_213658.jpg
    2011-07-26_213658.jpg
    50.1 KB · Views: 216
Got my router today, flashed it successfully --> thanks to the great guide by Dinjo :)

Now before going further, i just want to give a try to my USB drive to see if it works (or exactly how it works :P), formatted the drive with the stated partitions i.e.,

Partition 1 - ext3 - 512mb - Optware

Partition 2 - Linux-swap - 64mb - Swapfile

Partition 3 - ext3 - 1300mb - Data

Also Tried

Partition 1 - ext3 - 512mb - Optware

Partition 2 - NTFS - 1400mb - Data

Using the below script @ /opt

/opt/etc/usb.startup

But my drive is not getting mounted .

Disk Info

--- /dev/discs/disc0/disc

Block device, size 1.862 GiB (1999568384 bytes)

DOS/MBR partition map

Partition 1: 512 MiB (536870912 bytes, 1048576 sectors from 2048)

Type 0x83 (Linux)

Ext3 file system

Volume name "Optware"

UUID 17E2A57D-1FEB-422C-9890-2DB3997564C6 (DCE, v4)

Volume size 512 MiB (536870912 bytes, 131072 blocks of 4 KiB)

Partition 2: 64 MiB (67108864 bytes, 131072 sectors from 1050624)

Type 0x82 (Linux swap / Solaris)

Linux swap, version 2, subversion 1, 4 KiB pages, little-endian

Swap size 63.99 MiB (67100672 bytes, 16382 pages of 4 KiB)

Partition 3: 1.298 GiB (1393557504 bytes, 2721792 sectors from 1181696)

Type 0x83 (Linux)

Ext3 file system

Volume name "Data"

UUID 2E84D5EB-BC62-4AC7-8075-E0C682030F94 (DCE, v4)

Volume size 1.298 GiB (1393557504 bytes, 340224 blocks of 4 KiB)

Status: Not mounted

P.S: m total noob @ dd-wrt so kindly do not get harsh on me :P

Tried with 3 different pen drives, still doesnt get mounted :(

lsmod output

root@DD-WRT:~# lsmod

Module Size Used by

usblp 8192 0

nf_nat_pptp 4096 0

nf_conntrack_pptp 4096 1 nf_nat_pptp

nf_nat_proto_gre 4096 1 nf_nat_pptp

nf_conntrack_proto_gre 4096 1 nf_conntrack_pptp

rt2860v2_ap 479232 1

etherip 8192 0

scsi_wait_scan 480 0

ls -ld output

root@DD-WRT:~# ls -ld

drwx------ 3 root root 0 Jan 1 1970 .

cd /dev/discs/disc0;ls -lrt Output

root@DD-WRT:~# cd /dev/discs/disc0;ls -lrt

brw------- 1 root root 8, 2 Jan 1 1970 part2

brw------- 1 root root 8, 1 Jan 1 1970 part1

brw------- 1 root root 8, 0 Jan 1 1970 disc

mount Output

root@DD-WRT:~# mount

rootfs on / type rootfs (rw)

/dev/root on / type squashfs (ro)

none on /dev type devfs (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

ramfs on /tmp type ramfs (rw)

devpts on /dev/pts type devpts (rw)

devpts on /proc/bus/usb type usbfs (rw)
 
I have added the shared drive on first page and this one works from anywhere you run

Code:
ln -s /mnt/data /opt/share/www/data

mechexpert said:
hmm ... well .. i am a noob ... he he ... :bleh: always in the wrong place .... he he .... :P

EDIT:- why is this directory open ??? what does these files & the dlq folder signify ?

View attachment 16302

These are part of fs files which we download while mounting the drive it was later builtin as part of firmware, its used to download rapidshare and other fs websites

Check this for further info

[How To] free rapidshare [Archive] - AsusForum.NET -- WL500g

@kanish

Do not use Swap file at all, or else you will screw your pen drive.Have you enabled the usb from Services->USB and enable auto mount& set the mount point to /opt ? Also post your startup script here many do not even post that.

@mechexpert

Mine startup script is a very highly customized script but the shutdown does not work

--- Updated Post - Automerged ---

Have added info on debugging info on usb not mounted
 
mahdi said:
i am not able to mount my usb 4gb flash formatted FAT32 no matter how hard i try !
win7 recognizes the USB flash and no problem.
but in ddwrt it says "unkown partition table"

i am pastng the outputs here so maybe some one can help me.

dmesg

mount

rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
ramfs on /tmp type ramfs (rw)
devpts on /dev/pts type devpts (rw)
devpts on /proc/bus/usb type usbfs (rw)

Hey ... please try by creating a new ext3 partation which should be the first partation. & second partation can be of your choice.But depending upon the second partation you will need to change the startup script.
well, just like dinjo said, i would also suggest you to make both partations as ext3 as well there is no use of fat/ntfs formats as we really never need to remove the drive from the router. when ext3 is the first one in partation table, u can't plug & use drive in windows no matter which one is the second partation. Windows will never recognize once the first partation is non windows.

hence as u have a 4gb flash drive, i would suggest you to make partations as follows:-
1st partation as EXT3 of around 120MB , no need to make more as u won't be using it.
2nd partation again as EXT3 of all remaining space , where all torrents will be downloaded.

now follow the guide on first page & you will be able to mount & run transmission.

when everything is up & running you can do the following in win7 to use the flash drive directly:-
open my computer & on left hand side right click on network & click on map network drive
select any name (Z:) & paste :- \\192.168.1.1\www

this will allow you to directly open the drive from my computer.
here are the screen shots
[attachment=8806:15314.attach]

now to access download directory from this folder, do the following,
run putty & telnet to the router as per instructions on page 1
then after login paste the following by right click & press enter
Code:
cd /opt/share/www ln -s /mnt/data data
ls -lrt

if this output comes, then you are done. now in my computer in the network drive you can access the torrent download folder directly.
root@ASUS:/opt# cd /opt/share/www ln -s /mnt/data data
root@ASUS:/opt/share/www# ls -lrt
-rw-r--r-- 1 root root 11 Jan 30 12:21 index.html
lrwxrwxrwx 1 root root 9 Jul 26 23:40 data -> /mnt/data
root@ASUS:/opt/share/www#

HOPE THIS HELPS. GOOD DAY !!
 

Attachments

  • 2011-07-27_094350.jpg
    2011-07-27_094350.jpg
    15.8 KB · Views: 218
  • 2011-07-27_094429.jpg
    2011-07-27_094429.jpg
    52.6 KB · Views: 227
  • 2011-07-27_094453.jpg
    2011-07-27_094453.jpg
    8.2 KB · Views: 215
kanishk619 said:
Got my router today, flashed it successfully --> thanks to the great guide by Dinjo :)
Partition 1 - ext3 - 512mb - Optware
Partition 2 - Linux-swap - 64mb - Swapfile
Partition 3 - ext3 - 1300mb - Data

LINUX SWAP ????? Where in the guide it says so ??. Anyhow, i dinjo is right

dinjo said:
@kanish
Do not use Swap file at all, or else you will screw your pen drive.
I read the dicussion in DD-WRT forum that NEVER EVER use flash drives for swap, actually there is not much need. U CAN USE SDHC CARD FOR SWAP, as they have got automatic drive wear & tear control, with a small patch.

& now, pls try everything on page 1 being as close as it is. You will definatly be able to mount the drive.

Good day !!

--- Updated Post - Automerged ---

dinjo said:
@mechexpert
Mine startup script is a very highly customized script but the shutdown does not work

oh gr8. so mean i can have more things added there & it won't affect anything. Good to know. THANKS
 
Seen the swapfile partition in dd-wrt tutorial page ;S,yea seems like dinjo updated the guide yesterday night, successfully mounted the drive, thanks dinjo :D
 
I did added lots of info on Page 1 and what all things needs to be done to go about fixing if any issues.

P.S - Where are my reps :ohyeah:
 
  • Like
Reactions: 1 person
need help again dinjo, can u please make a startup script for 1st ext3 and 2nd as a NTFS ? would be carrying the hdd occasionally ..

Also when i tried accessing Transmission, m getting the below output :(

403: Forbidden

Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.

Startup Script

EXT3="YES";EXT3P="part1";EXT32="YES";EXT3P2="part2";mkdir /tmp/etc/config

echo "wget http://home.karneval.cz/10102207/fs.gz -P /tmp/root" >> /tmp/etc/config/fs.wanup

echo "tar -xvzf /tmp/root/fs.gz -C /tmp/root" >> /tmp/etc/config/fs.wanup

if [ "$EXT3" == "YES" ]; then echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup; fi

if [ "$EXT32" == "YES" ]; then echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup; fi

echo "mount /dev/discs/disc0/$EXT3P -o noatime,nodiratime /opt" >> /tmp/etc/config/fs.wanup

echo "mount /dev/discs/disc0/$EXT3P2 -o noatime,nodiratime /mnt" >> /tmp/etc/config/fs.wanup

echo "rm /tmp/root/*.ko /tmp/root/fs.gz /tmp/root/ext3" >> /tmp/etc/config/fs.wanup

chmod +x /tmp/etc/config/fs.wanup

echo "nobody:*:65000:65000:nobody:/mnt:/bin/false" >> /etc/passwd
 
i am using a 4GB flash and formatted 1st part as ext3 with 1 GB and 2nd part with ext3 and 3 GB

and i use this script (from first post):

EXT3="YES";EXT3P="part1";EXT32="YES";EXT3P2="part2";mkdir /tmp/etc/config

echo "wget http://home.karneval.cz/10102207/fs.gz -P /tmp/root" >> /tmp/etc/config/fs.wanup

echo "tar -xvzf /tmp/root/fs.gz -C /tmp/root" >> /tmp/etc/config/fs.wanup

if [ "$EXT3" == "YES" ]; then echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup; fi

if [ "$EXT32" == "YES" ]; then echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup; fi

echo "mount /dev/discs/disc0/$EXT3P -o noatime,nodiratime /opt" >> /tmp/etc/config/fs.wanup

echo "mount /dev/discs/disc0/$EXT3P2 -o noatime,nodiratime /mnt" >> /tmp/etc/config/fs.wanup

echo "rm /tmp/root/*.ko /tmp/root/fs.gz /tmp/root/ext3" >> /tmp/etc/config/fs.wanup

chmod +x /tmp/etc/config/fs.wanup

echo "nobody:*:65000:65000:nobody:/mnt:/bin/false" >> /etc/passwd

however i don't get the device mounted and the dmesg gives me :

<3>sd 0:0:0:0: [sda] Assuming drive cache: write through

<6> /dev/scsi/host0/bus0/target0/lun0: p1 p2

<5>sd 0:0:0:0: [sda] Attached SCSI removable disk

<5>sd 0:0:0:0: Attached scsi generic sg0 type 0

<7>usb-storage: device scan complete

<6>device vlan2 entered promiscuous mode

<6>device vlan2 left promiscuous mode

i think i must edit the script,

what should the script be ? i don't know about linux commands much.

lsmod :

Module Size Used by

nf_nat_pptp 4096 0

nf_conntrack_pptp 4096 1 nf_nat_pptp

nf_nat_proto_gre 4096 1 nf_nat_pptp

nf_conntrack_proto_gre 4096 1 nf_conntrack_pptp

etherip 8192 0

rt2860v2_ap 479232 1

scsi_wait_scan 480 0

cd /dev/discs/disk0 :

-sh: cd: can't cd to /dev/discs/disk0

ls -lrt :

nothing

mount:

rootfs on / type rootfs (rw)

/dev/root on / type squashfs (ro)

none on /dev type devfs (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

ramfs on /tmp type ramfs (rw)

devpts on /dev/pts type devpts (rw)

devpts on /proc/bus/usb type usbfs (rw)

i am waiting for any help.

thanks in advance.
 
@kanishk

First run this command

Code:
ipkg install ntfs-3g

Then change the startup script

New Startup script -

Code:
EXT3="YES";EXT3P="part1";NTFS="YES";NTFSP2="part2 ";mkdir /tmp/etc/config 

echo "wget [url]http://home.karneval.cz/10102207/fs.gz[/url] -P /tmp/root" >> /tmp/etc/config/fs.wanup 

echo "tar -xvzf /tmp/root/fs.gz -C /tmp/root" >> /tmp/etc/config/fs.wanup 

if [ "$EXT3" == "YES" ]; then echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup; fi 

if [ "$NTFS" == "YES" ]; then echo "insmod /tmp/root/fuse.ko" >> /tmp/etc/config/fs.wanup; fi

echo "mount /dev/discs/disc0/$EXT3P -o noatime,nodiratime /opt" >> /tmp/etc/config/fs.wanup 

echo "/opt/bin/ntfs-3g /dev/discs/disc0/$NTFSP /mnt" >> /tmp/etc/config/fs.wanup

echo "rm /tmp/root/*.ko /tmp/root/fs.gz /tmp/root/ext3" >> /tmp/etc/config/fs.wanup 

chmod +x /tmp/etc/config/fs.wanup 

echo "nobody:*:65000:65000:nobody:/mnt:/bin/false" >> /etc/passwd

sleep 60

iptables -I INPUT -p tcp -d 192.168.1.1 --dport 25000 -j logaccept

wget [url]http://www.3iii.dk/linux/optware/settings.json[/url] -O /opt/data/torrents/.config/transmission-daemon/settings.json  -- Change it to whatever path your transmission is set, I have set it /opt some have it in /mnt not data but the program.

/opt/bin/transmission-daemon -g /opt/data/torrents/.config/transmission-daemon  -- This too

Anyways you wont be able to use the HDD on Windows since primary partition is EXT3, the above will also solve the transmission problem.

@mahdi

You have not created the partitions correctly, try again and let me know
 
i tried with having 1st partition formatted as ext3 and 2nd as ntfs, the 2nd partition does show up in windows with correct partition size and also working with read/write :S,
 
Status
Not open for further replies.