3

I am very new to any sort of linux and just started to use raspberry pi 2 running on raspbian. I just attached my WD Passport Ultra through USB port, which is powered by rpi itself.

with command sudo fdsik -l, i am able to see

/dev/sda

and

/dev/sda1

parts of the hdd and when i try to mount it manually it works but the problem just arises when i try to modify /etc/fstab file. Due to fact that the hdd is in ntfs format i already installed ntfs-3g to and modified

/etc/fstab

like this;

/dev/sda1 /home/wd ntfs-3g defaults 0 0

after rebooting, hdd is not mounted to the path at boot.

Can anyone help me understand what the problem can be?

Emre
  • 31
  • 3
  • 1
    if you run mount /home/wd does it mount correctly? if so you jsut need to add the auto flag to fstab – rob Feb 20 '15 at 16:24
  • Yes when I run mount /home/wd it mounts but unfortunately auto flad doesn't work for me either and as i know "defaults" also includes auto flag – Emre Feb 20 '15 at 17:56
  • without the drive attached what does "ls -al /home/wd" give you? And on that note, I have never tried mounting in a /home directory. Have you got a user called wd on the system? Are there any errors in /var/log/messages? – rob Feb 20 '15 at 18:42
  • drwxrwxrw- 2 pi pi 4096 Şub 19 17:09 . drwxr-xr-x 4 root root 4096 Şub 19 17:09 .. That is what returned to ls -al /home/wd command there is no user called WD defined on the system but can't also auto-mount to any other paths too – Emre Feb 20 '15 at 19:28
  • 1
    unfortunately the answer here http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=48160 was "That's because ntfs uses a userspace driver, not a kernel driver so it can't mount until the last thing in the boot process.

    Move your data, reformat as ext4, move your data back."

    – rob Feb 20 '15 at 20:17
  • Thanks rob, seems reformatting as ext4 is the only solution – Emre Feb 20 '15 at 21:19
  • or try this. http://raspberrypi.stackexchange.com/questions/27916/unable-to-connect-seagate-external-drive – Piotr Kula Feb 21 '15 at 00:28

1 Answers1

3

First, anytime you are trying to add an external drive in fstab, you need to be using a UUID. It is not wise to use /dev/ with external devices, as they might change.

sudo blkid

this will list you UUID

In /etc/fstab

UUID=xxxxxxxxxxxx /home/wd ntfs-3g defaults 0 0

This is likely to fix your issue, as it is separate from waiting for the devices to be listed under /dev/

UUID is addressable even from BIOS/boot loader.

jslay
  • 196
  • 2