# DD-WRT USB Not Mounting



## gameboy1998 (Nov 11, 2012)

I was following a guide to install optware on my DD-WRT router but I couldn't get the drive mounted. It is a memory card (with USB adapter) with two partitions, both EXT3, one is 1gb and the other one is 13.65GB(ish). Here is my startup command:

[/QUOTE]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


echo "sh /tmp/root/ext3" >> /tmp/etc/config/fs.wanup


echo "mount -o rw -t ext3 /dev/discs/disc0/part1 /opt" >> /tmp/etc/config/fs.wanup

echo "mount -o rw -t ext3 /dev/discs/disc0/part2 /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[/QUOTE]


BTW: I have a Asus RT-N13U Rev. B1 if it matters.


----------



## Fjandr (Sep 26, 2012)

Please post the output of

```
mount -o rw -t ext3 /dev/discs/disc0/part1 /opt
```
 and

```
mount -o rw -t ext3 /dev/discs/disc0/part2 /mnt
```


----------



## gameboy1998 (Nov 11, 2012)

Actually I don't get the output of these codes, It accepts the command that's it. In the Services-> USB its shows the disk info but status as not mounted. I telnet(ed) into the router (with putty) and gave these commands if that is what you wanted.


----------



## Fjandr (Sep 26, 2012)

Ah, alright. Yes, if you would please telnet into the router and try those commands.


----------



## gameboy1998 (Nov 11, 2012)

> I don't get the output of these codes, It accepts the command that's it. In the Services-> USB its shows the disk info but status as "not mounted"


I have already given the output (which is nothing)


----------



## Fjandr (Sep 26, 2012)

I apologize; I mis-read what you wrote.

Just to clarify, you entered

```
mount -o rw -t ext3 /dev/discs/disc0/part2 /mnt
```
 exactly into a telnet prompt and it returned nothing but a subsequent prompt?


----------



## gameboy1998 (Nov 11, 2012)

Yes that exactly what happened. If you want I can post a screenshot. Here is the disk info it might be useful:


> --- /dev/discs/disc0/disc
> Block device, size 14.63 GiB (15707668480 bytes)
> DOS/MBR partition map
> Partition 1: 0.996 GiB (1069254144 bytes, 2088387 sectors from 63)
> ...


----------



## gameboy1998 (Nov 11, 2012)

