Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Arch Linux running on my Raspberry Pi. I added the following line to my fstab file:

/dev/sda1    /mnt/MyBook    ntfs    defaults    0    0

for a while this worked fine, the device was mounted automatically at startup. I installed transmission-cli and was downloading some stuff when the Pi seemed to die. I turned it off and on again and noticed the drive wasn't mounted. If I run sudo mount -a the drive will be mounted again just fine, but why is it not doing this at startup anymore?

share|improve this question
    
Just to add to my question, this used to work just fine every time I started up but just stopped all of a sudden. Also I can always run mount -a and mount it manually after startup, so there is no error in my fstab file. –  DaveJohnston Jun 22 '12 at 9:25
    
I spent ages trying to figure this out last night, this morning I ssh'd into my Pi from work and restarted it, and it mounted during boot. –  DaveJohnston Jun 22 '12 at 9:29

3 Answers 3

One possible explanation is the 'defaults' option was changed to use 'noauto' for your ntfs partition. (Is there a tunefs for ntfs?)

Another (more likely) explanation is with boot order and boot timing: the module for the USB stack may perhaps be loaded after the fstab boot-time mounts are attempted; or the USB device doesn't respond fast enough for the kernel, so boot proceeds before it's ready.

There's no resolution in this linked discussion, but see: https://bbs.archlinux.org/viewtopic.php?id=79676 - moving the mount to rc.local may help you. (As well as specifying a delay in rc.local.) Considering the RasPi isn't the fastest ship in the pond I'd lean towards this being a timing issue.

share|improve this answer
    
Two questions: any particular reason why it would just start doing it when it worked fine before? And is there some log file that I can look at that might show this? –  DaveJohnston Jun 22 '12 at 9:18
    
Have you made any kernel updates recently? Did Transmission's install make any changes? Require any new modules? You can check pacman's log in /var/log/pacman.log but I'm not sure how much help it'll be. –  cydonian.monk Jun 22 '12 at 15:21
    
It installed libevent (2.0.19-1) with it. –  DaveJohnston Jun 23 '12 at 11:24

You could also try changing defaults to "auto, defaults" in fstab.

share|improve this answer

USB disk is not ready to mount during system start-up so you can't mount it using fstab.

Try to do it using e.g cron after reboot. It works fine. My usb disk has a label "usbhdd", so check label of your disk and change name after grep in my example.

First, write a script (file name: mountusbhdd) in /usr/local/bin:

echo mounting usb disk:
while ! df | grep usbhdd; do
   echo "10 sec break..."; sleep 10
   sudo mount -t ntfs-3g -o uid=pi,gid=pi,umask=000 /dev/sda1 /media/usbhdd
done
echo "usbhdd mounted."

Add "x" permission:

sudo chmod +x /usr/local/bin/mountusbhdd

and add this script to your crontab:

crontab -e

add line:

@reboot /usr/local/bin/mountusbhdd>/tmp/usbhdd.log

That's all, after reboot you can chceck /tmp/usbhdd.log how much time does your disk need to be mounted. My disk need 10 seconds delay.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.