Can't change /tmp/c to /mnt with Automount

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
rikglyn
DD-WRT Novice


Joined: 03 Feb 2011
Posts: 5

PostPosted: Thu Feb 03, 2011 11:04    Post subject: Can't change /tmp/c to /mnt with Automount Reply with quote
Hi all,

Just installed dd-wrt and the Optware for the first time. Very pleased with both results.

Would like to have ext3 data partition mounted on /mnt with Automount. Searched forum and followed instructions in this thread topic 86875 but after several attempts, including automount restarts and reboots, automount still mounting device/partition to /tmp/c.

Any help would be greatly appreciated.

==========================
WRT610N
v24 sp2 03/24/10 mega
Sponsor
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu Feb 03, 2011 12:42    Post subject: Reply with quote
Code:
service automount umount /tmp/c
service automount start


This may not work because there's a reservation of /mnt in /opt/etc/automount. The version automount you are using doesn't allow the removal of such an entry if it is not mounted.
I just added some code so it's now possible to use the command "umount" if it's not mounted at the moment.

Code:
wget -O /opt/etc/init.d/S35automount http://wd.mirmana.com/S35automount
service automount umount /tmp/c
service automount umount /mnt
service automount start


run "service automount" to show its status

_________________
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)


Last edited by frater on Thu Feb 03, 2011 17:33; edited 1 time in total
rikglyn
DD-WRT Novice


Joined: 03 Feb 2011
Posts: 5

PostPosted: Thu Feb 03, 2011 17:30    Post subject: Still can't change /tmp/c to /mnt with Automount Reply with quote
Thanks for your help frater.

Installed automount update, restarted and rebooted but still getting the following.

root@DD-WRT:~# service automount
Mounted partitions in automount:
/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime)
/dev/scsi/host0/bus0/target0/lun0/part3 on /tmp/c type ext3 (rw,noatime)
Mounted partitions NOT in automount:
/dev/scsi/host0/bus0/target0/lun0/part3 on /mnt type ext3 (rw,noatime)
Unmounted attached partitions to be hotmounted:
Unmounted attached partitions (unassigned):
Unmounted attached partitions which should not be mounted:
Unattached partitions in automount:
Unrecognized partitions:

Still can't get automount not to mount /dev/scsi/host0/bus0/target0/lun0/part3 on /tmp/c on reboot.

Also, the 'mount' option as per the Wiki does not now seem to be an option.
e.g.
root@DD-WRT:~# service automount mount /dev/scsi/host0/bus0/target0/lun0/part3 /mnt
Usage: /opt/etc/init.d/S35automount (start | stop | status | umount <blockdevice|mountpoint> | nomount <blockdevice> | nonomount <blockdevice>)

How does the partition get auto mounted then?

Sorry to be dim but am I missing something? How do I ensure automount on each reboot?

Please excuse a noob.

Richard.

=====================
WRT610N
v24 sp2 03/24/10 mega
(SVN revision 14144)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu Feb 03, 2011 17:41    Post subject: Reply with quote
I don't know if 'mount' ever was an option. I thought so until I noticed it wasn't during an edit. It may have been lost...

But it doesn't necessarily need that option. It's not called automount for nothing. I did forget the line
Code:
service automount umount /mnt
in my previous post. You should unmount both the /tmp/c and /mnt. Afterwards it should assign the first free partition to /mnt.

Do you have some code somewhere that mounts /dev/scsi/host0/bus0/target0/lun0/part3 to /mnt?
If so, remove it.

_________________
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)
rikglyn
DD-WRT Novice


Joined: 03 Feb 2011
Posts: 5

PostPosted: Thu Feb 03, 2011 18:19    Post subject: Reply with quote
frater

Tried unmounting partion and both /tmp/c and /mnt.

When I restart automount the partition is still on /tmp/c.

I have no script loading /dev/scsi/host0/bus0/target0/lun0/part3 on /tmp/c.


Richard.


root@DD-WRT:~# service automount