Here is the image of the output too (I don't know what subsequent means )


----------



## Fjandr (Sep 26, 2012)

If it returned nothing the mount should be successful. Assuming you haven't reset the router in the meantime, what is the output of just the "mount" command?

Of course, the lack of mount complaining when you tried to remount an already mounted filesystem points to the opposite being true.


----------



## gameboy1998 (Nov 11, 2012)

This is my mount command output. It doesn't show it mounted in this command:



> rootfs on / type rootfs (rw)
> /dev/root on / type squashfs (ro)
> none on /dev type devfs (rw)
> proc on /proc type proc (rw)
> ...


----------



## Fjandr (Sep 26, 2012)

What's the output of "ls /dev"?

Also, not really related to the problem, but I realized you were using flash memory to do this. Ext3 will eat your flash memory far faster than ext2 will; you may want to consider reformatting the flash card to ext2. Journaling filesystems like ext3 are not kind to it because of the large number of writes they use.


----------



## gameboy1998 (Nov 11, 2012)

Here is the output: 



> [email protected]:~# ls /dev
> console lp0 mmc0 net pty tty
> discs lp1 mmc1 null random urandom
> full lp2 mmc2 nvram root vc
> ...


I'am using the flash memory as a temporary solution its actually my phone's memory card . I have a Ext. 500GB Hardisk with about 250GB Free. Is it possible for me to use it with it


----------



## Fjandr (Sep 26, 2012)

I looked through one of the tutorials for optware and part of it was predicated on installing and using bash. I noticed from the screenshot that you're using the ash shell instead, so that's one potential issue. I'm not familiar with the differences between bash and ash, so I couldn't say definitively that there could be issues using one over the other.

What's the link to the tutorial you were following? I may be able to find some clues there; unfortunately I don't have a router with USB handy to test on myself.

As for the other drive, yes, you should be able to use the USB HDD just fine.


----------



## gameboy1998 (Nov 11, 2012)

Here you go: Asus RT-N13U B1 now supports dd-wrt

It is the link of the tutorial I have followed.

My HDD is formatted with FAT32 will that make a difference


----------



## Fjandr (Sep 26, 2012)

It shouldn't make a difference in that it will work. You'll get better performance formatting the HDD for ext3 though.

What are the outputs of "fdisk -l" and "mount -vw -t ext3 /dev/discs/disc0/part1 /opt" ?


----------



## gameboy1998 (Nov 11, 2012)

Here you go:


> [email protected]:~# fdisk -l
> -sh: fdisk: not found
> [email protected]:~# mount -vw -t ext3 /dev/discs/disc0/part1 /opt
> [email protected]:~#


The second command is accepted but no output as shown above.


----------



## Fjandr (Sep 26, 2012)

Hmm, I thought the bigger builds included fdisk. What build are you running?

As for the latter, there should have been _something_ displayed. The -v switch is verbose output. If it didn't do anything it should've complained; if it did, it should've said what it was doing.

Perhaps there's a specific build requirement for running optware. Once you post the build I'll see if I can track down what tools are included in it and what aren't. The curiously quiet mount has me stumped though.


----------



## gameboy1998 (Nov 11, 2012)

This is the build: DD-WRT v24-sp2 (05/12/11) std 

This build doesn't support fdisk or dlna, there is a third party one but it is very laggy


----------



## gameboy1998 (Nov 11, 2012)

Have you given up. Please help me Fjandr


----------



## Fjandr (Sep 26, 2012)

I did some more searching and it may be that the kernel module for ext3 isn't loading.

Please post the output for the following:

```
ls /lib/modules/`uname -r`/kernel/ext*
```
If the output includes "ext3.o" also include the output for this:

```
insmod /lib/modules/`uname -r`/kernel/ext3.o
```
After running the above command(s), try mounting the partitions again, and see if the output of "mount" has changed to include them.


----------



## gameboy1998 (Nov 11, 2012)

The first & second commands was accepted but no output, the drive didn't mount after running those commands.


----------



## Fjandr (Sep 26, 2012)

Alright, let's start back a bit earlier. Run

```
uname -r
```
 and post. At least I'll be sure I've got the kernel version right, since there are differences in where things are between 2.4 and 2.6.


----------



## gameboy1998 (Nov 11, 2012)

The output is



> 2.6.23.17


----------



## Fjandr (Sep 26, 2012)

How about lsmod? That'll at least show whether you have the modules for ext2 or ext3 loaded. If they're not, that's part (or all) of the problem. You may have to bite the bullet and reformat to another filesystem unless and until the problem of the one you want not being mountable is solved.


----------



## gameboy1998 (Nov 11, 2012)

Here you Go:



> Module Size Used by
> etherip 8192 0
> rt2860v2_ap 479232 1
> usblp 8192 0
> scsi_wait_scan 480 0



BTW: How Do you get that code thing I only get Qoute Option. Thanks for your help I really apperciate it


----------



## Fjandr (Sep 26, 2012)

The tag is "code" in square brackets. You can also look through the text from a quote and see the tags used in that quote.

Alright, so it doesn't appear to be loading the modules for those filesystems. Let's try something else. I know some of the DDWRT distributions have "find."


```
cd /; find -name ext[23]*
```
That should display the path to any file starting with ext2 or ext3.


----------



## gameboy1998 (Nov 11, 2012)

Command accepted but no output, Are we running out of options here. As per my opinion the problem might not be so complex, I think it might be a small one (like a silly mistake) like my startup script might be wrong etc.

BTW: Now I'm using my ext. hdd as you suggested with two partitions ext3 (1gb) and FAT32 (465gb)


----------



## Fjandr (Sep 26, 2012)

While there may be an error in the script, it's not getting that far. Unless you can get the volumes mounted that's the end of the story.

I'm not sure you can do what you want with that version of DD-WRT, honestly. Given everything I've now read about getting Optware working on it, you're missing vital components required to get the necessary filesystems operational. I could be missing something, but I'm pretty much out of ideas short of being able to physically work on it myself.


----------



## gameboy1998 (Nov 11, 2012)

I don't agree with that, many people have successfully installed optware on this device and on the DDWRT Version, if you look into the link I have given to you (tutorial link) you will find that many people have got it successfully working.


----------



## Fjandr (Sep 26, 2012)

All I can say is that you need to locate and load the correct filesystem modules. They don't appear to be located where they're supposed to be.

As I said, I could be missing something. I can tell you that from everything you've put here your problem is in the mount software, the USB hardware, and/or the drive format. Perhaps there's an error in dmesg which would give you a clue. If you run dmesg shortly after plugging the drive in, it should give you information about the USB subsystem loading the new hardware.

Edit:
I found the official DDWRT Optware installation guide for that router. It is a bit more explicit in saying that the filesystem modules are not included with DDWRT. They have to be loaded onto the USB drive or downloaded at runtime. That's why nothing will mount. You may want to start the process over and follow the directions here.

It appears the key from your installation script is hidden in the line "sh /tmp/root/ext3" There's something in it that is supposed to load the filesystem modules prior to mounting. Whatever has failed in that command is what is required.


----------



## gameboy1998 (Nov 11, 2012)

If you pay close attention to that guide you will see that it is for Asus RT-N13U, but my router is Asus RT-N13U *B1 *, Which is a updated version of that router which can store the fs drivers by itself. If you look at the startup script that I had given to you before you will see a code 



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


This code means to Get the tar file which has fs drivers and store in /tmp/root


----------



## gameboy1998 (Nov 11, 2012)

Could you please tell me should I insert my hdd after rebooting or while rebooting, I think this might be a key solution to my problem.


----------



## Fjandr (Sep 26, 2012)

Ah, wasn't aware of the difference. Regardless, the (unknown to me) contents of the script I mentioned earlier in the startup section likely has relevance to the mounting problems. It should be what initializes the filesystem drivers that you downloaded with the line in your second-to-last post above. If something in that script is failing silently, there's no way to know why the modules aren't loading.

To insert the drive after rebooting, simply connect it after the router is done rebooting. "While rebooting" is a bit trickier, and unlikely actually required. If it is, it would require doing so while the router was essentially unresponsive to pings while in the boot process, I guess.

I'll download the script and break it apart to see if there are any clues.


----------



## Fjandr (Sep 26, 2012)

Reboot your router, then connect via telnet or SSH. Run the following commands, then post the output.


```
mkdir /tmp/etc/config
cd /tmp/root
wget http://home.karneval.cz/10102207/fs.gz
tar -zxvf fs.gz
lsmod
insmod jbd.ko
insmod mbcache.ko
insmod ext3.ko
lsmod
mount
mount -o rw -t ext3 /dev/discs/disc0/part1 /opt
mount -o rw -t ext3 /dev/discs/disc0/part2 /mnt
mount
```


----------



## gameboy1998 (Nov 11, 2012)

Here you go, but when I reboot the dd-wrt gui doesnt show disk info, It only shows it after replugging the drive, these commands were however given while ddwrt gui was showing disk info (after replugging the drive) :



> [email protected]:~# mkdir /tmp/etc/config
> [email protected]:~# cd /tmp/root
> [email protected]:~# wget http://home.karneval.cz/10102207/fs.gz
> [email protected]:~# tar -zxvf fs.gz
> ...


----------



## Fjandr (Sep 26, 2012)

I had forgotten that insmod doesn't report any problems. Alright, reboot the unit (the drive state doesn't matter for this) and run the following:

