Results 1 to 9 of 9

Thread: Where and when does my partitions get mounted?

  1. #1

    Where and when does my partitions get mounted?

    All my partitions are automounted at startup, which is a good thing, but mounted in the wrong place, which is not such a good thing.

    Right now, in my post-mount file I have:

    Code:
    umount /tmp/harddisk/part1
    umount /tmp/harddisk/part2
    umount /tmp/harddisk/part3
    umount /tmp/harddisk 
    
    mkdir /tmp/harddisk/part1
    mkdir /tmp/harddisk/part5
    mkdir /tmp/harddisk/part6
    mkdir /tmp/harddisk/part7
    
    mount /dev/discs/disc0/part1 /tmp/harddisk/part1
    mount /dev/discs/disc0/part5 /tmp/harddisk/part5
    mount /dev/discs/disc0/part6 /tmp/harddisk/part6
    mount /dev/discs/disc0/part7 /tmp/harddisk/part7
    ... which is kinda lame to unmount then remount the partition to the right place.
    How to mount the partitions to the right place from beginning?


    BTW, if it helps, I have the following lines in my post-boot script:

    Code:
    if [ ! -d /dev/discs ]
    then
    insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
    fi
    
    
    #Wait for /opt to mount
    mount /dev/discs/disc0/part4 /opt
    i=0
    while [ $i -le 30 ]
    do
    if [ -d /opt/etc ]
    then
    break
    fi
    sleep 1
    i=`expr $i + 1`
    done
    
    # Activate swap
    swapon /dev/discs/disc0/part3

  2. #2
    Hi,

    I think, like you've mounted partition4 in the post-boot script, you should mount the other partitions the same way.. (without the wait)

    so after you have mounted part 4 and set up the swap-space, use something like

    Code:
    mount /dev/discs/disc0/part1 /opt1 #(or another place to mount)
    mount /dev/discs/disc0/part5 /opt5 #(or another place to mount)
    mount /dev/discs/disc0/part6 /opt6 #(or another place to mount)
    mount /dev/discs/disc0/part7 /opt7 #(or another place to mount)
    btw.. why do you unmount the 3rd partition? you're using it as a swap-space.. I don't think this can be unmounted using the command you have posted..

  3. #3
    I'm not umounting the swap partition, I umount /tmp/harddisk/part3. This is not the swap.

    I tried to mount them after the swap (so after the waiting part) but with no succes.

    If I do it before mounting opt should I have more succes?

    Also, I still don't know the answer to my question... who is mounting them in the wrong place and ... why?

  4. #4
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    10
    Hi,

    I have the same problem with my wl-500gP.

    My guess is that there is some automounting after the usb-storage module was loaded during the boot process but I can't find anything useful in that direction.

    Up to now I am doing the "umount -> mount" procedure like you, too.

    When I find out something I will post it here... seems we are not the only ones with that

  5. #5
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    Well SCSI hotplug is mounting your device. It is very useful when a stick or any storage device is plugged to the asus at runtime. And It's easy to mount them before the automount, just do it in your post-boot.
    Anyhow, it looks ugly, but will work.
    I would try the following:

    #!/bin/sh
    # post-boot
    if [ ! -d /dev/discs ]
    then
    insmod scsi_mod && insmod sd_mod && insmod usb-storage #no delay
    fi

    #Wait for /opt to mount
    mount /dev/discs/disc0/part4 /opt
    i=0
    while [ $i -le 10 ]
    do
    if [ -d /opt/etc ]
    then
    break
    fi
    sleep 1
    i=`expr $i + 1`
    done

    #activate swap
    swapon /dev/discs/disc0/part3


    if [ ! -d /tmp/harddisk/part1 ] # when dir does not exist
    then
    mkdir /tmp/harddisk/part1
    fi
    mount /dev/discs/disc0/part1 /tmp/harddisk/part1

    if [ ! -d /tmp/harddisk/part5 ] # when dir does not exist
    then
    mkdir /tmp/harddisk/part5
    fi
    mount /dev/discs/disc0/part5 /tmp/harddisk/part5

    if [ ! -d /tmp/harddisk/part6 ] # when dir does not exist
    then
    mkdir /tmp/harddisk/part6
    fi
    mount /dev/discs/disc0/part6 /tmp/harddisk/part6

    if [ ! -d /tmp/harddisk/part7 ] # when dir does not exist
    then
    mkdir /tmp/harddisk/part7
    fi
    mount /dev/discs/disc0/part7 /tmp/harddisk/part7
    i=0
    while [ $i -le 10 ]
    do
    if [ -d /tmp/harddisk/part7 ]
    then
    break
    fi
    sleep 1
    i=`expr $i + 1`
    done
    # do here what you need

    have fun..

  6. #6
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    To avoid auto mount just disable stupid-ftpd in the web-IF.

  7. #7
    Doenst work for me..

    I disabled stupid-ftpd and it automounts.. (i started it manualy, is this maybe the automount?)

  8. #8
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    10
    I did disable NFS,FTP and SAMBA in the Web Interface, then configured Samba2 like the tutorials suggested and the automounting reoccured none the less...

    But I think I fixed this problem by unset'ing the nvram options concerning the mountpoints in question, eg. /tmp/harddisk.

    ( nvram show | grep /tmp/harddisk )

    The router is up and running since Saturday (4 days uptime) and the problem never occured again.

    TJ

  9. #9
    Which parameter did you change or which version do you have?

    I have no parameter which includes /tmp/harddisk or harddisk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •