Hardware Reference
In-Depth Information
Figure 2-2:
LXDE
automatically
mounting a USB
mass storage
device
From the console, things are only slightly more diicult. To make a device accessible to Linux
when the desktop environment isn't loaded, follow these steps:
1
Connect the USB storage device to the Pi, either directly or through a connected USB hub.
2
Type
sudo fdisk -l
to get a list of drives connected to the Pi, and ind the USB stor-
age device by size. Note the device name:
/dev/sd
XN
, where
X
is the drive letter and
N
is
the partition number. If it is the only device connected to the Pi, this will be
/dev/sda1
.
3
Before the USB storage device is accessible, Linux needs a mount point for it. Create
this by typing
sudo mkdir /media/externaldrive
.
4
Currently, the device is only accessible to the root user. To make it accessible to all
users, type the following as a single line:
sudo chgrp -R users /media/externaldrive && Æ
sudo chmod -R g+w /media/externaldrive
5
Mount the USB storage device with
sudo mount /dev/sd
XN
/media/externaldrive
-o=rw
to gain access to the device and its contents.