```
mkdir /tmp/etc/config
cd /tmp/root
wget http://home.karneval.cz/10102207/fs.gz
tar -zxvf fs.gz
dmesg > dmesg1.txt
insmod jbd.ko
insmod mbcache.ko
insmod ext3.ko
dmesg > dmesg2.txt
```
You can get the files off the router using SFTP. If you don't have an FTP client which supports SFTP (FTP over SSH), grab Filezilla.


----------



## gameboy1998 (Nov 11, 2012)

Here you go:



> [email protected]:~# mkdir /tmp/etc/config
> [email protected]:~# cd /tmp/root
> [email protected]:~# wget http://home.karneval.cz/10102207/fs.gz
> [email protected]:~# tar -zxvf fs.gz
> ...


Which files should I get off my router.

BTW: Could you please tell me what these commands do, I also want to become a geek in DD-WRT, You know today's noobs are tomorrow's geeks.


----------



## Fjandr (Sep 26, 2012)

Sorry, I completely forgot that part of my post. When running a command in Linux, using the > or >> outputs the results of that command to a file. A single > overwrites the contents if any exist, while >> appends the contents. That's actually what all of those >> in your tutorial are doing. They're actually creating a script file.

So, in this case, the files /tmp/root/dmesg1.txt and /tmp/root/dmesg2.txt were created. I did that because the dmesg output is considerable. It's easier on the forums, you, and me to create and attach a file with the output instead of creating massive posts with the same.

So, if you haven't rebooted the router since you ran the above, grab an FTP client like Filezilla and connect to the router. Use the same information as if you were connecting via SSH. It will attach to the router and allow you to explore the directory structure, upload, and download files from the router. Navigate to /tmp/root/ and download dmesg1.txt and dmesg2.txt. If you have rebooted the router since you did the above, simply follow the steps in my earlier post again to generate the files.


