Asus RT-N16 /opt mounted twice on 2 separate - Build 15778

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3  Next
Author Message
marcot
DD-WRT Novice


Joined: 07 Jan 2011
Posts: 2

PostPosted: Fri Jan 07, 2011 2:35    Post subject: Reply with quote
I have exactly the same problem using 15943M NEWD-2 Eko on an Asus WL500G Pv2. I was searching for a way to script some mount overrides when I found this thread!

Previously I had a build working fine automounting a jffs and an opt partition from a usb flash drive, but when I moved to a new build they both mount to /opt now. I have tried several recent builds and they are all the same. I now have to unmount both and remount manually. A data and a swap partition do not automount but never did. Output below:

Code:

--- /dev/discs/disc1/disc
Block device, size 3.844 GiB (4127195136 bytes)
GRUB boot loader, compat version 3.2, boot drive 0xff
DOS/MBR partition map
Partition 1: 258.8 MiB (271401984 bytes, 530082 sectors from 63)
Type 0x83 (Linux)
Ext3 file system
Volume name "Optware"
UUID 5854CC83-EAB4-4233-BED1-3B6687689FEB (DCE, v4)
Volume size 258.8 MiB (271400960 bytes, 265040 blocks of 1 KiB)
Partition 2: 62.75 MiB (65802240 bytes, 128520 sectors from 530145)
Type 0x82 (Linux swap / Solaris)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 62.75 MiB (65794048 bytes, 16063 pages of 4 KiB)
Partition 3: 125.5 MiB (131604480 bytes, 257040 sectors from 658665)
Type 0x83 (Linux)
Ext3 file system
Volume name "JFFS"
UUID 41C9E12A-EE0F-40DF-A43F-5AAF0F150A35 (DCE, v4)
Volume size 125.5 MiB (131604480 bytes, 128520 blocks of 1 KiB)
Partition 4: 3.401 GiB (3652024320 bytes, 7132860 sectors from 915705)
Type 0x83 (Linux)
Ext3 file system
Volume name "Data"
UUID 69EE1FA4-F3BE-494C-AD71-D7C60BBA86E7 (DCE, v4)
Volume size 3.401 GiB (3652022272 bytes, 891607 blocks of 4 KiB)
Status: Mounted on /opt
Status: Mounted on /opt


Further, I initially updated my build because I wanted to connect an NTFS drive and my build didn't have a fuse.o available that would insmod correctly. I got the drive working, but it won't automount, and last night unmounted itself with no reason in dmesg as to why. Today it unmounted after I finished watching a video and navigated out of the directory.

_________________
Asus WL500G Pv2
DD-WRT v24-sp2 (12/19/10) mega (SVN revision 15943M NEWD-2 Eko)
OTRW (for ntfs-3g)
USB1: Flash with JFFS and OPT partitions
USB2: Printer or NTFS drive
Sponsor
kt_haddock
DD-WRT Guru


Joined: 25 Dec 2009
Posts: 710

PostPosted: Fri Jan 07, 2011 9:58    Post subject: Reply with quote
If you want NTFS with automount you should use BIG-builds.
_________________
[I prefer answere in whole sentence]
roundbrown
DD-WRT Novice


Joined: 06 Jan 2011
Posts: 4

PostPosted: Fri Jan 07, 2011 14:02    Post subject: Reply with quote
@Mastermind

I get what you mean now. I have just started flashing my router last week so how all of this works is still very new to me. For some reason I thought the automount script was doing more than a fstab would. It is not. So the correct fix for this is to disable dd-wrt's automount in the UI under Services->USB and under Administration->Commands enter the line:
Code:

mount -t ext3 -o rw,noatime,data=ordered /dev/discs/disc0/part1 /opt


And save it as a startup script. That effectively replaces the automount function and allows optware to do it's thing.

Good luck. Hopefully this gets fixed.
Masterman
DD-WRT Guru


Joined: 24 Aug 2009
Posts: 2070
Location: South Florida

PostPosted: Fri Jan 07, 2011 15:10    Post subject: Reply with quote
@roundbrown

If you do not wish to use DD-WRT's Automount, and use OTRW, the following is the correct procedure:

Code:
sleep 10 && mount -n -o rw,noatime,data=ordered -t ext3 /dev/discs/disc0/part1 /opt &
n=1
while [ ! -d /opt/etc/init.d ] ; do
  sleep 3
  [ $n -gt 30 ] && break
  let n+=1
