
V4.0
Element14 | element14.com/PiDesktop
8
Firstly, ensure you know the device identifiers. The Raspbian OS is based upon
Debian Linux, and as such supports the majority of commands and functions that
you would use to mount drives within this OS (these typically involve fstab -
https://wiki.debian.org/fstab, and pmount - https://wiki.debian.org/pmount).
From the Graphical User Interface (GUI), depending on your version of Raspbian
and how you have it configured, when you boot your Raspberry Pi to the GUI and
connect the attached mSATA SSD you will be prompted on what to do with your
inserted “Removable media”. The drive will be automatically mounted.
Note:
It is possible that the GUI will not behave in this way and instead you will
see a transparent icon representing the drive on your desktop. Double-clicking on
this icon with the left mouse button will cause Raspbian to attempt to mount the
drive again.
From within the Command Line Interface (CLI), by mounting the drive from the
GUI we will make the drive accessible from the CLI. Typically it is located within
the folder ‘/media’, however it is good to have the drive accessible from the CLI
as sometimes we can’t use the GUI or merely don’t want to.
To mount the drive we must first know how Linux is referring to it. Linux has the
majority of its hardware listed under the ‘/dev’ folder structure with connected
devices typically using the format of ‘/dev/sd
x
’ where ‘
x
’ is a letter ranging from
’a’ ot ‘z’. These can even extend further with ‘/dev/sd
xn
’ where ‘
n
’ is the number
of the partition(s) on the device. For example the USB driver with 2 partitions can
be recognized by the kernel like this:
There are a few commands in which we can determine what the device is of a
USB device we connect, first, connect the USB device, and then type the
following:
$ sudo dmesg
This will tell you the contents of a system log, providing information about the
device you have just plugged in. You can also issue the following commands:
$ sudo lsusb
Which will tell you about the device identifiers, and also:
$ sudo lsblk
This command will tell you the /dev/ mount points.
To select a location to mount the drive, make a directory and set the permissions
on it by issuing the following commands:
$ sudo mkdir /media/ssd
$ sudo chmod 755 /media/ssd
Once we set the device mount point, you can then issue the following command:
$ sudo mount /dev/sd /media/ssd
Note:
Mounting will only work if the mSATA SSD has a file system and partitions
setup. You will want to mount the relevant partition (which has a number, such
as /dev/sdb1) as opposed to the device itself (/dev/sdb).