----------



## Fjandr (Sep 26, 2012)

I'll put the explanations in a separate post for clarity. I'll cover it all, so as not to assume what you do/don't know. It's great that you want to learn. Lots of people just "want it to work," even if it's highly technical. 


```
mkdir /tmp/etc/config
```
creates the directory "config" under the directory /tmp/etc.
I actually should have left that out; it's relevant to the installation, but not the troubleshooting we're doing here.

```
cd /tmp/root
```
Change directory to /tmp/root

```
wget http://home.karneval.cz/10102207/fs.gz
```
Grabs the file fs.gz from a webserver.

```
tar -zxvf fs.gz
```
Invokes the "tar" utility. It packs and unpacks multiple files into one. In addition, the -z option tells it the file is zipped, -x tells it you're extracting, -v tells it to let you know what it accomplished, and -f tells it the target is a file.

```
dmesg > dmesg1.txt
```
Runs dmesg, which outputs a great deal of information regarding the system hardware, then dumps that output into the file "dmesg1.txt" while overwriting anything in that file should it be found to exist already.

```
insmod jbd.ko
```
Runs insmod to insert the module "jbd.ko" into the kernel. Normally modules are installed into the kernel at boot, but sometimes (as is the case with DD-WRT) you need to add modules after boot.

```
insmod mbcache.ko
insmod ext3.ko
```
As above, loading the mbcache.ko and ext3.ko modules.

```
dmesg > dmesg2.txt
```
Run dmesg again. This will now show information related to the insertion of the previous 3 modules, hopefully providing clues as to what is going wrong with them and why they're not showing up via lsmod (a program to list the modules currently loaded into the kernel which was used earlier).


----------



## gameboy1998 (Nov 11, 2012)

I have attached the files, Thanks for teaching me I hope to help people like you one day



View attachment dmesg1.txt


View attachment dmesg2.txt


----------



## Fjandr (Sep 26, 2012)

No problem, though I'm still no closer to solving your problem. insmod didn't produce any dmesg entries. I'm not sure if running it causes writes in other logs elsewhere, so I may be missing something. I'm not a Linux whiz by a long shot. 

Attach the drive to your router and make sure the router recognizes it, then run through the steps in post #34 again. At the end, run dmesg > /tmp/root/dmesg.txt and post the file again.


----------



## gameboy1998 (Nov 11, 2012)

I have attached the file. It was taken when USB was recognized but I didn't reboot the unit.


----------



## Fjandr (Sep 26, 2012)

Assuming you still haven't rebooted, try

```
mount /dev/sda1 /mnt
```
Then run mount again to see if it mounted the volume. There aren't any errors from the USB insertion, so maybe it was just a problem with having a bad target.


----------



## gameboy1998 (Nov 11, 2012)

Ran the command, but no mount, Unit was still not rebooted


----------



## Fjandr (Sep 26, 2012)

Well, without it throwing an error somewhere, _anywhere_, I'm stumped. As far as I'm aware there should be a hint in the kernel log (dmesg) regardless of whether insmod succeeded or failed.

At this point I'd suggest posting on the DD-WRT forums. You are likely to have more luck finding someone there who actually knows the ins and outs of getting Optware running on that hardware.


----------



## gameboy1998 (Nov 11, 2012)

I had posted a thread before but didn't get any help, However I have posted again. One last help (probably last) how to find if your router is Atheros or Broadcom


----------



## gameboy1998 (Nov 11, 2012)

Hey i was researching and found a third party DD-WRT FW (BrainSlayer), Is it possible for me to use this firmware which has automount for EXT3, If so how do I update. Also is this firmware Manageable Does it have too many bugs. Also is it necessary to flash webflash.bin after the initial flashing, I didn't do it could it be a potential cause


----------



## Fjandr (Sep 26, 2012)

The SoC (System on a Chip) in that router is actually made by Ralink, not Atheros or Broadcom.

It may be that there is a firmware which comes with EXT3 automount. You'd have to check on the DD-WRT site to determine if it's compatible with your hardware though. I wouldn't want to make any recommendations in that regard, since I'm not familiar with all the options available.

In order to flash a new firmware onto the router, use the Administration > Firmware Ugrade tab. Make sure to check whether there are any special instructions with the firmware you are considering.


----------



## gameboy1998 (Nov 11, 2012)

Which file should I flash the .bin or .trx one


----------



## gameboy1998 (Nov 11, 2012)

OK I did some research and installed the Modded DD-WRT,I followed this tutorial for installing optwareOptware - DD-WRT Wiki I enter the commands that the tutorial says but there is no output, the commands are just accepted. It looks like only one link for Optware is still not dead and that was of the tutorial. However just beacuse it accepted the command can I assume optware is installed, I however tried to install samba etc and it gave me a error


----------



## Fjandr (Sep 26, 2012)

After most of the commands entered into the command line you have options for checking if it was successful. After running commands to create directories or download files you can then browse the directories with "ls" to verify creation. After attempting to mount a filesystem, you can re-run "mount" with no options to list mounted filesystems, or run "df -h" to get information about free space on currently-mounted filesystems. Look at the scripts it tells you to run; see what's inside them. Try "less scriptname.sh" to see the contents of a text file named scriptname.sh. Use the up and down arrows to navigate it and see what commands it sends to the shell. Hit the "q" key to exit "less."

You can't assume optware is installed until you are actually able to get it to run. It's a fairly extensive collection of packages, and troubleshooting it will require you to become familiar with a number of common Linux utilities. The best thing I can recommend is to go slowly through the process, make sure each step is completed successfully, make sure you understand what each step is supposed to actually accomplish, and only then move to the next one.


----------



## gameboy1998 (Nov 11, 2012)

So from: 
Optware - DD-WRT Wiki 

I am using: 
wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d '\r' > /tmp/optware-install.sh 


Here are the links to the packages that this script tries to download: 

http://ipkg2.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk 

http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk 

I am seeing they don't exist. May be these need to be updated? Do I have any alternatives


----------



## Fjandr (Sep 26, 2012)

The script hasn't been updated for the new versions. Edit it and increment the last number in the filename by 1.

uclibc-opt_0.9.28-12_mipsel.ipk should be uclibc-opt_0.9.28-13_mipsel.ipk
ipkg-opt_0.99.163-9_mipsel.ipk should be ipkg-opt_0.99.163-10_mipsel.ipk


----------



## gameboy1998 (Nov 11, 2012)

I don't really get you  . I have attached the file could you edit it for me. Also after that what should I do?


----------



## gameboy1998 (Nov 11, 2012)

Lol I didn't upload the file and also I cant upload it, so here is the link: http://home.karneval.cz/10102207/optware-install.sh


----------



## gameboy1998 (Nov 11, 2012)

test test test test test


----------



## gameboy1998 (Nov 11, 2012)

Sorry just avoid my previous posts, How to edit that its in the web


----------



## gameboy1998 (Nov 11, 2012)

I think that it has been updated but the problem presists, I think its the links that are dead


----------



## gameboy1998 (Nov 11, 2012)

I downloaded it via my pc and transferred it into my router using winscp, I tried installing with this command



> sh /tmp/optware-install.sh


It gives me


> Error: No default gateway set!


I have my modem(cum router) connected to to with 192.168.1.2 as the default gateway, and my dd-wrt router at 192.168.1.1. What setting should I adjust


----------



## Fjandr (Sep 26, 2012)

The script for that new link has been updated with the correct filenames for the latest package versions.

What is the output for

```
route -n
```


----------



## gameboy1998 (Nov 11, 2012)

Here it is:



> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
> 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br0


Also how to change the setting on my laptop (win 7 ultimate)


----------



## Fjandr (Sep 26, 2012)

That's weird. If there's a gateway set there should be a line with the destination and genmask 0.0.0.0 with the gateway your ISP assigns you (something in the same subnet as your public IP address).

That's why it's failing. As far as the router is concerned, you don't have a gateway to an external network (in this case, the Internet) on this device. Are you actually accessing the Internet directly through it?


----------



## gameboy1998 (Nov 11, 2012)

Yes i access it through my ddwrt router & rarely through my modem


----------



## Fjandr (Sep 26, 2012)

I don't know why your router isn't being assigned a gateway. It should either receive a public IP and the residential gateway of your ISP for your neighborhood (if the modem is operating as a bridge) or a private IP and the modem's IP as a gateway (if the modem is not in bridge mode). Either way, it should have a gateway set.

Do you perhaps have the WAN side of the router set up statically?


----------



## gameboy1998 (Nov 11, 2012)

I can access the web ui of my router by my browser in 192.168.1.1, I do not understand your second question


----------



## Fjandr (Sep 26, 2012)

On the setup page, what type of WAN connection is selected?