done
/opt/etc/init.d/optS

Shutdown

/opt/etc/init.d/optK

_________________
Optware, the Right Way
Asus RT-AC68U
Asus RT-N66U
Asus RT-N10
Asus RT-N12
Asus RT-N16 x5
Asus WL520gU
Engenious ECB350
Linksys WRT600Nv1.1
Linksys WRT610Nv1
Linksys E2000
Netgear WNDR3300
SonicWall NSA220W
SonicWall TZ215W
SonicWall TZ205W
SonicWall TZ105W
roundbrown
DD-WRT Novice


Joined: 06 Jan 2011
Posts: 4

PostPosted: Fri Jan 07, 2011 15:33    Post subject: Reply with quote
@Mastermind

Where do dd-wrt's command scripts get stored and how are they called? I'm just trying to figure out how all of this works.

It seems to me like the optK and optS scripts are being run with just a mount and I don't need to call them in my startup and shutdown scripts. I'd like to verify this as I am only guessing since all the optware services are running. I will implement the sleep to the mount command and the directory check as those are good practice.

Thanks for the help.
Masterman
DD-WRT Guru


Joined: 24 Aug 2009
Posts: 2070
Location: South Florida

PostPosted: Fri Jan 07, 2011 16:01    Post subject: Reply with quote
roundbrown wrote:
@Mastermind

Where do dd-wrt's command scripts get stored and how are they called? I'm just trying to figure out how all of this works.

It seems to me like the optK and optS scripts are being run with just a mount and I don't need to call them in my startup and shutdown scripts. I'd like to verify this as I am only guessing since all the optware services are running. I will implement the sleep to the mount command and the directory check as those are good practice.

Thanks for the help.


First of all, you should be using DD-WRT's automount. I would go ahead and upgrade to th latest B.S big build, or downgrade to the build I'm running, which is 15704.