Mounted partitions in automount:
/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime)
/dev/scsi/host0/bus0/target0/lun0/part3 on /tmp/c type ext3 (rw,noatime)
Mounted partitions NOT in automount:
Unmounted attached partitions to be hotmounted:
Unmounted attached partitions (unassigned):
Unmounted attached partitions which should not be mounted:
Unattached partitions in automount:
Unrecognized partitions:

root@DD-WRT:~# service automount umount /tmp/c

/dev/scsi/host0/bus0/target0/lun0/part3 /tmp/c ext3 rw,noatime 0 0
S35automount: /tmp/c is not mounted or should not be unmounted

root@DD-WRT:~# service automount umount /mnt

root@DD-WRT:~# service automount start
Start service "automount" (/opt/etc/init.d/S35automount)
service: Start service: "automount" (/opt/etc/init.d/S35automount)
root@DD-WRT:~#

root@DD-WRT:~# service automount

Mounted partitions in automount:
/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime)
/dev/scsi/host0/bus0/target0/lun0/part3 on /tmp/c type ext3 (rw,noatime)
Mounted partitions NOT in automount:
Unmounted attached partitions to be hotmounted:
Unmounted attached partitions (unassigned):
Unmounted attached partitions which should not be mounted:
Unattached partitions in automount:
Unrecognized partitions:
root@DD-WRT:~#
twig123
DD-WRT User


Joined: 02 Oct 2010
Posts: 56

PostPosted: Thu Feb 03, 2011 18:23    Post subject: Reply with quote
Not sure if it is the same thing, but I had a partition that would get mounted to /tmp/d that I wanted as /mnt instead. I just opened /opt/etc/automount and changed the line that said "/tmp/d" to "/mnt", rebooted and mounts the partition to /mnt without any issues.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu Feb 03, 2011 18:38    Post subject: Reply with quote
twig123 wrote:
Not sure if it is the same thing, but I had a partition that would get mounted to /tmp/d that I wanted as /mnt instead. I just opened /opt/etc/automount and changed the line that said "/tmp/d" to "/mnt", rebooted and mounts the partition to /mnt without any issues.

I was interested if it would have worked with the commands I gave you... (I changed the code for this)

_________________
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)
zmonkey
DD-WRT Novice


Joined: 26 Feb 2009
Posts: 7

PostPosted: Thu Feb 03, 2011 19:00    Post subject: Reply with quote
That fixed the problem I was having in a post I just made, so thanks! (changing automount file) However, now I'm wondering what I do to set up a network directory I can read from and write to? Is that something I can do easily in Samba-SWAT?

Thanks,
-z

I'm new to all this, also, so sorry if it's a very rudimentary question, or if it's a thread hijack. If either is true, let me know, I'll start a new thread, or go back to my original one.

_________________
Currently running:
Router Name
DD-WRT
Router Model
Netgear WNR3500v2/U/L
Firmware Version
DD-WRT v24-sp2 (11/09/10) big - build 15704
rikglyn
DD-WRT Novice


Joined: 03 Feb 2011
Posts: 5

PostPosted: Thu Feb 03, 2011 20:15    Post subject: Reply with quote
frater, twig123

Tried the suggestion of editing /opt/etc/automount and rebooting and it still mounts to /tmp/c. Also get an unassigned message.

root@DD-WRT:~# service automount
Mounted partitions in automount:
/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime)
/dev/scsi/host0/bus0/target0/lun0/part3 on /tmp/c type ext3 (rw,noatime)
Mounted partitions NOT in automount:
Unmounted attached partitions to be hotmounted:
Unmounted attached partitions (unassigned):
Unmounted attached partitions which should not be mounted:
Unattached partitions in automount:
/mnt 0ca369bc-8969-4e8c-b3dc-b4aa09044376 ext3
Unrecognized partitions:
root@DD-WRT:~


zmonkey, could you start a new thread please. I'd like to focus on getting a resolution to my specific prob, Thanks
rikglyn
DD-WRT Novice


Joined: 03 Feb 2011
Posts: 5