----------



## gameboy1998 (Nov 11, 2012)

It is disabled, also these informations might be useful (attached image)


----------



## gameboy1998 (Nov 11, 2012)

I changed the gateway to 192.168.1.10 and local DNS to 8.8.8.8, after that I tried install optware but it gave me another error



> Error: Empty or nonexistent /etc/resolv/conf


 :banghead:

Why do only I face all the possible problem one can while installing optware, I know people who installe them in 15 minutes but I'm trying for 2 months now. :angry:

I hope atleast in the end all our hardwork is worth something.


----------



## gameboy1998 (Nov 11, 2012)

*I did some research and found out that it was something related to DNS, I changed the DNS and that error didn't appear but however as I told before the links in that optware script are dead, however I hunted down what I believe to be the same files 
*


> http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk


*(you might want to take a look in it) However I think it is working but it gives me another problem: it downloads the file that I have given the link but gives an error*



> /tmp/optware-install.sh: line 93: /opt/sbin/ldconfig: not found
> /tmp/optware-install.sh: line 94: /opt/bin/ipkg: not found
> /tmp/optware-install.sh: line 95: /opt/bin/ipkg: not found
> /tmp/optware-install.sh: line 96: /opt/bin/ipkg: not found



*Here is the whole command output:*



> [email protected]:~# sh /tmp/optware-install.sh
> Checking system config ...
> Using 192.168.1.10 as default gateway.
> Using the following nameserver(s):
> ...


*This is what the lines 93, 94, 95, 96 of the optware-install.sh says:*



> /opt/sbin/ldconfig
> /opt/bin/ipkg -verbose_wget update
> /opt/bin/ipkg -force-reinstall -verbose_wget install uclibc-opt
> /opt/bin/ipkg -force-reinstall -verbose_wget install ipkg-opt


*This is what the whole optware script says (I edited the link):*



> #!/bin/sh
> # Optware pre-installation script, Leon Kos 2006, 2008
> # added -verbose_wget to some lines, MrAlvin 2009
> 
> ...


You can get the unedited scrip on this link:



> http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh


----------



## Fjandr (Sep 26, 2012)

Alright, if the WAN settings are disabled, to what is the incoming ethernet connection from your ISP connected?

Something about your network topology is very non-standard (starting with the WAN port not being used), which is at least part of why the script is failing. Scripts like that aren't designed for edge-case usages scenarios, they usually depend on typical installation scenarios.

The errors are saying that the commands ldconfig and ipkg cannot be found in the /opt/bin/ directory. It appears whichever part of the install was supposed to populate the volume mounted at /opt did not work, or did not work completely.


----------



## gameboy1998 (Nov 11, 2012)

So what am i supposed to do


----------



## Fjandr (Sep 26, 2012)

Fjandr said:


> Alright, if the WAN settings are disabled, to what is the incoming ethernet connection from your ISP connected?


----------



## gameboy1998 (Nov 11, 2012)

It is connected via wan only, I just followed this tutorial: Wireless access point - DD-WRT Wiki

Is it abnormal, I'm accessing internet on my ddwrt router for over a month now. Only problem I face sometimes is that if I don't turn on my modem I cannot access web ui of my ddwrt router.


----------



## Fjandr (Sep 26, 2012)

Alright, that tutorial is to set up two routers with separate subnets, and is designed to setup the secondary router as a dedicated wireless access point. So this router you've been working on is a secondary router, and not connected directly to the modem providing your Internet connection?


----------



## gameboy1998 (Nov 11, 2012)

It is directly connected to the modem and this is my primary router, although my modem has wifi inbuilt (it is a adsl modem+router if it matters), also if I'm doing it wrong would you please give a link to the correct tutorial


----------



## Fjandr (Sep 26, 2012)

Can you post a screenshot of the status page of your router please?


----------



## gameboy1998 (Nov 11, 2012)

I have attached the image, just zoom in to see better.:smile:


----------



## Fjandr (Sep 26, 2012)

I'm not sure how you can be getting any connection through that router if it's connected through the WAN port with the WAN port disabled.


----------



## gameboy1998 (Nov 11, 2012)

Tell me the correct way I should do it, it may solve our problem. Also I want to put my router in repeater mode but I'm delaying it, shall I do it now


----------



## gameboy1998 (Nov 11, 2012)

When I place it in repeater mode it gives me no default gateway error while installing optware


----------



## Fjandr (Sep 26, 2012)

A repeater just extends the range of a network.

