How to: Fix automount of USB/MMC/SD etc.

Discussion in 'Linux' started by Tybor, Oct 7, 2008.

  1. Tybor

    Tybor

    Joined:
    Jul 11, 2008
    Messages:
    62
    Likes Received:
    0
    Location:
    Austria
    Hi,

    You must have done something wrong.
    Check the second part (where the "# restart Xfce Desktop" is) for any typo.
    It seems the Desktop is killed but not restarted.

    greetz,
    Tybor
     
    Tybor, Nov 3, 2008
    #21
  2. Tybor

    Jaycb

    Joined:
    Sep 24, 2008
    Messages:
    51
    Likes Received:
    0
    Tybor,
    thanks for this thread - was able to fix my apparently lost left and right card readers after live update hosed them.
    Cheers!
     
    Jaycb, Nov 21, 2008
    #22
  3. Tybor

    ArievH

    Joined:
    Oct 20, 2008
    Messages:
    48
    Likes Received:
    0
    Hi there!
    Thank you very much for this really nice fix.
    After using the equally nice thread "how to get the desktop you've always wanted in 10 easy steps", my removable drives did not show up in Thunar.
    Now they do!!
    Thank you.

    There is one issue, however (I my case anyway)
    I edited the xfcepost script some more to see the removable drives on the desktop.
    This worked, that's not the problem.
    The problem is that after that my WLan-connection, sometimes did and sometimes didn't show up automatically.
    Sometimes I had to reboot, once or twice and than WLan did connect automatically, but sometimes never, regardless how many times I rebooted.

    Finally, I removed the lines in xfcepost and in xfdesktoprc I changed show-removable=true to show-removable=false
    Saved and rebooted and up to now WLan connects automatically everytime.

    Anyone any idea how come?

    Greetz
    Arie
     
    ArievH, Dec 7, 2008
    #23
  4. Tybor

    ash r

    Joined:
    Dec 13, 2008
    Messages:
    8
    Likes Received:
    0
    Hi,

    I tried to added the 'killall Thunar' part to the file and now I am getting this error when I boot up:
    I can confirm Thunar is installed.

    Any help would be great. Many thanks

    Ash R
     
    ash r, Dec 14, 2008
    #24
  5. Tybor

    Tybor

    Joined:
    Jul 11, 2008
    Messages:
    62
    Likes Received:
    0
    Location:
    Austria
    Hi Ash R,

    Can you confirm that the Thunar service is running when finished boot?
    Thunar is restarted after the "sleep 10". Perhaps some other service/program wants to access some services of Thunar (wastebasket) and complains about this because Thunar isn't running.
    You could try to minimize the time Thunar is not running by moving the "killall Thunar" after "sleep 10".

    gr33tz,
    Tybor
     
    Tybor, Dec 16, 2008
    #25
  6. Tybor

    ArievH

    Joined:
    Oct 20, 2008
    Messages:
    48
    Likes Received:
    0
    ArievH, Dec 17, 2008
    #26
  7. Tybor

    ArievH

    Joined:
    Oct 20, 2008
    Messages:
    48
    Likes Received:
    0
    Dear ash r
    In viewtopic.php?f=67&t=7928&st=0&sk=t&sd=a&start=10
    We solved the problem (thanks to ryan021!!!)

    What we did was swap the xfdesktop to client4 and xfcepost to client3 in the xfce4-session.rc file.

    Maybe this suggestion is helpfull for you also.

    Greetz

    Arie
     
    ArievH, Dec 19, 2008
    #27
  8. Tybor

    jesseosby

    Joined:
    Aug 29, 2008
    Messages:
    5
    Likes Received:
    0
    Arie, I am having the same problem. I tried swapping xfdesktop and xfcepost around as you mentioned in a later post, but it still intermittently fails. Did that fix it for you?

    I compared the list of running processes on boots where it worked and ones where it didn't and determined the NetworkManager process wasn't running when it didn't work. But it is getting launched by /etc/rc.d/rc5.d/S99NetworkManager, so I think for some reason it's crashing on some boots.

    I ended up removing the symlink /etc/rc.d/rc5.d/S99NetworkManager and added a line at the bottom of my /usr/bin/xfcepost:
    Code:
    sudo /etc/rc.d/init.d/NetworkManager start
    Now it works consistently on every boot, but it doesn't seem like the most elegant solution. I'd like to know what about these changes to fix the automounting is causing NetworkManager to sometimes crash.
     
    jesseosby, Dec 22, 2008
    #28
  9. Tybor

    Tybor

    Joined:
    Jul 11, 2008
    Messages:
    62
    Likes Received:
    0
    Location:
    Austria
    Hi jesseosby,

    Interesting circumstance. I do not know any link between the changes to fix automounting and the network manager.

    The AAO uses a highly modified startup procedure (xfce start within .bash_profile; xfcepost to start services ...) to display the desktop as early as possible. So changing something might break some dependencies and might occur at random times because of runtimes.
    Your solution with starting the network manager in xfcepost is the best way to work around your problem.

    If you like to get some more details about you boot process and how some services started install bootchart.
    It helps you a lot in optimizing or finding boot related problems.

    gr33tz,
    Tybor
     
    Tybor, Dec 23, 2008
    #29
  10. Tybor

    ArievH

    Joined:
    Oct 20, 2008
    Messages:
    48
    Likes Received:
    0
    Hello jesseosby,
    No, unfortunately, the first action I described didn't solve the problem. It seemed at first, but I guess it was just sheer luck, the first copple of boots.
    The second action I described wasn't intent to fix the WLAN-problem, but the "waste-basket-problem". That was fixed by it.

    Now back to the WLAN.
    I am very interested in aplying your solution on my AAO but, being a complete newbie in Linux, I'm afraid I'm going to completely mess things up.
    So please help me with this!
    1. I located the S99NetworkManager, can I remove it by simply deleting it?
    2. In terminal I can open xfcepost with: sudo mousepad /usr/bin/xfcepost
    But my question is: where must I put it AND what is exactly the line I have to add??

    Here's the content of my xfcepost-file

    #!/bin/sh
    #Launch xfce4-panel now,after xfce-mcs-manager actually.Rain @ 08/04/11.
    #/usr/bin/compiz-manager &
    #/usr/bin/xfwm4 &

    ## Moving to xfce4-session.rc,let panel comes out earlier,Rain @ 08/05/14.
    #sleep 1
    #while true
    #do
    # mcspid=
    # mcspid=`pidof xfce-mcs-manager`
    # if [ "X${mcspid}" != "X" ]; then
    # /usr/bin/xfce4-panel &
    # sleep 2
    # break
    # fi
    #done
    ## Rain @ 08/05/14.

    #sleep 3
    #/usr/bin/xfdesktop --quit & >/dev/null 2>&1
    #/usr/bin/xfce-mcs-manager.new >/dev/null 2>&1
    #/usr/bin/xfdesktop & >/dev/null 2>&1
    #/usr/bin/compiz-manager &
    while true
    do
    halpid=
    halpid=`pidof hald`
    if [ "X${halpid}" != "X" ]; then
    killall Thunar
    sleep 10
    if [ "X`pidof Thunar`" == "X" ]; then
    Thunar --daemon >/dev/null 2>&1 &
    fi
    break
    fi
    sleep 1
    done
    # restart Xfce Desktop
    #/usr/bin/xfdesktop-xfce --quit & >/dev/null 2>&1
    #sleep 1
    #/usr/bin/xfdesktop-xfce & >/dev/null 2>&1
    #Set system time now,Rain @ 08/04/09.
    #[ -x /sbin/hwclock ] && /sbin/hwclock --hctosys

    Greetz
    Arie
     
    ArievH, Dec 23, 2008
    #30
  11. Tybor

    ch1mp

    Joined:
    Nov 16, 2008
    Messages:
    3
    Likes Received:
    0
    GRRRRRRRRRRRRRR
    how this be so complicated... not your instructions as I have now manged to edit my xfcepost and xfdesktoprc files (having rebuilt the xfcepost to Arie's after I managed to save it only as:
    if [ "X${halpid}" != "X" ]; then
    killall Thunar
    sleep 10

    The first time around). I also tried this http://www.aspireoneuser.com/forum/viewtopic.php?f=67&t=8933 for good meassure too.

    However, I am still getting:
    Failed to mount "SD/MMC Drive".
    org.freedesktop.hal.storage.mount-removable no <-- (action, result).


    Anyone got any ideas? How can everything be so complicated?!!!!! :evil:
    Even Macles* VB script doesn't like me :( http://macles.blogspot.com/2008/11/virt ... linux.html. I appreciate Linux doesn't owe me anything... but I would just like to transfer the pictures from NYE party from and SD card... not trying to take over the world.
     
    ch1mp, Jan 2, 2009
    #31
  12. Tybor

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels


    • However, in my file xfcepost there is no sleep 10. I bought the AA1 mid December. Could it be that ACER has taken care of the problem?

      Winfried
     
    Winfried, Jan 18, 2009
    #32
  13. Tybor

    solpuerto

    Joined:
    Oct 27, 2008
    Messages:
    268
    Likes Received:
    0
    Location:
    UK
    Hi Ace_Rimmer

    I notice your post above about the file system on the Aspire One where you said.

    “However, I just noticed an interesting behavior. I would not call it a problem, really, just "interesting."

    I am using the 8GB SSD version of the One and have a 4GB HCSD card in the left slot. If I create or save a file or directory to the SSD everything proceeds normally. If I create or save a file or directory to the HCSD card, a corresponding file or directory is automatically created on the SSD. This is not a link, it is a full copy. If I then delete this file or directory from the HCSD card, it is also removed from the SSD.

    If I create the file on the SSD then cut it and paste it to the HCSD card, it disappears from the SSD as expected.”

    Like you I was confused about the structure once an SD card was mounted and I did some trial and error work on it. See this link;

    viewtopic.php?f=5&t=7780

    Summarising this when you mount an SD card there are 3 data directories as follows;

    home -------- My Disk/// ------- /mnt/home
    --------(virtual directory)
    SD/MMC Drive ------ Removable Disk------- /media/disk --------(SD card physical directory)
    SSD ------- Fixed Disk ------- /home/user -------(SSD physical disk)

    The virtual directory home is created by merging the data stored on the SSD and SD/MMC physical drives. I assume this is a software created merge and home is set to be displayed to the user rather than have them looking in two different directories. It also gives a greater impression that the SD is added to the SSD. Therefore when the SD card is removed the data disappears from the home directory and leaves any data on the SSD.

    Hope this is of some use.
     
    solpuerto, Jan 20, 2009
    #33
  14. Tybor

    tobiasgideon

    Joined:
    Jan 3, 2009
    Messages:
    2
    Likes Received:
    0
    hi all,

    I wonder if anyone has any other suggestions as I have tried everything in this thread and my automount only for SD cards in both solts still doesnt work unless I killall Thunar and even then it only works intermittantly

    HELP!!!!

    thanks in advance
     
    tobiasgideon, Jan 23, 2009
    #34
  15. Tybor

    sagebrush

    Joined:
    Feb 12, 2009
    Messages:
    18
    Likes Received:
    0
    INSTALL LINUX MINT AND YOU WONT HAVE THESE STUPID PROBLEMS
     
    sagebrush, Feb 16, 2009
    #35
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.