TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Mounting NTFS external HDD

Thu Mar 19, 2015 8:37 pm

Hi

I am now the proud owner of a Pi to replace an old Windows based media centre connected to my lounge PC. I have successfully installed Kodi and wish to add all the movies I have on a Seagate 1TB USB HDD. In Windows I have determined that this has the NTFS file structure.

I have looked at the many tutorials online regarding mounting the drive, which is all new to me. I have run the following as advised;
sudo apt-get install ntfs-3g

When I run 'blkid' the drive is not listed under /dev/sda1 as all the tutorials suggest. It is nowhere to be seen and therefore when i do...
'sudo mount -t ntfs /dev/sda1 /media/usb'

...the process eventually finishes but I do not think anything has happened. If I can get it to mount, and be seen, I assume that i need to add the following line into nano/etc/fstab?

/dev/sda1 /media/usb ntfs defaults,umask=000


Any help for a complete novice would be appreciated. Thanks

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 8:51 pm

First of all: if you intend to use the HD with the Pi (or other Linux system) and the drive is currently empty I would convert it to ext4.
It makes life easier *and* performance is significantly better.

Does the drive show up with the command 'lsusb'?
Is the drive connected to a powered USB hub or directly to the Pi?
What model Pi do you have?
If connected to the Pi and you have a model B+ or Pi2B then add

Code: Select all

max_usb_current=1
to /boot/config.txt, reboot and check again.

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 9:02 pm

Thanks for reply

The HDD used to be connected to the Windows pc so has my entire movie, music and photo collection on and therefore needs to remain as NTFS.

I have just tried 'lsusb' and the following line is listed;

Bus 001 Device 005: ID 0bc2:3312 Seagate RSS LLC

Therefore I assume that this is the Seagate HD?

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 9:05 pm

Forgot to mention...
The HD is connected directly to the Pi
The Pi is a Pi2 Model B 1GB

thanks

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 9:29 pm

yes, it looks as if your HD is connected and recognised.
Can you post the output of

Code: Select all

sudo fdisk -l
It should list the partitions on all drives.

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 9:44 pm

When i do 'sudo fdisk -l' the following is shown on the bottom line

/dev/sda1 2048 3907029163 1953513558 7 HPFS/NTFS/exFAT

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 9:49 pm

Also, how do I add the 'max_usb_current=1' to the '/boot.config.txt' as recommended? What does this do?

fruitoftheloom
Posts: 19799
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 9:51 pm

TheBod wrote:Also, how do I add the 'max_usb_current=1' to the '/boot.config.txt' as recommended? What does this do?
https://projects.drogon.net/testing-set ... berry-pi-b
adieu

My other Computer is an Asus CS10 ChromeBit running Chrome Operating System.
HP Envy 4500 Wireless Printer supported by HPLIP software in Raspbian Buster.
Raspberry Pi Model 2B v1.1

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 9:59 pm

Thanks, but how do I mount the HD? I am a complete novice so nice easy steps would be appreciated :-)

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:02 pm

TheBod wrote:When i do 'sudo fdisk -l' the following is shown on the bottom line

/dev/sda1 2048 3907029163 1953513558 7 HPFS/NTFS/exFAT
That looks good.
IIRC the line in /etc/fstab should look like this

Code: Select all

/dev/sda1    /media/usb   ntfs-3g   rw,default   0   0
You'll have to create /media/usb first and I would change ownership to user pi:

Code: Select all

sudo chown pi:pi /media/usb

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:14 pm

OK, that is completed and I have rebooted.

When I type 'lsusb' the HD is still showing.

When i run 'sudo fdisk -l' the /dev/sda1 line is still present.

Do I assume that the HD is mounting automatically upon startup?

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:20 pm

TheBod wrote:Do I assume that the HD is mounting automatically upon startup?
You can check it with a simple

Code: Select all

mount
which shows info about all the mounted volumes.
And
ls -a /media/usb
should of course show the root of your HD
If it doesn't you'll have to check the logs.

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:24 pm

Great, when typing 'mount' I get a list of different items but none of them are /dev/sda1 or any mention of Seagate?

Also, when I do 'ls -a /media/usb' I get '. ..' Is this correct?

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:33 pm

and finally, how will I be able to find the content of the HD when in Kodi? I assume that it will not be easy like E:\ when in Windows

Many thanks

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:35 pm

TheBod wrote:Great, when typing 'mount' I get a list of different items but none of them are /dev/sda1 or any mention of Seagate?

Also, when I do 'ls -a /media/usb' I get '. ..' Is this correct?
It's not mounted then. Check the logs, e.g. with