What sort of Internet connection do you have? Ordinarily the WAN would be set up with a connection type of Automatic Configuration - DHCP. It would receive an IP from whatever equipment provides your Internet connection. Certain equipment requires a username and password to be sent via PPTP or PPPoE though.


----------



## gameboy1998 (Nov 11, 2012)

I don't know what its called but an line comes into my house and a splitter splits it into 2 parts, One for the land line and one for the modem (the modem's cable is not lan cable) and the modem then coverts into internet (something like that), we can connect to the modem either wirelessly via wifi or wired via lan, I connected my DD-WRT router previously with LAN but now on repeater.


By repeater I mean extending the range of my modem's wifi


----------



## Fjandr (Sep 26, 2012)

Sounds like a DSL line. So let me verify this then, is your router connected to the modem wirelessly or is it wired, and if it's wired which port on the router is it connected to?


----------



## gameboy1998 (Nov 11, 2012)

It is connect wired, also automatic-dhcp doesn't work, I don't get any connection.
Also the link that I gave you link to earlier 

RT-N13-B1:Optware+Transmission

Also asks me to set the wan connection to disabled.

And It is ADSL I think beacuse I have a ADSL(+ something) modem


----------



## gameboy1998 (Nov 11, 2012)

I think the problem is not in the connection. But is in the editing of the script (beacuse I had to however). If you see the closely the original script was to download two files, but the links are dead. The mistake I did was to change the link to download only one file which was for *ipkg-opt_0.99.163-10_mipsel.ipk*

But I had to download *ipkg-opt_0.99.163-10_mipsel.ipk* as well as *uclibc-opt_0.9.28-13_mipsel.ipk*

As I'm a complete N00B :facepalm: to linux. So if you could edit the script to download both the files it would be great and it will probably solve my problem and I can close this thread. :dance: . 

Here you go with the links to both the files:

http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk

http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk.


----------



## gameboy1998 (Nov 11, 2012)

Yaaayy!!! Looks like our friends at DD-WRT have updated the script as well as the links, I have installed Optware with just the unedited DD-WRT Optware Script. I have installed Transmission also. Yippee Ka Yee :dance: :grin:  :thumb:

One Last help: I have two EXT3 Partitions one of 1GB & the other of 75GB, I need to know which one is mounted.

Here is the disk info:



> --- /dev/sda
> Block device, size 465.7 GiB (500074283008 bytes)
> DOS/MBR partition map
> Partition 1: 1 GiB (1073741824 bytes, 2097152 sectors from 2048)
> ...



