07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.9.5. List of Mount Points<br />

BACK TO BASICS<br />

Mounting and unmounting<br />

In a Unix-like system such as Debian, files are organized in a single tree-like<br />

hierarchy of directories. The / directory is called the “root directory”; all additional<br />

directories are sub-directories within this root. “Mounting” is the action<br />

of including the content of a peripheral device (oen a hard drive) into the system's<br />

general file tree. As a consequence, if you use a separate hard drive to<br />

store users' personal data, this disk will have to be “mounted” in the /home/<br />

directory. The root filesystem is always mounted at boot by the kernel; other<br />

devices are oen mounted later during the startup sequence or manually with<br />

the mount command.<br />

Some removable devices are automatically mounted when connected, especially<br />

when using the GNOME, KDE or other graphical desktop environments.<br />

Others have to be mounted manually by the user. Likewise, they must be unmounted<br />

(removed from the file tree). Normal users do not usually have permission<br />

to execute the mount and umount commands. The administrator can,<br />

however, authorize these operations (independently for each mount point) by<br />

including the user option in the /etc/fstab file.<br />

The mount command can be used without arguments (it then lists all mounted<br />

filesystems). The following parameters are required to mount or unmount a<br />

device. For the complete list, please refer to the corresponding man pages,<br />

mount(8) and umount(8). For simple cases, the syntax is simple too: for example,<br />

to mount the /dev/sdc1 partition, which has an ext3 filesystem, into<br />

the /mnt/tmp/ directory, you would simply run mount -t ext3 /dev/sdc1 /<br />

mnt/tmp/.<br />

The /etc/fstab file gives a list of all possible mounts that happen either automatically on boot<br />

or manually for removable storage devices. Each mount point is described by a line with several<br />

space-separated fields:<br />

• device to mount: this can be a local partition (hard drive, CD-ROM) or a remote filesystem<br />

(such as NFS).<br />

This field is frequently replaced with the unique ID of the filesystem (which you can determine<br />

with blkid device) prefixed with UUID=. This guards against a change in the<br />

name of the device in the event of addition or removal of disks, or if disks are detected in<br />

a different order.<br />

• mount point: this is the location on the local filesystem where the device, remote system,<br />

or partition will be mounted.<br />

• type: this field defines the filesystem used on the mounted device. ext3, vfat, ntfs, reise<br />

rfs, xfs are a few examples.<br />

BACK TO BASICS<br />

NFS, a network filesystem<br />

NFS is a network filesystem; under Linux, it allows transparent access<br />

to remote files by including them in the local filesystem.<br />

Chapter 8 — Basic Configuration: Network, Accounts, Printing…<br />

171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!