[SOLVED] USB Harddrive via fstab turned off during Boot - Error

Hello^^
I'm trying to mount my external USB Drive.
I put the following line in fstab:
/dev/sdb1 /media/Musik ext4 noauto,user,default 0 1
I only want to start the Harddive occasionally.
The problem is, when the drive is completly turned off during boot I get the following error:
No such file or directory while trying to open /dev/sdb1
Possibly non existend device?
I thought that the noauto Option should prevent fstab from mounting the hdd???
regards
cl10k
PS: Manual mounting works without any problems...
Last edited by cl10k (2011-03-20 22:49:43)

Let me give you a hand then. The following I have in my /etc/udev/rules.d/11-media-by-label-auto-mount.rules, and what it does is:
-- pick the name of a drive,
-- create a dedicated /media/mountpoint name (certainly, "mountpoint" is replaced by the name of your drive),
-- mount the drive on boot,
-- unmount the drive on shutdown and delete the /media/mountpoint.
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
# Exit
LABEL="media_by_label_auto_mount_end"
Plenty of handy examples you can find in /lib/udev/rules.d/ and modify them so they meet you needs. I hope it clarifies the matter a bit.
Last edited by bohoomil (2011-03-19 16:57:36)

Similar Messages

  • MacBook Pro turns off during boot?

    This is kind of a long story.
    I have a 13-inch, Mid-2010 MacBook Pro running OS X Mavericks. I was using it near a bathtub, when a moderate amount of water spilled onto the keyboard. I immediately dabbed out most of it, and put it upside down for some time. It was running then, with all the keys and trackpad working fine. t turned it off, and tired turning it on after half an hour. Nothing. I decided to keep it switched off for 7 days, during which I would open the lid every now and then to find vapor on the screen from the keyboard which I would wipe and close again. I turned it on when there was no vapor spotted for 3 days. I plugged it in after 7 days, to see that the battery status indicator was erratic. It turned on with a sound from the SuperDrive (the usual click). There was no startup chime. A few minutes later, it turned off. I decided to reset the PRAM and SMC, and I realized that I can get to my account window successfully (and type a 22 letter password) as long as I keep any key pressed throughout bootup (option, command key, etc). I have tried many times, but it just turns off with a "nik" sound. I haven't backed up, and I have about 270 GB of important data stored that I CANNOT lose.
    If it helps, it's 250GB drive crashed in December but it was replaced with a 500 GB and has been running smooth until this.
    Please help me! Any advice at all is extremely appreciated. Thank you!

    Ishaan.3108 wrote:
    I haven't backed up, and I have about 270 GB of important data stored that I CANNOT lose.
    Take the HDD out of the MBP and install it in an enclosure.  Connect it to another Mac and see if you have access to the HDD.  If so, copy what ever files that are important to you to another HDD.
    Then you can take the MBP to an Apple store genius bar for a FREE evaluation.  Prepare your self  for unfavorable news.
    Ciao.

  • MBP turns off during boot

    Hello!
    My mid-2010 MBP is having some issues. It is no longer under applecare. Last year, when it was still under applecare, I had a problem of the display going black many times per day while doing even simple tasks. I believe they replaced the logic board and everything worked just fine after that.
    However, last night my laptop suddenly went black while viewing a PDF. I tried opening and closing the cover, nothing could get the screen back. At that time, the keyboard was still lit up and the caps lock button still worked (light would turn on and off when pressing).
    I did a hard-reset.
    The laptop screen lit up like it was starting, and then died. Tried again, nothing. So, I waited about five minutes and tried again. The screen lit up, the apple appeared, and then the laptop died.
    After many attempts, I have seen it do many different things. Sometimes it dies before the apple appears. Sometimes it dies after that, but before login screen. Sometimes it dies on the login screen. Usually the longer I wait, the further it will go - however, even when stone cold and not warm at all after waiting hours, it will still only run for ten minutes before it turns off. Sometimes if I can get all the way through startup, it will run for a minute, or five minutes, or ten minutes, but it always fails. Sometimes it turns completely off, but sometimes only the display goes black and the keyboard stays lit. I can even change the keyboard illumination up or down when this happens. Its about a 50/50 chance whether the display will die or the whole laptop will die. Whichever one it is, though, it still requires 10-15 minutes before I can try again, or the machine will just fail halfway through startup.
    I have also tried starting into bootcamp. It worked for five minutes in Windows and then died.
    I have tried booting up while holding shift, but it was taking a very long time for the progress bar at the bottom to fill, and halfway through the laptop shut down.
    As I said at the beginning, the logic board is one year old.

    After sitting for a day, I started up the laptop and made it all the way through login. I let the machine sit without touching anything for about twenty minutes, nothing happened.
    I then opened Chrome, and as soon as I began typing into the search box, the entire computer shut down, and restarted by itself.
    Halfway through restart, the screen turned black. I waited, and after a minute the keyboard lit up so I knew it was at the login screen, though I couldn't see anything. I typed the first letter of my name, pressed enter, typed my password, and pressed enter again.
    I presume the computer is logged in and sitting at the desktop now...I have the laptop set up so that if I move the cursor to one corner, it puts the display to sleep. When I do this with the track pad, I can see the keyboard lights dim, then light back up again when I move the cursor back out of the corner.
    Anyone have any suggestions? How can I get my screen back?

  • My printer does not work if turned off during boot up.

    I have the hp psc 1210 printer. If start ny computer with the printer turned off I can not print anything. Although cups can "see" the printer. hp-toolbox can't access the printer. Starting up with my printer on it works fine.
    It must be an udev issue. When I start my system with the printer off and turn it on later I have to run /etc/start_udev in order to make it work without rebooting. Any ideas?
    It is on a fresh installed Arch system.

    Well it seems to be a known udev bug.
    http://bugs.archlinux.org/task/9935

  • Aspire One D255 monitor shuts off during boot

    Every time I boot, immediately after the kernel lauches init, my screen powers off.  About 15 seconds later, it comes back on.
    The delay before coming back on seems to be independent of the init process.  If I speed init up, by the time it comes back on it's waiting at the login prompt.  If I slow it down, it comes back on while init is still running.
    I tried adding an echo -e -n '\033[13]' to my init scripts in an effort to unblank the display, but it doesn't help.
    This happens both booting of the install image and after installation. It makes it extremely hard to figure out what's going on during startup.
    Has anyone seen this before?

    I have a similar issue with my aspire one, but the display is not turning off, it is actually the backlight turning off during boot. I use fbsplash with a dark theme but a bright progress bar. During boot, it appears as if the screen has turned off, but looking closely, I can still see the progress bar.
    I have tried several different methods of keeping the backlight on to no avail.
    Personally I am thinking it is monitor signal detection during a monitor mode reset during boot, ie from console resolution switching to KMS resolution. Most monitors lose signal detection when changing mode (in my experience). Some display a "No Signal" message of some sort, some briefly turn off until signal is detected again, and in the Aspire One case, the backlight turns off. Put it down to monitor manufacturers built in power saving "features".
    Tha same thing happens when I boot windows.
    Of course, if anyone does come up with a solution, I am eagerly listening!
    Cheers.

  • Iphone turned off during factory reset

    Apologies if this has been raised a million times before, i have tried to search for an answer..
    As the title says my phone turned off during a factory reset as the battery was obviously low. probably happened 1-2 minutes into it actually.
    Now it wont get past the apple logo screen. I have tried to reset the phone using the home + power key but nothing happens. it turns off then when i turn it back on it goes back to the apple logo screen, then will turn off.
    Ive plugged the phone into my laptop and that wont read it either.
    I hope i havent ruined the phone by it turning off during factory resetting ? Can anyone suggest anything to fix this problem ?
    thanks

    See if you force the phone into recovery mode:
    Turn off your phone: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the the iPhone to turn off. If you cannot turn off your phone using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When your phone turns off, release the Sleep/Wake and Home buttons. Then, leave the USB cable connected to your computer, but NOT your phone, itunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new. After restoring from backup, you must sync to restore your iTunes content.

  • Build-in webcam issue: how to turn it off during boot-up?

    Hi,
    I have a laptop - Asus K52J & x86_64 - with a built-in webcam. During boot-up, the webcam turns on in - rough guess - 50% of the time. I don't find any obvious pattern when/why the webcam turns on.
    Searching this forum/internet doesn't give me a good answer...
    1/ I prefer a solution where the webcam is turned off on boot and where I can turn it on when necessary.
    2/ I can afford to disable the webcam when running linux.
    3/ Disabling in BIOS (often given solution) is not an option.
    For 1/, the only solution I got was running following and closing mplayer window. This turns off the webcam, but this is not an efficient manner. Is there another software-based work-around?
    mplayer tv:// -tv driver=v4l2:device=/dev/video0
    For 2/ I hear blacklisting the module is the solution. But how do I find the correct module?
    lsmod
    gives a whole list (pastebin).
    Is it videodev and/or v4l2_compat_ioctl32? How can I be sure? Any advice on this for other users with other laptops?
    Thanks for any help on advance!
    Kind regards,
      davidbe

    Your webcam uses the uvcvideo module so blacklist that one in /etc/rc.conf.

  • My LCD does not turn off during the call. I have a iphone 4. What do i do?

    My LCD does not turn off during the call. I have a iphone 4. What do i do?

    You may have a defective proximity sensor but try some basic troubleshooting first...
    Try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    If still a problem restore with your backup.
    If still a problem restore as new, i.e. without your backup. See how it runs with nothing synced to it.
    If still a problem, it's likely a hardware issue.

  • Cleaned files and apps with "app cleaner" and now MacBook Air turns off during start up. What happens? What can I do? Please help

    Cleaned files and apps with "app cleaner" and now MacBook Air turns off during start up. What happens? What can I do? Please help

    The "app cleaner" managed to do bad things to the file system so that it is unable to boot any longer.
    This is the primary reason I always recommend that any of those so called "cleanup" apps never be used. They do more harm then good.
    Try a safe boot by holding down the shifgr key when you hear the boot chime. Maybe that can fix the damage.
    Let us know what happens.
    Allan

  • Turning off the structure errors in JDeveloper 10.1.3.2

    Is there a way to turn off the structure errors in for .jsp pages in JDeveloper 10.1.3.2.
    Many of the pages show "Element blah not expected" or "attribute missing"
    The app I'm working on has lots of old code from a range of developers and I really don't need to see the errors of their/my ways if they are truly no show stoppers.
    In the previous version this was not nearly as prevalent and it displays in 10.1.3.2.
    Thanks,
    LP

    Hi,
    actually previous versions didn't have error margins at all. There is no preference setting I am aware of to switch the error messages off
    Frank

  • I have an HP M127fw. How do I turn off the Fax Error Report

    I have an HP M127fw. How do I turn off the Fax Error Report

    You welcome!  i'm looking for anything related to technologies.   

  • N95 turned off during software update. No sign of ...

    Dear forum user,
    Yesterday I tried to update my Nokia N95 with OVI Suite. During the installation I find out that the battery is getting law, so I connected it to the adapter. Then, suddenly my phone turned off and does not start any more. He doesn't show any sign of life (no lights, sounds etc.). OVI suite showed an error message 12052. Is it possible to repaire this kind of  problem? 
    Thank you in advance. 
    Greetings, Vlad.

    Hi vsadykov,
    Thank you for post and Welcome to the Nokia Discussion forums.
    Sorry to hear about the issues your phone is facing. Firstly try removing the battery for a few minutes and then replace and see if that makes any difference (make sure your device's charger is plugged in as well when you put your battery back in)
    If  this doesn't help then try the "3 finger deep reset". With the phone powered off, depress and hold these three keys simultaneously * 3 green phone and then power on phone using the on/off button whilst keeping the three keys depressed until you hear start-up tone.
    This should ONLY be done if the device doesn't power up normally anymore and it wipes everything in the phone memory. Again make sure the the device is plugged into the charger.
    If none of this helps it looks like a visit to Nokia Service Centre is called for. You can check this at the below link:
    http://europe.nokia.com/support/repair-and-recycle​/repair/care-points#
    Let me know if any of this helps.
    Regards
    Raoul_Duke
    If you find this post helpful, a click upon the white star at bottom would always be appreciated.
    If it also solves your problem, clicking ACCEPT AS SOLUTION below it will benefit other users!

  • No power through usb ports when pc turned off P43 neo

    Hi, how do I get power to the usb ports when the pc is shut down?  I need to be able to do this as I have a wireless mouse that uses a charging cradle but I can't charge the mouse when the pc is turned off as no power is sent to the cradle when the pc is turned off.
    I'm using a P43 neo motherboard with a e8400 (C0 stepping) cpu and windows 7 home.
    Cheers.

    Hello @XJF,
    I understand that you are not getting any signal from your HP ENVY 700-060 Desktop PC. The issue you are describing appears to be a physical issue. Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assis​t.html.
    I would like to thank you for posting on the HP Forums. Have a great day!
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    Dunidar
    I work on behalf of HP
    Find out a bit more about me by checking out my profile!
    "Customers don’t expect you to be perfect. They do expect you to fix things when they go wrong." ~ Donald Porter

  • Wifi won't turn off during stand by

    Hello,
    although I said so in in Wifi setup ("always turn off wifi during stand by"), wifi will not go off in standby. All account sync is disabled, all stamina options are disabled. Also, there should be no apps downloading or connecting to the internet.
    Can someone help?
    Thx a lot

    Yes and no, if you sync multiple accounts and you had them set up to sync every few minutes, then your phone wont be idle 
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • USB, how do i turn off automatic answering

    I just bought a USB dongle BToes and I want to turn off automatic answering... When BT connected the phone rings twice and then it is automatically tanken 
    Config:
    XP, IBM t30, SonyE T630
    Communication is working just fine between my phone and BT
    Do you know how to turn auto answer off?
    (I tested my phone and an internal usb on an T41 and it dosent automatically take the calls?)

    Pretty much the same place as you find it in Pages:
    Regards,
    Barry

Maybe you are looking for