[SOLVED] usb thumb drive unmount and remount by itself
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I have thumb drive connected to a busybox box.I mounted it /opt in initialzation file. However after a while it will unmount itself because it changes its drive letter from sda1 to sdb1. How could a usb device change its drive letter by itself? How could I prevent it happening? Thx.
Something really don't seem right with how you are mounting your device. Can you show the output when you type the following?
I am asking this because where you said "I mounted it /opt in initialzation file" means to me that you are mounting directly to /opt, which you shouldn't do. Have you tried manually mounting your device with no options, just using "mount," and to a different directory?
I think I should tell the story from the begging. -) I installed Tomato, which is based on busybox on my router. There is nothing under /opt folder. In order to install Asterisk on the router I have to attach a usb thumdrive to it because there is not enough space on it. That's the only reason I mount the thumdrive to /opt by myself. I know I shouldn't do it normally. Do you think this is the reason? I didn't hear anyone else complaining this problem though.
Ahhh, so that's why this doesn't all add up. This is your router... You need to explain these things next time...
Now honestly, I never worked with Tomato, but if you say that you shouldn't mount to /opt normally, and you are having a problem, then most likely that is possibly part of the problem. Have you tried mounting it where you are originally supposed to mount? And can you tell me where that is? Thanks man,
I have to mount it to /opt in order to install asterisk because there is no space left on the router. That's the instruction I got from online. But I will try mount it somewhere else just to check whether it works. Thanks for your advice.
After going through all the output you gave me, and what I have thought, this seems to be a Tomato issue. Have you tried there forums? I'm not one to steer someone away from LQ, but I think you will have better luck on there forums. And in all honesty, I have never used Tomato before ever; I was always a DD-WRT guy Here is a link over there - http://www.linksysinfo.org/forums/fo...play.php?f=160
I found this thread on the tomato forums and adapted it to work for me.
In summary what I did was to include the following line in the 'Run after mounting' script:
echo 128 > /sys/block/sda/device/max_sectors
which simply sets the max_sectors file from the default value (240) to 128, for "sda" which is my USB hdd once it gets automounted.
Note that sometimes "sda" might be "sdb" or "sdc", so you might want to include several variations just to cover your bases...
Now my USB hdd has remained mounted for many days without any problems!
Hope that helps ya out
Last edited by schmichael; 07-13-2011 at 07:38 AM.