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.

GOING FURTHER<br />

Auto-mounting<br />

The am-utils package provides the amd auto-mounting utility, able to mount<br />

removable media on demand when a user aempts to access their usual mount<br />

point. It will unmount these devices when no process is accessing them any<br />

longer.<br />

Other auto-mounting utilities exist, such as automount in the autofs package.<br />

Note also that GNOME, KDE, and other graphical desktop environments work<br />

together with the hal (Hardware Abstraction Layer) system, and can automatically<br />

mount removable media when they are connected.<br />

8.9.6. locate and updatedb<br />

The locate command can find the location of a file when you only know part of the name. It<br />

sends a result almost instantaneously, since it consults a database that stores the location of all<br />

the files on the system; this database is updated daily by the updatedb command (executed by<br />

the /etc/cron.daily/find script).<br />

Since anybody can use locate, it is important to ensure hidden files are not revealed to the user.<br />

This is why the updatedb command runs with the limited permission of the nobody user, which<br />

is a classic pattern on Unix systems for this kind of task. Furthermore, the administrator can<br />

configure some directories to be skipped by simply listing them in the PRUNEDPATHS variable in<br />

/etc/updatedb.conf.<br />

The slocate package goes even further, by replacing the locate command with a more secure<br />

version that only returns the names of files accessible to the user who employs it.<br />

8.10. Compiling a Kernel<br />

The kernels provided by Debian include the largest possible number of features, as well as the<br />

maximum of drivers, in order to cover the broadest spectrum of existing hardware configurations.<br />

This is why some users prefer to recompile the kernel in order to only include what they<br />

specifically need. There are two reasons for this choice. First, it may be to optimize memory<br />

consumption, since the kernel code, even if it is never used, occupies memory for nothing (and<br />

never “goes down” on the swap space, since it is actual RAM that it uses), which can decrease<br />

overall system performance. A locally compiled kernel can also limit the risk of security problems<br />

since only a fraction of the kernel code is compiled and run.<br />

NOTE<br />

Security updates<br />

If you choose to compile your own kernel, you must accept the consequences:<br />

Debian can not ensure security updates for your custom kernel. By keeping<br />

the kernel provided by Debian, you benefit from updates prepared by the Debian<br />

Project's security team.<br />

Recompilation of the kernel is also necessary if you want to use certain features that are only<br />

available as patches (and not included in the standard kernel version).<br />

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

173

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

Saved successfully!

Ooh no, something went wrong!