Code: Select all

dmesg | less
and check for relevant lines and any related errors.

You could also try to mount it manually with

Code: Select all

sudo mount -t ntfs-3g /dev/sda1 /meda/usb 
BTW: did you actually install the package 'ntfs-3g'?

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:45 pm

Hi, yes i did install the ntfs package but somehow when running 'sudo mount ......' it said 'mount: unknown filesystem tyoe ntfs-3g'

I have now reloaded the ntfs package and repeated 'sudo mount.......'

Taking a long time for the [email protected] to show

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:48 pm

Getting there. When 'mount' the last line is

/dev/sda1 on /media/usb type fuseblk ...etc etc

Does this sound correct?


Update, when 'ls -a /media/usb' all the folders with movies etc are now showing in green. Success?

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 10:56 pm

Looks like it is now mounted ok (thank you). Any idea on the required file location that Kodi XBMC would find the HD at?

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 11:03 pm

TheBod wrote:Getting there. When 'mount' the last line is

/dev/sda1 on /media/usb type fuseblk ...etc etc

Does this sound correct?


Update, when 'ls -a /media/usb' all the folders with movies etc are now showing in green. Success?
That looks ok to me.
But if this happens with the manual mount then there must be something wrong with the auto mount at boot.
I would check with dmesg at which point
IIRC there could be timing problems on the Pi2B, meaning that fstab is processed before the drive is available for mounting.

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 11:09 pm

TheBod wrote:Looks like it is now mounted ok (thank you). Any idea on the required file location that Kodi XBMC would find the HD at?
When adding a media source you can add '/media/usb' manually or use 'browse', then select 'home folder' and navigate from there to /media/usb

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 11:21 pm

DirkS wrote:
TheBod wrote:Getting there. When 'mount' the last line is

/dev/sda1 on /media/usb type fuseblk ...etc etc

Does this sound correct?


Update, when 'ls -a /media/usb' all the folders with movies etc are now showing in green. Success?
That looks ok to me.
But if this happens with the manual mount then there must be something wrong with the auto mount at boot.
I would check with dmesg at which point
IIRC there could be timing problems on the Pi2B, meaning that fstab is processed before the drive is available for mounting.
If you have a Pi2B then try making this change in /boot/cmdline.txt

Code: Select all

sudo nano /boot/cmdline.txt
Add this at the end of the first line (it should be the online in the file)

Code: Select all

rootdelay=5
Save and close the file. Then reboot and check if the drive mounts automatically.

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 11:33 pm

Made the change to the cmdline and rebooted. Now getting an error

'udevd[214]: timeout: killing '/sbin/blkid -o udev -p /dev/sda1 [643]'

which keeps cycling through and not finishing.

any ideas?

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

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 11:37 pm

TheBod wrote:Made the change to the cmdline and rebooted. Now getting an error

'udevd[214]: timeout: killing '/sbin/blkid -o udev -p /dev/sda1 [643]'

any ideas?
Not really, apart from undoing the modification.

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Thu Mar 19, 2015 11:41 pm

Unfortunately I cannot get the to [email protected] command prompt, just keeps cycling through the time out issue. When rebooted it starts this process again following

'Waiting for /dev to be fully populated….. [45.409005] usb `-`.5; reset high-speed usb number to 6'


Update, eventually stopped the cycle so removed the last code and rebooted, all back to normal

'sudo fdisk -l' still shows the 'Disk /dev/sda'
'lsusb' still shows the Seagate RSS LLc

TheBod
Posts: 33
Joined: Thu Mar 19, 2015 8:24 pm

Re: Mounting NTFS external HDD

Fri Mar 20, 2015 10:08 am

Ok, update on the situation.

When I reboot and type 'ls -a /media/usb' the result is ' . .. ' so i am assuming that the HD is not mounted.

If I do 'sudo mount -t ntfs-3g /dev/sda1 /media/usb' and then repeat 'ls -a /media/usb' it show displays ' . .. '

I then do 'sudo apt-get install ntfs-3g' and then repeat 'ls -a /media/usb' and the folders within the HD are now shown, highlighted green.

If I then do 'mount' it does show /dev/sda1 as the last item so I therefore assume that the HD is mounted correctly.

Within 'sudo nano /etc/fstab' I have the following line;

/dev/sda1 /media/usb ntfs-3g rw,default 0 0


After a reboot back into Raspian, when I type 'ls -a /media/usb' it displays ' . .. '

I then have to repeat the entire process again, even 'sudo apt-get install ntfs-3g'

This does not seem correct? Help please :-)

Return to “Beginners”