5

I'm having problems with mounting a 3tb Buffalo drive to my Raspberry Pi B, the error I get is:

mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error

I have tried setting the file system type to both ntfs and vfat, both give the error above.

So what do I do to get the drive mounted? And how can I get it to automatically mount whenever the Raspberry Pi boots?

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Darth Vader
  • 4,206
  • 24
  • 45
  • 69

2 Answers2

10

By default is you use ntfs it will be the kernel module which allow read-only mount of NTFS partitions.

As this is failing are you sure NTFS is the filesystem of your drive? What does Windows or OS X says when you plug it in one of those? You can check on Raspbian using this:

sudo file -s /dev/sda1

Anyway, in case you want read/write NTFS, you need NTFS-3g but I'm not sure if this driverdriver is installed by default on Raspbian. So first make sure you have it:

sudo apt-get install ntfs-3g

Then if your USB drive partition is really /dev/sda1, you should do (assuming you are mounting it on /mnt/usb which should be a valid folder)

sudo mount -t ntfs-3g /dev/sda1 /mnt/usb

An alternative to the above command is:

sudo ntfs-3g /dev/sda1 /mnt/usb
Huygens
  • 733
  • 5
  • 12
  • I tried sudo apt-get install ntfs-3g and it will not install because it could not find the files on the website. – Darth Vader Jun 26 '15 at 11:13
  • 1
    I will have to look it later (I don't have access now to my Raspberry Pi). On Ubuntu (x86), the package is in the main repository. I will have to check where it is on the Pi (ARM). What does sudo apt-get update; apt-cache search ntfs-3g returns? – Huygens Jun 26 '15 at 12:00
  • Used the command you suggested above, got ntfs-3g to install, and now my hard drive is mounted. Thanks for the help – Darth Vader Jun 26 '15 at 14:47
1

i was able to mount a FAT32 usb drive with

mount -t vfat -o uid=MyUserName,gid=users /dev/sda PathToMountLocation

where "vfat" was the filesystem type and /dev/sda was my flash drive. Maybe there is an option for NTFS.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
axarnold
  • 11
  • 2
  • There may be an ntfs option, it depends on available drivers -- look at cat /proc/filesystems. Note that this will only work if you formatted the drive as one big partition, which is unusual. Generally, even if it only contains one big partition, that partition will be /dev/sda1 (/dev/sda is the physical device). – goldilocks May 21 '16 at 12:21