PostPosted: Fri Feb 04, 2011 12:51    Post subject: Reply with quote
twig123

re my last post I mis-edited /opt/etc/automount on first attempt. Tried again today, just editing /opt/etc/automount, changing /tmp/c to /mnt for the relevant partition. Restarted and autorun - all OK! Then rebooted and still all OK.

So thanks to everyone for your help.

Now to get samba set up Smile
edugo
DD-WRT Novice


Joined: 07 Feb 2011
Posts: 3
Location: Brazil

PostPosted: Sat Feb 19, 2011 14:39    Post subject: Can't change /tmp/c to /mnt with Automount Reply with quote
frater wrote:
Code:
service automount umount /tmp/c
service automount start


This may not work because there's a reservation of /mnt in /opt/etc/automount. The version automount you are using doesn't allow the removal of such an entry if it is not mounted.
I just added some code so it's now possible to use the command "umount" if it's not mounted at the moment.

Code:
wget -O /opt/etc/init.d/S35automount http://wd.mirmana.com/S35automount
service automount umount /tmp/c
service automount umount /mnt
service automount start


run "service automount" to show its status

Hey frater,

I was trying to create a customized mount structure like this:

Code:

mkdir /opt/mnt
mkdir /opt/mnt/orion
mkdir /opt/mnt/sheratan
mount -n -t ext3 -o noatime /dev/sda3 /opt/mnt/orion
mount -n -t ext3 -o noatime /dev/sda1 /opt/mnt/sheratan
service automount start


I'm using /opt/mnt because its where I have write access (I don't want to use jjfs) so I can easily change to other dd-wrt units just moving the pen drive.

However I noticed that the automount script cuts out anything starting with "opt" so it does not "memorize" my mount structure under /opt.

So I made a few changes (4 lines) in S35automount (attached) in such a way it preserves the /opt basic mount but allows me to create new mount points under /opt/mnt.

I hope it helps.



S35automount.gz
 Description:
Modified automount service to allow mounts under /opt

Download
 Filename:  S35automount.gz
 Filesize:  5.15 KB
 Downloaded:  553 Time(s)


_________________
---
edugo
FezJay
DD-WRT User


Joined: 11 Sep 2010
Posts: 178

PostPosted: Sat Apr 16, 2011 7:53    Post subject: Reply with quote
frater wrote:
twig123 wrote:
Not sure if it is the same thing, but I had a partition that would get mounted to /tmp/d that I wanted as /mnt instead. I just opened /opt/etc/automount and changed the line that said "/tmp/d" to "/mnt", rebooted and mounts the partition to /mnt without any issues.

I was interested if it would have worked with the commands I gave you... (I changed the code for this)


I managed to get mine working using Fraters approach.

You have to umount all drives first then run services automount start.

I hade 3 drives /mnt/ /tmp/c and /tmp/d.

When I only umounted /mnt/ and /tmp/c nothing changed. But when I did all 3, tmp/c storage was now assigned to mnt.

_________________
dd-wrt eko/V24-K26 15508
Belkin F7D4301
8MB Flash
64MB RAM

Optware (jffs/mnt) 4GB Flash Drive
raceface
DD-WRT Novice


Joined: 17 Apr 2008
Posts: 12

PostPosted: Thu Apr 21, 2011 17:45    Post subject: Reply with quote
Hey guys,

I have nearly the same issue. I installed optware on following configuration:

- USB Stick (2GB) with 2 partitions, 1. EXT3; 2. SWAP
- HDD (1TB) with 3 partitions, all NTFS

At the first run after installing optware everything went fine, USB stick was mounted to /opt, first partition on HDD to /mnt, second to /tmp/c and third to /tmp/d.

But after a reboot automount mounts all HDD partitions to /mnt.

There is no other mounting script running and I also tried the new S35automount script.

So as next I stopped automount and ran it again and following happened:

Code:
root@DD-WRT:~# service automount start
Start service "automount" (/opt/etc/init.d/S35automount)
service: Start service: "automount" (/opt/etc/init.d/S35automount)
S35automount: Added /opt/etc/init.d/S35automount as cronjob so I can do a hotmount
S35automount: Mount ntfs partition "/dev/scsi/host1/bus0/target0/lun0/part1" on /mnt with /opt/bin/ntfs-3g
WARNING: Deficient Linux kernel detected. Some driver features are
         not available (swap file on NTFS, boot from NTFS by LILO), and
         unmount is not safe unless it's made sure the ntfs-3g process
         naturally terminates after calling 'umount'. If you wish this
         message to disappear then you should upgrade to at least kernel
         version 2.6.20, or request help from your distribution to fix
         the kernel problem. The below web page has more information:
         http://ntfs-3g.org/support.html#fuse26

S35automount: Automounted 74120CA8120C7182 to /mnt
S35automount: Mount ntfs partition "/dev/scsi/host1/bus0/target0/lun0/part2" on /tmp/c with /opt/bin/ntfs-3g
WARNING: Deficient Linux kernel detected. Some driver features are
         not available (swap file on NTFS, boot from NTFS by LILO), and
         unmount is not safe unless it's made sure the ntfs-3g process
         naturally terminates after calling 'umount'. If you wish this
         message to disappear then you should upgrade to at least kernel
         version 2.6.20, or request help from your distribution to fix
         the kernel problem. The below web page has more information:
         http://ntfs-3g.org/support.html#fuse26

S35automount: Automounted 885420C05420B2BC to /tmp/c
S35automount: Mount ntfs partition "/dev/scsi/host1/bus0/target0/lun0/part3" on /tmp/d with /opt/bin/ntfs-3g
WARNING: Deficient Linux kernel detected. Some driver features are
         not available (swap file on NTFS, boot from NTFS by LILO), and
         unmount is not safe unless it's made sure the ntfs-3g process
         naturally terminates after calling 'umount'. If you wish this
         message to disappear then you should upgrade to at least kernel
         version 2.6.20, or request help from your distribution to fix
         the kernel problem. The below web page has more information:
         http://ntfs-3g.org/support.html#fuse26

S35automount: Automounted 28FC5726FC56EE16 to /tmp/d
root@DD-WRT:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 5760      5760         0 100% /
/dev/mtdblock/4           1280       324       956  25% /jffs
/dev/scsi/host0/bus0/target0/lun0/part1
                       1511068    398132   1036156  28% /opt
/dev/scsi/host1/bus0/target0/lun0/part1
                     102399996  76629456  25770540  75% /mnt
/dev/scsi/host1/bus0/target0/lun0/part2
                     102399996  76629456  25770540  75% /mnt
/dev/scsi/host1/bus0/target0/lun0/part3
                     102399996  76629456  25770540  75% /mnt


So automount tried to mount to /tmp/c and /tmp/d but couldn't do. The problem appeared after updating to samba35 and swat35. Can that be the problem?

Thx for help

Andy



dmesg.txt
 Description:

Download
 Filename:  dmesg.txt
 Filesize:  14.31 KB
 Downloaded:  415 Time(s)


dmesg.txt
 Description:
dmesg log

Download
 Filename:  dmesg.txt
 Filesize:  14.31 KB
 Downloaded:  312 Time(s)


dmesg.txt
 Description:
demesg log

Download
 Filename:  dmesg.txt
 Filesize:  14.31 KB
 Downloaded:  350 Time(s)

raceface
DD-WRT Novice


Joined: 17 Apr 2008
Posts: 12

PostPosted: Fri Apr 22, 2011 9:33    Post subject: Reply with quote
Hey,

I think, I found the problem. At first I thought it might be xinetd service. So I renamed S10xinetd to S36xinetd, the problem stayed. After that I cleaned the /opt/etc/automount rebooted and everything went fine.

No I am looking to modify the reboot to clean the /opt/etc/automount. How can I do that?

thx

Andy
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Fri Apr 22, 2011 10:16    Post subject: Reply with quote
There was an error in S35automount.
I fixed it an hour ago.

_________________
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)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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