sim_tcr
Posts: 331
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

How to Mount a NTFS External USB Hard drive in rapbian wheez

Thu Nov 15, 2012 11:53 am

Can someone please help me to mount a NTFS External USB Hard drive in rapbian wheezy. It is WD My book essentials with its own power source.
Thanks in advance.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Thu Nov 15, 2012 11:59 am

What have you tried so far?

(I'm going to guess that the magic bullet you are looking for is: apt-get install ntfs-3g)
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Thu Nov 15, 2012 12:02 pm

sudo fdisk -l
^ should show you what drives are there
sudo mount /dev/sda1 /mnt
should mount the 1st drive's 1st partition to /mnt the output from fdisk should show you the partition names
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

sim_tcr
Posts: 331
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Thu Nov 15, 2012 2:23 pm

RaTTuS wrote:sudo fdisk -l
^ should show you what drives are there
sudo mount /dev/sda1 /mnt
should mount the 1st drive's 1st partition to /mnt the output from fdisk should show you the partition names
Thanks it worked. I tried a FAT32 and NTFS pen drives. Both worked well.
Can i assume that by running umount /mnt/usb-king I can safely remove the connected drives?

Joe Schmoe,
is ntfs-3g works different than what RaTTuS explained above? Which one is better?
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Thu Nov 15, 2012 2:25 pm

sudo umount /mnt
will unmount it - as long as nothing is locked on it i.e. you have a terminal session sat in a directory there
ntfs-3g
is a better driver that will do read write on ntfs
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

sim_tcr
Posts: 331
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Thu Nov 15, 2012 2:30 pm

RaTTuS wrote:sudo umount /mnt
will unmount it - as long as nothing is locked on it i.e. you have a terminal session sat in a directory there
ntfs-3g
is a better driver that will do read write on ntfs
I have ntfs-3g installed now. Can you explain how to use it?
My need is, I have a WD Mybook Essential 1TB external drive with its own power source formatted as NTFS . I would like to read and write to it. Also whenever raspberry get rebooted the drive should automatically get mounted.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

lewmur
Posts: 391
Joined: Sun Dec 25, 2011 3:20 pm
Contact: Website

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Thu Nov 15, 2012 4:37 pm

sim_tcr wrote:
RaTTuS wrote:sudo umount /mnt
will unmount it - as long as nothing is locked on it i.e. you have a terminal session sat in a directory there
ntfs-3g
is a better driver that will do read write on ntfs
I have ntfs-3g installed now. Can you explain how to use it?
My need is, I have a WD Mybook Essential 1TB external drive with its own power source formatted as NTFS . I would like to read and write to it. Also whenever raspberry get rebooted the drive should automatically get mounted.
If you want the drive to mount at boot, you are going to have to edit the /etc/fstab file. First you'll need to create a folder for the mount. Typically something like this:

Code: Select all

$mkdir /home/pi/data
Test it by trying to mount the drive

Code: Select all

$sudo mount /dev/sda1 /home/pi/data
You should then be able to access the drive via /home/pi/data. If so, then edit the /etc/fstab file and add a line

Code: Select all

/dev/sda1 	/home/pi/data	ntfs-3g	rw,default	0	0
You need to do the editing as root. This should work so long as the drive is the only external drive you have. If you swap drives in and out, you may need to replace "/dev/sda1" with the UUID of the drive.

sim_tcr
Posts: 331
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Fri Nov 16, 2012 3:08 am

Thank you. All Set.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

Berrytade
Posts: 6
Joined: Sat Feb 23, 2013 2:03 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Tue Feb 26, 2013 2:48 am

Just tried this on new 3TB with ntfs, GPT, and get:

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

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Tue Feb 26, 2013 9:40 am

Berrytade wrote:Just tried this on new 3TB with ntfs, GPT, and get:

wrong fs type, wrong option, bad superblock on /dev/sda2/, missing codepage or helper program or other error
new problems
sudo fdisk -l
how did you create sda2 ? how is it formatted , where was it formatted
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Berrytade
Posts: 6
Joined: Sat Feb 23, 2013 2:03 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Tue Feb 26, 2013 3:20 pm

RaTTuS wrote:
Berrytade wrote:Just tried this on new 3TB with ntfs, GPT, and get:

wrong fs type, wrong option, bad superblock on /dev/sda2/, missing codepage or helper program or other error
new problems
sudo fdisk -l
how did you create sda2 ? how is it formatted , where was it formatted
Drive was formatted on server 2012 with a quick format and given GPT boot record.

It was automatically labelled dev/sda2 when the external drive was inserted via usb.

Stormspace9
Posts: 1
Joined: Wed Dec 11, 2013 2:14 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Wed Dec 11, 2013 2:16 pm

Joe,

Looked everywhere trying to find out why ntfs-3g wasn't working in fstab. <ugggh!> Thanks man!

Boomer
Posts: 80
Joined: Thu Sep 06, 2012 3:22 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Tue Dec 17, 2013 9:51 pm

RaTTuS,

Just wanted to let you know that I just followed your instructions and they worked perfectly!! Thanks for being such a great resource.

Jack

DafyddWynn
Posts: 4
Joined: Mon Feb 23, 2015 10:22 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Tue Feb 24, 2015 11:52 am

Please accept apologies for rookie ignorance. I'm trying to mount a USB drive (toshiba 1TB) located on a netgear D6200 router to my RPI B+ as a remote file. It works well with Windows and the Netgear Genie App, so there's no fundamental problem with the setup

I'm using:
sudo mount.cifs //192.168.0.1/USB_Storage /media/ReadyShare guest

This returns

Mount error (13): permission denied

The RPI can see the drive, using nmblookup returns information on the drive.

I've tried various permutations of this command, substituting readySHARE for the IP address, and various passwords, using the pi password and the router login password.

I'm aware that this is an old forum, but it seems relevant to my problem. I'm well and truly stuck, would appreciate any help

dpcons
Posts: 6
Joined: Sun Feb 15, 2015 12:07 am

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Wed Feb 25, 2015 9:50 pm

Hi, I don't have a solution but rather the same problem. I too am trying to access my USB_Storade thru a Netgear router and have all the same issues. Did you ever resolve your situation?

Just wondering
Dan

DafyddWynn
Posts: 4
Joined: Mon Feb 23, 2015 10:22 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Wed Feb 25, 2015 10:18 pm

No joy with the Netgear issue. Got postings on other forums, and a query to Netgear. Not holding my breath, but if I resolve issue I'll post it. May have to get another RPI to act as server because my application is remote and access to the pi is difficult

dpcons
Posts: 6
Joined: Sun Feb 15, 2015 12:07 am

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Wed Feb 25, 2015 10:29 pm

Hi, I don't have a solution but rather the same problem. I too am trying to access my USB_Storade thru a Netgear router and have all the same issues. Did you ever resolve your situation?

Just wondering
Dan
I've been successful with this, but still fail with fstab
sudo mount -t cifs -o user=pi,password=yourpassword,sec=ntlmv2 //192.168.1.1/USB_Storage /home/pi/media

DafyddWynn
Posts: 4
Joined: Mon Feb 23, 2015 10:22 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Wed Feb 25, 2015 10:40 pm

Dan

Thanks for that. Worked first time. I'll have a play with fstab, but my plan b is to put it in a script to run at start up

Dafydd

petemnz
Posts: 3
Joined: Fri Apr 24, 2015 11:56 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Sat Apr 25, 2015 2:24 am

Thanks for info took me hours to get fstab to work I used:

Mount using etc/fstab add following line (user and password are for netgear router, no password for drive access)

//192.168.1.3/USB_Storage/recordedtv /home/osmc/recordedtv cifs user=<yourusername>,password=<yourpassword>,sec=ntlmv2 0 0

Would not auto mount on boot as it does not wait for network so used sleep20 in rc.local.(tried _netdev in fstab but didn't work for me)

Add 2 lines below to etc/rc.local this waits for network then mounts all on boot.

sleep20
sudo mount -a

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Sat Apr 25, 2015 10:09 am

petemnz wrote:Add 2 lines below to etc/rc.local this waits for network then mounts all on boot.

sleep20
sudo mount -a
If this is on a Pi2B then try adding 'rootdelay=5' to the first (and only) line in /boot/cmdline.txt

petemnz
Posts: 3
Joined: Fri Apr 24, 2015 11:56 pm

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Tue Apr 28, 2015 10:03 am

DirkS wrote:
petemnz wrote:Add 2 lines below to etc/rc.local this waits for network then mounts all on boot.

sleep20
sudo mount -a
If this is on a Pi2B then try adding 'rootdelay=5' to the first (and only) line in /boot/cmdline.txt

Yes it is Pi2B , ok thanks will try.

The YaccK
Posts: 2
Joined: Fri Sep 04, 2015 5:57 pm
Location: Somewhere in France ;-)

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Tue Sep 15, 2015 2:54 pm

Not being original here, but thanks for your information RaTTuS !
The pi is great, and it isn't just a board to hack : I use it as my desktop computer.

Obsidian Babble
Posts: 1
Joined: Sat Mar 18, 2017 3:05 am

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Sat Mar 18, 2017 3:13 am

Thank y'all very much.
I'm new to Pi & CLI on linux, and was able to find the answer to my question fairly quickly here.
Looking forward to learning and helping if I can.

Obsidian Babble
:D

(
Joe Schmoe wrote: Quote Joe Schmoe

Re: How to Mount a NTFS External USB Hard drive in rapbian w

Post by Joe Schmoe » Thu Nov 15, 2012 5:59 am
What have you tried so far?

(I'm going to guess that the magic bullet you are looking for is: apt-get install ntfs-3g)

Return to “General discussion”