I really appreciate your time and hardwork you put in for me. I hope I can do the same to others.
(Even though not on networking I will help on console gaming, I'm a specialist of PS3)


----------



## Fjandr (Sep 26, 2012)

Ah, I thought you had used the last script link you posted. That one was updated as of when I made post #70.

From the above, it appears the 75GiB ext3 partition is the only one mounted, and it's mounted at /opt. You can use "df -h" as a quick way to check sizes on only the mounted partitions.

I'm still confused how your WAN connection works at all, but I haven't come across everything out there, so I'll just chalk it up to a new one on me. 

Glad you got it's working now.


----------



## gameboy1998 (Nov 11, 2012)

Nope 1gb is the one which is mounted (I tried to download a file over 1gb).

Also is it possible to install drivers to install drivers for FAT32 as I have installed optware. I want to have a single partition on my Ext. HDD and as I use it a lot with PS3 (which only recognizes FAT32).

As for that WAN thing, I think its how it is supposed to be even though I'm not sure at all.

Is it appropriate to mark this thread as solved as we couldn't solve my initial problem 

I saw that you have been diagnosed with cancer, I hope you can beat it, We need helpful person in this world and there are very few


----------



## Fjandr (Sep 26, 2012)

Try running "df -h", since what you posted earlier indicates it's the 75GiB partition that's mounted at /opt. What did you run to get the output you posted in #86 above?

You can mount FAT32 partitions, but you'll need to grab the filesystem modules here: http://home.karneval.cz/10102207/fs.gz

You can use wget to download them to your router, then unzip them. Use insmod to load all of them but fuse.ko, which is the NTFS filesystem module.


----------



## gameboy1998 (Nov 11, 2012)

I will post the output of df -h after I get home.

But as for that mounting part I can download the fs.gz, I can unzip them via winscp but how to use insmod, and where will be the file be downloaded. If you could tell me more specifically about it or even better link me to a tutorial it will save you the trouble


----------



## gameboy1998 (Nov 11, 2012)

Looks like this build can automount FAT32 as well, I just tried it. Will download something and post the results


----------



## Fjandr (Sep 26, 2012)

You can get information on the usage of pretty much any command line utility by searching for "man 'utilityname'" (e.g. "man wget")

Without any arguments, the wget command will download a file into the current directory, which you can see by using the command pwd (stands for "print working directory").

The command "insmod" works by following it with the module you'd like to load. If the module cannot be found in the default directories, it needs to be in the current working directory or prefaced by the path to its location (e.g. "insmod /tmp/root/vfat.ko")


----------



## gameboy1998 (Nov 11, 2012)

I think its not needed it can mount fat32 fine.


----------



## Fjandr (Sep 26, 2012)

Aye, I just provided the link in case the modules weren't already available. It can be a guessing game to determine what is available in a given DD-WRT install.

Let me know how things go now that you've got a single partition that's auto-mounting successfully (or are in the process of getting one there).


----------



## gameboy1998 (Nov 11, 2012)

The download speeds are suddenly very low, It doesn't cross 8.97 kbps but I have a 4mbps connection. The upload speeds are good its just the download and this is a well seeded torrent


----------



## gameboy1998 (Nov 11, 2012)

Oops!! :facepalm: . I tried to install optware again by doing a factory default but I'm getting a error:



> [email protected]:~# sh /tmp/optware-install.sh
> Checking system config ...
> Using 192.168.1.2 as default gateway.
> Using the following nameserver(s):
> ...


/opt is not empty, will that play a part, It was not empty last time too


----------



## gameboy1998 (Nov 11, 2012)

I researched a little bit and found out that this problem can be solved if I use a ext3 partition, But I want to use FAT32 as its convenient for me. 

If its not possible then I can create two partition one for optware & transmission (1gb) and one for download data (rest space).

I know it is possible but I don't know to mount them. If we could somehow put them in the startup script.


----------



## Fjandr (Sep 26, 2012)

All you have to do is create an empty directory and then use that as the mount target.

Something like

```
mkdir /temp/root/hdd
mount /dev/sda2 /temp/root/hdd
```
You'd have to put the above into your startup script with the rest of the Optware startup stuff, and modify it so that "/dev/sda2" is actually whatever your secondary partition is. I'd suggest playing around with the mount command to become familiar with how it works.

As far as /opt, I'm pretty sure I read somewhere in there that Optware does not like to be installed on an /opt partition which is not empty. That may be your problem.


----------



## gameboy1998 (Nov 11, 2012)

I created a another partition (fat32) and tried to install optware but it gave me the same error but when I formatted the partition to ext3 it worked.

Will play around with the above command and let you know.

Also there is no optware stuff in my startup script, I have just created it for transmission:



> sleep 2
> killall transmission-daemon
> sleep 2
> /opt/bin/transmission-daemon -g /opt/etc/transmission-daemon


----------



## gameboy1998 (Nov 11, 2012)

I tried to create a mount point, and was successful but when I give thte command to mount sda2. it takes forever to respond (I waited 15 minutes) so I rebooted the router (manually).


----------



## Fjandr (Sep 26, 2012)

"sda2" was an example, which is why I said to modify the command to point to wherever your second partition actually is. 

df -h and fdisk -l are good places to start.


----------



## gameboy1998 (Nov 11, 2012)

sda2 is the right one for me, I experimented.


----------



## Fjandr (Sep 26, 2012)

Not sure why you'd be experiencing super-long mount times.


----------



## gameboy1998 (Nov 11, 2012)

Sorry for the late reply was on a vacation. It says that sda2 as fat32 but sda5 as an extension of sda2


----------



## Fjandr (Sep 26, 2012)

How exactly is the drive formated now, and what filesystems are used for the partitions? Also, what is the partition order if there is more than one?

Currently in the hospital, so replies may take me longer than usual.


----------



## gameboy1998 (Nov 11, 2012)

the drive is formatted as ext3 (partition 1, primary) and fat32 (partition 2, logical), partition 3 (unformatted) . I do remember once I extended fat32 partition. The extended partition is only visible in gparted no in easus partition manager or minitool partition manager.


----------



## Fjandr (Sep 26, 2012)

The extension may be the issue. You can try mounting sda5, or re-partition the end of the drive into a second primary FAT32 partition.


----------



## gameboy1998 (Nov 11, 2012)

I don't think I can delete the extension. However leave it I'm OK with a EXT3 Partition as I can mount it in Windows also with ext2fsd (Read and Write  )


----------