However if you a persistant in the fact that you must use a startup and shutdown script (and disable DD-WRT's automount) do the following:

Go to Administration->Commands and enter this in the box:

Code:
sleep 10 && mount -n -o rw,noatime,data=ordered -t ext3 /dev/discs/disc0/part1 /opt &
n=1
while [ ! -d /opt/etc/init.d ] ; do
  sleep 3
  [ $n -gt 30 ] && break
  let n+=1
done
/opt/etc/init.d/optS


Click Save startup.

Now enter this into the empty box:

Code:
/opt/etc/init.d/optK


click Save Shutdown.

Don't touch anything for ~3 mins while this processes, then reboot the router..

_________________
Optware, the Right Way
Asus RT-AC68U
Asus RT-N66U
Asus RT-N10
Asus RT-N12
Asus RT-N16 x5
Asus WL520gU
Engenious ECB350
Linksys WRT600Nv1.1
Linksys WRT610Nv1
Linksys E2000
Netgear WNDR3300
SonicWall NSA220W
SonicWall TZ215W
SonicWall TZ205W
SonicWall TZ105W
marcot
DD-WRT Novice


Joined: 07 Jan 2011
Posts: 2

PostPosted: Sat Jan 08, 2011 3:07    Post subject: Reply with quote
kt_haddock wrote:
If you want NTFS with automount you should use BIG-builds.


I am, I had read several of your posts on the forums before and tried several BIG builds. Smile dd-wrt.v24-15943_NEWD-2_big.bin when it's installed comes up as a mega build, which is what's in my sig.

I tried the following BIG builds based on what I found in the forums as definitely working, but K2.6 builds brick the router and the others don't mount NTFS:

dd-wrt.v24-15508_NEWD_big.bin
dd-wrt.v24-15943_NEWD-2_big.bin
dd-wrt.v24-15943_NEWD-2_K2.6_big.bin
dd-wrt.v24-15943_NEWD_big.bin
dd-wrt.v24-15962_NEWD-2_K2.6_big.bin

I've now tried scripting my current setup, and if I disable automount, I can't mount anything. If I enable automount and try to script the mounts and unmounts, they won't work if I run the script as a post automount or startup script, but sometimes it works manually. The commands also don't work if I paste the script into the "Run commands" box in the Admin section and run them there.

I'm very confused here, I can't see any logic behind what works and what doesn't work.

_________________
Asus WL500G Pv2
DD-WRT v24-sp2 (12/19/10) mega (SVN revision 15943M NEWD-2 Eko)
OTRW (for ntfs-3g)
USB1: Flash with JFFS and OPT partitions
USB2: Printer or NTFS drive
wrtabuser
DD-WRT User


Joined: 15 Dec 2009
Posts: 121

PostPosted: Sat Jan 08, 2011 7:45    Post subject: Reply with quote
Masterman, the code you posted is incomplete.
If dd-wrt automount option is disabled you must tell the router to load filesystem modules.
I have struggled my head half day to discover this (yes i'm kinda n00b to linux scripts)!
So, for the above code to work you mus insert first ext3.ko, or whtever fs do /opt partition use.
Code:
insmod /lib/modules/2.6.24.111/kernel/fs/ext3/ext3.ko
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sat Jan 08, 2011 9:36    Post subject: Reply with quote
wrtabuser wrote:
Masterman, the code you posted is incomplete.
If dd-wrt automount option is disabled you must tell the router to load filesystem modules.
I have struggled my head half day to discover this (yes i'm kinda n00b to linux scripts)!
So, for the above code to work you mus insert first ext3.ko, or whtever fs do /opt partition use.
Code:
insmod /lib/modules/2.6.24.111/kernel/fs/ext3/ext3.ko
That's because the way DD-WRT automounts has changed. In older versions (quite recently, really) you would manually select which filesystems it had to support.

Now it will only load the modules of the partition it automounts....
wrtabuser wrote:
So, for the above code to work you mus insert first ext3.ko, or whtever fs do /opt partition use.
Please don't use anything but ext
_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
sagar777
DD-WRT Novice


Joined: 02 Jan 2011
Posts: 17

PostPosted: Sun Jan 09, 2011 3:51    Post subject: Reply with quote
Quote:
marcot wrote:
kt_haddock wrote:
If you want NTFS with automount you should use BIG-builds.


I am, I had read several of your posts on the forums before and tried several BIG builds. Smile dd-wrt.v24-15943_NEWD-2_big.bin when it's installed comes up as a mega build, which is what's in my sig.

I tried the following BIG builds based on what I found in the forums as definitely working, but K2.6 builds brick the router and the others don't mount NTFS:

dd-wrt.v24-15508_NEWD_big.bin
dd-wrt.v24-15943_NEWD-2_big.bin
dd-wrt.v24-15943_NEWD-2_K2.6_big.bin
dd-wrt.v24-15943_NEWD_big.bin
dd-wrt.v24-15962_NEWD-2_K2.6_big.bin

I've now tried scripting my current setup, and if I disable automount, I can't mount anything. If I enable automount and try to script the mounts and unmounts, they won't work if I run the script as a post automount or startup script, but sometimes it works manually. The commands also don't work if I paste the script into the "Run commands" box in the Admin section and run them there.

I'm very confused here, I can't see any logic behind what works and what doesn't work.


@marcot I confirm everything you are saying seems to be holding true for me too. I have tried all of this. For me even following command CRASHES my router and reboots it everytime I issue it:
/opt/bin/ntfs-3g /dev/sdb1 /tmp/e

(yes i did confirm my ntfs drive partition name using /proc/partitions etc).

personally, I like the automount utility/service very much but it is currently not working for us.

_________________
ASUS RT-N16.
DD-WRT v24-sp2 (12/19/10) mega - build 15943M NEWD-2 K2.6 Eko.
Optware the Right way.
USB1=8GB Transcend Flash
USB2=2TB HDD (Not working yet)

----
USB1 partitioning:
* /opt 2048 megabytes
* swap 256 megabytes
* /jffs 1024 megabytes
* data remainder of the disk (/mnt 4.4GB)
---
geva420
DD-WRT User


Joined: 30 Oct 2010
Posts: 108
Location: Lyon, France

PostPosted: Fri Nov 25, 2011 13:04    Post subject: Reply with quote
Hey Guys;

I stumbled across this thread while trying to help another user with a problem - his /opt has being mounted twice as well, however once from each connected USB drive.

In the process, I managed to reproduce this issue where /opt gets mounted twice on the same drive... specifically on part1 and part3.

I needed USB 1.1 as my USB hub is 1.1. Initially, I had both USB 1.1 driver interfaces selected, but found that choosing one over the other solved the problem, and only /opt on part1 was mounted!

Check out the details on the differences between OHCI and UHCI here:

http://blogs.gurulabs.com/stuart/archives/2006/06/post.html

Hope this helps you out.

geva
yionatan
DD-WRT Novice


Joined: 30 Oct 2012
Posts: 2

PostPosted: Tue Oct 30, 2012 14:57    Post subject: the same problem again Reply with quote
Hello all,

Please could you help me someone ?
I have the same problem with twice "/opt" mounted after reboot. And optware dont work for me more...
Im new on dd-wrt but Im already tried find solution on internet but without working solution.

I have ASUS RT-N16 with - DD-WRT v24-sp2 (06/08/12) mega

and this is current situation on my router:

root@mikrovlnka:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 6.3M 6.3M 0 100% /
/dev/root 6.3M 6.3M 0 100% /
/dev/discs/disc0/part1
6.8G 258.4M 6.5G 4% /opt
/dev/discs/disc0/part3
6.8G 258.4M 6.5G 4% /opt

It would by great if someone help me fix this problem. I like dd-wrt and i need optware because of I want use zabbix agent on router.

Is there any version of dd-wrt for my router wich is working with optware on USB flash disk ?

Thanks in advance very much for all usefull and fast answers Smile



dd-wrt1.jpg
 Description:
 Filesize:  41.1 KB
 Viewed:  14508 Time(s)

dd-wrt1.jpg


geva420
DD-WRT User


Joined: 30 Oct 2010
Posts: 108
Location: Lyon, France

PostPosted: Tue Oct 30, 2012 18:24    Post subject: Reply with quote
yionatan,

I too am having this exact problem on my router which is an E3000, and have also seen it show itself in older versions of F/W when I was running a WRT610Nv2.

Before, the solution was to disable one of the types of USB 1.1 support if I recall correctly. Now, I have the same setup as you show in your router with only having the ability to enable/disable everything.

This appears to be a problem with the DD-WRT automount script as it should not be mounting multiple /Opt partitions. I did some research on this before leaving home (I've been away for awhile) and it seems that it's a F/W bug.

If any gurus could provide some assistance on this issue; we'd both appreciate it.

As a workaround/bandaid, I'd suggest trying to delete the DATA partition on your USB flash drive. This is the second partition that is being mounted as /Opt, so if it is not there, you should only get one /opt partition being mounted.

Cheers,

geva
yionatan
DD-WRT Novice


Joined: 30 Oct 2012
Posts: 2

PostPosted: Wed Oct 31, 2012 16:50    Post subject: usefull workaround Reply with quote
Hi all,

first of all i want to send big thanks to "geva420" for a very usefull workaround and very fast answer.

His solution is working for me wery well - yet ... Smile

I really dont need DATA partiton which is primarily intended for share via Samba or FTP !

So on my 8 GB flash disk i have only 2 partition:

first is 128 MB for swap and rest of free space i use for ext2 for /opt .

I tried a few restarts over command line and everithing withou problems.

So the current situation is more than enough for me.
If i will have any problem with this in future i will post it here Smile

Thanks again for useful tip geva420



dd-wrt-2.jpg
 Description:
only little bit mistake is maybe Status: Not mounted , but nevermind :p
 Filesize:  44.73 KB
 Viewed:  14461 Time(s)

dd-wrt-2.jpg


madman999
DD-WRT Guru


Joined: 11 Jun 2012
Posts: 1042

PostPosted: Wed Oct 31, 2012 18:40    Post subject: Reply with quote
this is a common issue that has only work arounds but no permanent fix such as to dismount and then manually mount. been plaguing the community for a while.

i tried that-switching the order of the partitions to trick the OS but didn;t work for me. good to see that it atleast recognized your swap partition as something unique because for me, grabbed the last 2 partitons as /opt.

i am not even running with a swap partition now-just 1 opt partition on a small USB drive. have settled on using the 2nd usb port for my data drive.

_________________
Please state what make and model router plus the build number and type of DD-WRT you are using. Screen prints and a network diagram can are also helpful. Before you create a new post, use the search function. Chances are your issue has happened to someone else.

Common F.A.Q.
Where can I get the latest test Firmware or older ones?
https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/

Asus RT-AC66R on 3.x 28072 Giga
TP-Link Archer C9 on 3.x r54095
Goto page Previous  1, 2, 3  Next Display posts from previous:    Page 2 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum