Page 1 of 1

a noob's question: use an external USB HD for data save/load

Posted: Thu Oct 29, 2015 4:42 pm
by davenull
surely 1 million times asked, but nothing explicite found by search, sorry...

the short question: is here a tutorial about external USB drives, how to setup and prepare and what ever?

the long question, if not:
how can I use an external USB HD for data save/load?
when do I have to plug it to the Pi (before start or ar any time, like for Windows, being auto-detected)?
If not autodetected: what di I have to prepare to get access to the drive (FAT32) and it's folders and files using the file manager?
will it also work for NTFS formatted drives or just for FAT?

Re: a noob's question: use an external USB HD for data save/

Posted: Thu Oct 29, 2015 4:54 pm
by RaTTuS
not a million but yes
yes , depends
mount it and use it
plug it in at any time , if it has been configured right them it will auto mount
sudo mount /dev/sda1 /mount/point
it will work for all types
you really do not want to use ntfs for drives on a linux machine though [it will work but not as well]
if you are going to leave it plugged into your RPi all the time the ext[2|4] will be better [2 for flash systems 4 for real hard disks]

Re: a noob's question: use an external USB HD for data save/

Posted: Thu Oct 29, 2015 5:01 pm
by davenull
as I'm completely new to Linux:

just plug it to either Pi USB port

then enter on LX terminal
sudo mount /dev/sda1 /mount/point

exactly this way - that's it?

Re: a noob's question: use an external USB HD for data save/

Posted: Thu Oct 29, 2015 5:31 pm
by DougieLawson
davenull wrote:
then enter on LX terminal
sudo mount /dev/sda1 /mount/point
If you're running the GUI it will automount a device with a valid filesystem on it. It should just "show up" in a pcmanfm (file manager) window.

Also you can't assume a device with appear as /dev/sda and the first partition as /dev/sda1. You should always check with dmesg because otherwise you could destroy your data. Also /mount needs to exist and /mount/point under it need to exist before you can mount a device on a mount point. Use /mnt or /media as they are predefined on your Raspbian systems.

Re: a noob's question: use an external USB HD for data save/

Posted: Thu Oct 29, 2015 6:34 pm
by davenull
so the mount thing was rubbish?

- yes, Im running the GUI.

I already tried to just plug my USB drive to the Pi but I couldn't find a USB drive listed, so what's wrong? where should it be, how is it named?

Re: a noob's question: use an external USB HD for data save/

Posted: Thu Oct 29, 2015 6:49 pm
by rpdom
davenull wrote:so the mount thing was rubbish?
Not entirely. It depends if you have an automount program installed. The normal GUI does have one.
I already tried to just plug my USB drive to the Pi but I couldn't find a USB drive listed, so what's wrong? where should it be, how is it named?
Usually it will appear under /media/XXXXXX, where XXXXXX is something that identifies that particular USB drive.

Re: a noob's question: use an external USB HD for data save/

Posted: Thu Oct 29, 2015 6:50 pm
by DougieLawson
davenull wrote:so the mount thing was rubbish?

- yes, Im running the GUI.

I already tried to just plug my USB drive to the Pi but I couldn't find a USB drive listed, so what's wrong? where should it be, how is it named?
Your post wasn't rubbish, it was just incomplete.

Try this
dmesg | grep sd and you should see something like

Code: Select all

[47279.172819] sd 0:0:0:0: [sda] 4294967160 512-byte logical blocks: (2.19 TB/1.99 TiB)
[47279.173460] sd 0:0:0:0: [sda] Write Protect is off
[47279.173482] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[47279.174019] sd 0:0:0:0: [sda] No Caching mode page found
[47279.174037] sd 0:0:0:0: [sda] Assuming drive cache: write through
[47279.188017] sd 0:0:0:0: Attached scsi generic sg0 type 0
[47307.882630]  sda: sda1 sda2
[47307.885976] sd 0:0:0:0: [sda] Attached SCSI disk
which is what I got when I plugged in my Drobo (which I use for backups).

You can then mount /dev/sda1 (or in my example /dev/sda1 or /dev/sda2) on /mnt or /media
sudo mount /dev/sda1 /mnt
sudo mount /dev/sda2 /media


The automounter uses the disk label or disk UUID to create a subdirectory under /media.

Re: a noob's question: use an external USB HD for data save/

Posted: Thu Oct 29, 2015 7:03 pm
by davenull
yes, I found it!

media/pi/[drvname]

the rest I didn't understand, but now that it's automatically listed I can save some SD card program files to my USB drive

excellent, thanks a lot!

:)