I had my router setup and working without any issues using a single 160GB drive (formatted as ext3 as per the wiki). This was fine, everything was working no problems. I had read that you can use a USB Hub to connect more than one device to the router, so for Christmas I got a nice 7-port powered USB Hub (D-Link DUB-H7 http://www.dlink.com/products/?pid=149).
I have 3 devices that I would like to get working:
Original 160GB drive (Ext3 formatted, w/ opt installed)
New 2TB drive (NTFS formatted)
HP Photosmart D5400 printer
So this is what I'm running into...
When plug in only the original drive to the usb hub, the router works like normal and mounts the drive.
However, when I attach another device, none of the devices are mounted. I tried looking over the wiki and searching the forum but I'm coming up empty on how to fix this. I ran the 'dmesg' command and found that the router 'sees' all three devices but I don't know what to do from here. I assume I have to manually mount them, however, the devices keep switching 'hosts' on my when the router is rebooted (Sometimes the 160gb will be on host1 other times it will host2, etc.). I'm not quite sure what info you would need to help me, so I'll post what I think might help you help me:
This is my Automount info from the web-GUI BEFORE the usb hub:
Code:
Disk Info
--- /dev/discs/disc0/disc
Block device, size 153.4 GiB (164696555520 bytes)
DOS/MBR partition map
Partition 1: 3.999 GiB (4293563904 bytes, 8385867 sectors from 63)
Type 0x83 (Linux)
Ext3 file system
Volume name "Optware"
UUID ACD1D8B9-F130-4CD8-B21C-426F09ADF1D0 (DCE, v4)
Volume size 3.999 GiB (4293562368 bytes, 1048233 blocks of 4 KiB)
Partition 2: 3.999 GiB (4293596160 bytes, 8385930 sectors from 8385930)
Type 0x82 (Linux swap / Solaris)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 3.999 GiB (4293586944 bytes, 1048239 pages of 4 KiB)
Partition 3: 3.999 GiB (4293596160 bytes, 8385930 sectors from 16771860)
Type 0x83 (Linux)
Ext3 file system
Volume name "JFFS"
UUID 48EEEB94-4926-41DB-9F1C-45558089C639 (DCE, v4)
Volume size 3.999 GiB (4293595136 bytes, 1048241 blocks of 4 KiB)
Partition 4: 141.4 GiB (151813992960 bytes, 296511705 sectors from 25157790)
Type 0x83 (Linux)
Ext3 file system
Volume name "Data"
UUID 0AD975BD-AAC6-4D98-8063-D230DEDE6D93 (DCE, v4)
Volume size 141.4 GiB (151813992448 bytes, 37063963 blocks of 4 KiB)
Status: Mounted on /opt
This is my Automount info from the web-GUI AFTER the usb hub:
Code:
Disk Info
--- /dev/discs/disc0/disc
Status: Not mounted - Unsupported file system or disk not formated
This is my 'dmesg' AFTER adding the USB Hub and other devices:
Code:
Linux version 2.6.24.111 (eko@dd-wrt) (gcc version 4.1.2) #2749 Wed Oct 13 14:23:24 CEST 2010
CPU revision is: 00019740
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
Entering add_active_range(0, 0, 16384) 0 entries of 256 used
Zone PFN ranges:
Normal 0 -> 16384
HighMem 16384 -> 16384
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0 -> 16384
On node 0 totalpages: 16384
Normal zone: 0 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 16384 pages, LIFO batch:3
HighMem zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order. Total pages: 16384
Kernel command line: console=ttyS0,115200 root=1f02 rootfstype=squashfs noinitrd
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 512 (order: 9, 2048 bytes)
CPU: BCM4716 rev 1 at 532 MHz
Using 266.000 MHz high precision timer.
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 58836k/65536k available (3173k kernel code, 6644k reserved, 1482k data, 224k init, 0k highmem)
Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Generic PHY: Registered new driver
PCI: Using membase 8000000
PCI: Initializing host
PCI: Reset RC
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Setting latency timer of device 0000:01:00.0 to 64
PCI: Fixing up bridge
PCI: Setting latency timer of device 0000:01:00.1 to 64
PCI: Enabling device 0000:01:00.1 (0004 -> 0006)
PCI: Fixing up bus 1
NET: Registered protocol family 2
Time: MIPS clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
WRT610Nv2/E3000 GPIO Init
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
io scheduler noop registered
io scheduler deadline registered (default)
HDLC line discipline: version $Revision: 4.8 $, maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 8) is a 16550A
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
NET: Registered protocol family 24
PPPoL2TP kernel driver, V1.0
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky
PCI: Setting latency timer of device 0000:00:02.0 to 64
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.10.56.27
PCI: Setting latency timer of device 0000:00:01.0 to 64
PCI: Enabling device 0000:01:01.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:01:01.0 to 64
Physically mapped flash: Found 1 x16 devices at 0x0 in 8-bit bank
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x800000 at 0x1c000000
bootloader size: 262144
nvram size: 61440
Physically mapped flash: Filesystem type: squashfs, size=0x636392
partition size = 6552576
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x007f0000 : "linux"
0x00190400-0x007d0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x007f0000-0x00800000 : "nvram"
0x007d0000-0x007f0000 : "ddwrt"
Found a 0MB serial flash
sflash: found no supported devices
Broadcom Watchdog Timer: 0.07 initialized.
u32 classifier
Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
ClusterIP Version 0.8 loaded successfully
TCP bic registered
TCP cubic registered
TCP westwood registered
TCP highspeed registered
TCP hybla registered
TCP htcp registered
TCP vegas registered
TCP scalable registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Welcome to PF_RING 3.2.1
(C) 2004-06 L.Deri
NET: Registered protocol family 27
PF_RING: bucket length 128 bytes
PF_RING: ring slots 4096
PF_RING: sample rate 1 [1=no sampling]
PF_RING: capture TX No [RX only]
PF_RING: transparent mode Yes
PF_RING initialized correctly.
PF_RING: registered /proc/net/pf_ring/
802.1Q VLAN Support v1.8 Ben Greear
All bugs added by David S. Miller
decode 1f02
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 224k freed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Setting latency timer of device 0000:00:04.1 to 64
ehci_hcd 0000:00:04.1: EHCI Host Controller
ehci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:04.1: irq 5, io mem 0x18004000
ehci_hcd 0000:00:04.1: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
USB Universal Host Controller Interface driver v3.0
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
PCI: Setting latency timer of device 0000:00:04.0 to 64
ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:04.0: irq 5, io mem 0x18009000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-1: new high speed USB device using ehci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
[b]hub 1-1:1.0: USB hub found
hub 1-1:1.0: 7 ports detected[/b]
SCSI subsystem initialized
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 1-1.1: new high speed USB device using ehci_hcd and address 3
usb 1-1.1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x03F0 pid 0x6D11
usbcore: registered new interface driver usblp
usb 1-1.6: new high speed USB device using ehci_hcd and address 4
usb 1-1.6: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb 1-1.5: new high speed USB device using ehci_hcd and address 5
usb 1-1.5: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
[b]scsi 0:0:0:0: Direct-Access HP Photosmart D5400 1.00 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] Attached SCSI removable disk
usb-storage: device scan complete
[/b]br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device br0 entered promiscuous mode
Algorithmics/MIPS FPU Emulator v1.5
device vlan1 entered promiscuous mode
device eth0 entered promiscuous mode
device eth1 entered promiscuous mode
[b]scsi 1:0:0:0: Direct-Access Seagate FA GoFlex Desk 0D0B PQ: 0 ANSI: 0
sd 1:0:0:0: [sdb] 3907029167 512-byte hardware sectors (2000399 MB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 0f 00 00 00
sd 1:0:0:0: [sdb] Assuming drive cache: write through
sd 1:0:0:0: [sdb] 3907029167 512-byte hardware sectors (2000399 MB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 0f 00 00 00
sd 1:0:0:0: [sdb] Assuming drive cache: write through
/dev/scsi/host1/bus0/target0/lun0: p1
sd 1:0:0:0: [sdb] Attached SCSI disk
usb-storage: device scan complete
scsi 2:0:0:0: Direct-Access WDC WD16 00SB-01RFA0 0811 PQ: 0 ANSI: 0
sd 2:0:0:0: [sdc] 321672960 512-byte hardware sectors (164697 MB)
sd 2:0:0:0: [sdc] Test WP failed, assume Write Enabled
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] 321672960 512-byte hardware sectors (164697 MB)
sd 2:0:0:0: [sdc] Test WP failed, assume Write Enabled
sd 2:0:0:0: [sdc] Assuming drive cache: write through
/dev/scsi/host2/bus0/target0/lun0: p1 p2 p3 p4
sd 2:0:0:0: [sdc] Attached SCSI disk
usb-storage: device scan complete
[/b]device eth2 entered promiscuous mode
br0: port 3(eth2) entering learning state
br0: port 2(eth1) entering learning state
br0: port 1(vlan1) entering learning state
device br0 left promiscuous mode
device br0 entered promiscuous mode
device br0 left promiscuous mode
device br0 entered promiscuous mode
device vlan2 entered promiscuous mode
device vlan2 left promiscuous mode
br0: topology change detected, propagating
br0: port 3(eth2) entering forwarding state
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state
etherip: Ethernet over IPv4 tunneling driver
nf_nat_pptp: Unknown symbol nf_nat_need_gre
IMQ starting with 2 devices...
IMQ driver loaded successfully.
Hooking IMQ before NAT on PREROUTING.
Hooking IMQ after NAT on POSTROUTING.
IPP2P v0.8.2 loading
IMQ driver unloaded successfully.
IPP2P v0.8.2 unloaded
IMQ starting with 2 devices...
IMQ driver loaded successfully.
Hooking IMQ before NAT on PREROUTING.
Hooking IMQ after NAT on POSTROUTING.
IPP2P v0.8.2 loading
Any help getting this working would be greatly appreciated.
Last edited by twig123 on Sun Jan 16, 2011 11:17; edited 1 time in total
Been trying plugging things in at different times and such, but I don't think that is helping any. I tried to do a mount command in the startup script (mind you I really don't know what I'm doing), however, since the "host" for the Optware drive keeps changing when the router reboots, my script never appears to do anything...
can you post the output of following commands from a telnet/SSH session(preferably):
1) mount
2) df -h
3) lsusb
4) blkid
else you may also try to run these commands from administration/commands/run commands (one by one) _________________ 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)
---
With only my original drive connected to the USB Hub:
Code:
#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)
/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime,data=ordered)
/dev/sda4 on /mnt type ext3 (rw,noatime,data=ordered)
/dev/sda3 on /tmp/c type ext3 (rw,noatime,data=ordered)
#lsusb
Bus 001 Device 003: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter
Bus 001 Device 002: ID 2001:f103 D-Link Corp. [hex]
Bus 001 Device 001: ID 0000:0000
After conneceting the 2nd drive and Printer to USB Hub (without rebooting the router):
Code:
#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)
/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime,data=ordered)
/dev/sda4 on /mnt type ext3 (rw,noatime,data=ordered)
/dev/sda3 on /tmp/c type ext3 (rw,noatime,data=ordered)
/dev/discs/disc0/part3 on /opt type ext3 (rw,data=ordered)
/dev/discs/disc0/part1 on /opt type ext3 (rw,data=ordered)
#lsusb
Bus 001 Device 005: ID 03f0:6d11 Hewlett-Packard
Bus 001 Device 004: ID 0bc2:50a1 Seagate RSS LLC
Bus 001 Device 003: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter
Bus 001 Device 002: ID 2001:f103 D-Link Corp. [hex]
Bus 001 Device 001: ID 0000:0000
After connecting the 2nd drive and Printer to the USB Hub and rebooting the router:
Code:
#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)
Filesystem Size Used Available Use% Mounted on
/dev/root 6.3M 6.3M 0 100% /
All of us with more than one storage devices are facing the same problem double/triple mounts on /opt which kills(i.e. makes it inaccessible) optware. In your second case you have triple mounts but /opt is back in there hence optware commands are still running without reboot. When you reboot because of double mount, opt folder is probably double mounted and thus optware does not start hence no optware commands etc work. after reboot,if you issue "umount /opt" using GUI commands, optware commands may start working but optware is still not started. Probably your output was too early before the full boot.
so the issue here is:
1) (probably) automount/dd-wrt are mouting the first partiton to /opt for EVERY DEVICE(this is not a good approach for users with USB HUB or more than one USB ports.
This should get resolved by using "service automount nomount /dev/sdb1" and "mount -n /dev/sdb1 /tmp/d" as mentioned by Frater in some of his posts but the problem is that device names are changing often. The same HDD will become /dev/sda sometimes.
2) the device names keep changing(I don't know why), this probably making automount to confuse even though it uses UUID of the device.
3) In my case even a command like "/opt/bin/ntfs-3g /dev/sdb1 /tmp/d" crashes by router, although it loads the ntfs drivers dynamically.
my recommendation to you would be to setup a kiwi log server on a windows desktop and set the logging to maximum using security->log management but keeping dropped/rejected/accepted to disabled. This will help you see what is happening and when.
I have also tried almost everything but the biggest probelm is that automount is doing double mount on the /opt mountpoints because "optware the right way" requires automatic drive mount to /opt and this is causing all second USB storage to also be mounted in the /opt which eventually kills optware.
I wish i could find a way to only automatically mount the optware device and use the script way to mount other devices and i could bypass this problem but I am not successful yet. I will post my reply here is i find a solution. _________________ 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)
---
I'm not that knowledgeable about DD-WRT yet, so I'm kinda just going with the flow... I've looked through the wiki but didn't have any luck following the directions on installing HDSamba2 (Something about not being able to find JFFS). I searched and found that the JFFS issue may be because I used a "mega" build on my router, so maybe I need to reflash with a "big" build instead (think someone said "mega" doesn't enable/format JFFS correctly...)?
I noticed there is a HDSamba3 (which should include samba 3.5), but everything I've found is how to UPGRADE from HDSamba2 to HDSamba3.
Is there a way to just install HDSamba3 (to my router that already has OTRW running) without first going through the HDSamba2 steps first?
Just make sure your /opt is mounted on the lowest partition on the slot with the lowest number.
Leave it there and put subsequent USB devices in the other slots.
Let me know which version of automount you are running and which version of DD-WRT.
Also delete the file /opt/etc/automount before you start swapping disks.
I've asked for feedback after changing automount recently, but I'm not getting any feedback I can work with. _________________ 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
Pffff...
Just examined S35automount....
I did some changes (again) and I do hope it's an improvement.
My coding improved since writing it, but it takes time to understand why I'm doing things the way I'm doing it...
I constantly have the urge to completely change it, as it's quite hard to think of every scenario.
Please try this latest version... _________________ 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
I messed some things up when trying to install HDSamba, so I wiped OPT and started fresh again (just a few hours ago).
I'm trying to go about without asking to be spoon-fed what to do line for line... but feel free to feed me if need be.
frater wrote:
Just make sure your /opt is mounted on the lowest partition on the slot with the lowest number.
Leave it there and put subsequent USB devices in the other slots.
Sorry for the ignorance, but I'm not clear on what this means (as I'm still learning DD-WRT).
My Optware is installed on the first partition on my first hard drive and plugged into the 1st port on my USB Hub. However, when (w/ automount on) I connect a 2nd drive it kills /opt (with double mount it believe). When I reboot with 2 drives attached, the device keeps switching around (ex: one time it will be 'sda' while another it will be 'sdb').
I now see I can use the "mount -U" to mount via UUID, this may help me... I think
Is this what I should do?
-------------------------
;To mount 'Optware' partition (Part1)
mount -U acd1d8b9-f130-4cd8-b21c-426f09adf1d0 /opt
;To mount 'SwapFile' partition (Part2)
mount -U c2f5d97e-381e-4d52-9425-b945117fb6b0 ?????????????
(No clue what to mount this to, I think Optware automatically did something with this, but I'm not sure)
;To mount 'JFFS' partition (Part3)
mount -U 48eeeb94-4926-41db-9f1c-45558089c639 /tmp/c
(Taking it from my previous output above, Is this right?)
(I'm not sure this is being used or not...)
;To mount 'Data' partition (Part4)
mount -U 0ad975bd-aac6-4d98-8063-d230dede6d93 /mnt
Edit: Scratch that idea... 'mount -U' doesn't work when /opt isn't mounted *sigh*
frater wrote:
Let me know which version of automount you are running and which version of DD-WRT.
Router: Linksys E3000
Automount: Not sure how to check the version. (whatever comes with OTRW as of a couple hours ago)
Firmware: DD-WRT v24-sp2 (10/13/10) mega - build 15453M NEWD-2 K2.6 Eko
frater wrote:
I've asked for feedback after changing automount recently, but I'm not getting any feedback I can work with.
Just let me know what/how to test and I'd be glad to provide some feedback. =P
I would first like to know if DD-WRT is the culprit or the automount feature in OTRW.
Give a 'service automount off'
This will make /opt/etc/init.d/S35automount non-executable. This is what we want.
Turn automount on in the webif....
reboot the router
delete /opt/etc/automount
Check your partitions and mounts
Add a device and check them again
run 'bash /opt/etc/init.d/S35automount start'
check partitions and mounts again...
If DD-WRT is the culprit, I could write something that will only mount a certain partition... _________________ 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
If DD-WRT is the culprit, you could turn automount off in the webif and use this code to mount the correct partition
Code:
insmod mbcache
insmod jbd
insmod ext2
insmod ext3
mknod /dev/sda2 b 8 2
mknod /dev/sdb2 b 8 18
mknod /dev/sdc2 b 8 34
prt='478144 sd.2'
n=1
while [ $n -lt 500 ] ; do
echo "`date` $n $p" >>/tmp/mnt
if [ -z "$p" ] ; then
p=`grep "$prt" /proc/partitions | awk '{print $4}'`
else
grep -q '/opt' /proc/mounts && break
mount -o noatime /dev/$p /opt
fi
let n+=1
sleep 1
done
You should do a 'cat /proc/partitions' to see what you need to put in 'prt='
Replace the letter (a/b/c/d..) with a dot as a wildcard.
It will not work properly if the blocksizes of your different partitions are the same.
I don't know if you need to start optware then or if DD-WRT will do it. I haven't seen how they implemented it on my request.
You need to place this after the loop if nothing happens:
Code:
/opt/etc/init.d/optS &
_________________ 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
Disabled 'Automatic Drive Mount' (From WebIF)
deleted '/opt/etc/automount' (before reboot, as I don't know how without opt or samba)
# reboot
# 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)
#mount (2nd drive added)
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)
Think I'm missing something, was I supposed to mount a partition manually somehow?
(sorry, I may need to be spoon-fed what to do)
I haven't wiped OPT yet, should I do that and start fresh to get your latest update?
PS: Thanks for all the quick replies.
(6:50am here so I'm off to bed. I have to be up in ~5hrs though, so I can test some more then)
Let's assume DD-WRT is sometimes mounting 1 blockdevice as /dev/sda and then as /dev/sdb
This means some other partition gets mounted as /opt
We don't want this!
Use my (untested, but I think it's alright) code to mount a certain partition by giving its size and its partition number as a reference (what's in prt=).
Maybe your troubles are over then. _________________ 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