/[gentoo]/xml/htdocs/doc/en/devfs-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/devfs-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.9 Revision 1.10
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/devfs-guide.xml,v 1.9 2005/06/20 08:09:11 fox2mike Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/devfs-guide.xml,v 1.10 2005/06/20 09:41:16 neysx Exp $ -->
3 3
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5 5
6<guide link="/doc/en/devfs-guide.xml"> 6<guide link="/doc/en/devfs-guide.xml">
7<title>Device File System Guide</title> 7<title>Device File System Guide</title>
15<abstract> 15<abstract>
16In this document you'll find information on what devfs is really about 16In this document you'll find information on what devfs is really about
17and how to work with it. 17and how to work with it.
18</abstract> 18</abstract>
19 19
20<!-- The content of this document is licensed under the CC-BY-SA license -->
21<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
20<license/> 22<license/>
21 23
22<version>0.4</version> 24<version>0.4</version>
23<date>2005-06-20</date> 25<date>2005-06-20</date>
24 26
26<title>What is devfs?</title> 28<title>What is devfs?</title>
27<section> 29<section>
28<title>The (good?) old days</title> 30<title>The (good?) old days</title>
29<body> 31<body>
30 32
33<warn>
31<warn>devfs is <e>obsolete</e> and will eventually be removed from the stable 34devfs is <e>obsolete</e> and will eventually be removed from the stable 2.6
322.6 tree. Users on 2.6 kernels are hereby advised to switch to udev. For further 35tree. Users on 2.6 kernels are hereby advised to switch to udev. For further
33information on udev, please refer to the <uri 36information on udev, please refer to the <uri
34link="/doc/en/udev-guide.xml">Gentoo udev Guide</uri>. 37link="/doc/en/udev-guide.xml">Gentoo udev Guide</uri>.
35</warn> 38</warn>
36 39
37<p> 40<p>
56<p> 59<p>
57If you take a look at a certain device file, you might find something 60If you take a look at a certain device file, you might find something
58like this: 61like this:
59</p> 62</p>
60 63
61<pre caption = "Checking the information of a device file"> 64<pre caption="Checking the information of a device file">
62# <i>ls -l /dev/hda</i> 65# <i>ls -l /dev/hda</i>
63brw-rw---- 1 root disk 3, 0 Jul 5 2000 /dev/hda 66brw-rw---- 1 root disk 3, 0 Jul 5 2000 /dev/hda
64</pre> 67</pre>
65 68
66<p> 69<p>
217<p> 220<p>
218To give you an idea on the directories, this is a listing of the 221To give you an idea on the directories, this is a listing of the
219directories which I have on my laptop: 222directories which I have on my laptop:
220</p> 223</p>
221 224
222<pre caption = "Directories in /dev"> 225<pre caption="Directories in /dev">
223cdroms/ cpu/ discs/ floppy/ 226cdroms/ cpu/ discs/ floppy/
224ide/ input/ loop/ misc/ 227ide/ input/ loop/ misc/
225netlink/ printers/ pts/ pty/ 228netlink/ printers/ pts/ pty/
226scsi/ sg/ shm/ sound/ 229scsi/ sg/ shm/ sound/
227sr/ usb/ vc/ vcc/ 230sr/ usb/ vc/ vcc/
238use of the previous, old scheme. To make sure no system is broken, 241use of the previous, old scheme. To make sure no system is broken,
239<c>devfsd</c> is created. This daemon creates symlinks with the old 242<c>devfsd</c> is created. This daemon creates symlinks with the old
240names, pointing to the new device files. 243names, pointing to the new device files.
241</p> 244</p>
242 245
243<pre caption = "Created symlinks"> 246<pre caption="Created symlinks">
244$ <i>ls -l /dev/hda4</i> 247$ <i>ls -l /dev/hda4</i>
245lr-xr-xr-x 1 root root 33 Aug 25 12:08 /dev/hda4 -> ide/host0/bus0/target0/lun0/part4 248lr-xr-xr-x 1 root root 33 Aug 25 12:08 /dev/hda4 -> ide/host0/bus0/target0/lun0/part4
246</pre> 249</pre>
247 250
248<p> 251<p>
279 282
280<p> 283<p>
281To send a signal, simply use <c>kill</c> or <c>killall</c>: 284To send a signal, simply use <c>kill</c> or <c>killall</c>:
282</p> 285</p>
283 286
284<pre caption = "Sending the SIGHUP signal to devfsd"> 287<pre caption="Sending the SIGHUP signal to devfsd">
285# <i>kill -s SIGHUP `pidof devfsd`</i> 288# <i>kill -s SIGHUP `pidof devfsd`</i>
286<comment>or</comment> 289<comment>or</comment>
287# <i>killall -s SIGHUP devfsd</i> 290# <i>killall -s SIGHUP devfsd</i>
288</pre> 291</pre>
289 292
301If you want the compatibility symlinks that clutter up <path>/dev</path> 304If you want the compatibility symlinks that clutter up <path>/dev</path>
302removed from your Gentoo system (Gentoo activates it per default), edit 305removed from your Gentoo system (Gentoo activates it per default), edit
303<path>/etc/devfsd.conf</path> and remove the following two lines: 306<path>/etc/devfsd.conf</path> and remove the following two lines:
304</p> 307</p>
305 308
306<pre caption = "/etc/devfsd.conf for backwards compatibility"> 309<pre caption="/etc/devfsd.conf for backwards compatibility">
307<comment># Comment the following two lines out to remove the symlinks</comment> 310<comment># Comment the following two lines out to remove the symlinks</comment>
308REGISTER .* MKOLDCOMPAT 311REGISTER .* MKOLDCOMPAT
309UNREGISTER .* RMOLDCOMPAT 312UNREGISTER .* RMOLDCOMPAT
310</pre> 313</pre>
311 314
323When you load a module, devfs will automatically create the device 326When you load a module, devfs will automatically create the device
324files. If you don't want this behaviour, remove the following line from 327files. If you don't want this behaviour, remove the following line from
325<path>/etc/devfsd.conf</path>: 328<path>/etc/devfsd.conf</path>:
326</p> 329</p>
327 330
328<pre caption = "/etc/devfsd.conf, autoload functionality"> 331<pre caption="/etc/devfsd.conf, autoload functionality">
329LOOKUP .* MODLOAD 332LOOKUP .* MODLOAD
330</pre> 333</pre>
331 334
332</body> 335</body>
333</section> 336</section>
348<p> 351<p>
349If you want to set permissions using <path>/etc/devfsd.conf</path>, 352If you want to set permissions using <path>/etc/devfsd.conf</path>,
350then use the syntax used in the following example: 353then use the syntax used in the following example:
351</p> 354</p>
352 355
353<pre caption = "Permissions in /etc/devfsd.conf"> 356<pre caption="Permissions in /etc/devfsd.conf">
354REGISTER ^cdroms/.* PERMISSIONS root.cdrom 0660 357REGISTER ^cdroms/.* PERMISSIONS root.cdrom 0660
355</pre> 358</pre>
356 359
357<p> 360<p>
358The second field is the device group, starting from <path>/dev</path>. 361The second field is the device group, starting from <path>/dev</path>.
377will save the information so that it will persist across reboots. This 380will save the information so that it will persist across reboots. This
378is because the <path>/etc/devfsd.conf</path> file contains the 381is because the <path>/etc/devfsd.conf</path> file contains the
379following lines: 382following lines:
380</p> 383</p>
381 384
382<pre caption = "/etc/devfsd.conf for saving permissions"> 385<pre caption="/etc/devfsd.conf for saving permissions">
383REGISTER ^pt[sy]/.* IGNORE 386REGISTER ^pt[sy]/.* IGNORE
384CHANGE ^pt[sy]/.* IGNORE 387CHANGE ^pt[sy]/.* IGNORE
385CREATE ^pt[sy]/.* IGNORE 388CREATE ^pt[sy]/.* IGNORE
386DELETE ^pt[sy] IGNORE 389DELETE ^pt[sy] IGNORE
387REGISTER ^log IGNORE 390REGISTER ^log IGNORE
408devfs is not mounted automatically (meaning you'll have to recompile 411devfs is not mounted automatically (meaning you'll have to recompile
409your kernel) and that <path>/dev/console</path> exists. Then, somewhere 412your kernel) and that <path>/dev/console</path> exists. Then, somewhere
410at the beginning of the bootscripts of your system, you place: 413at the beginning of the bootscripts of your system, you place:
411</p> 414</p>
412 415
413<pre caption = "Mounting /lib/dev-state on top of /dev"> 416<pre caption="Mounting /lib/dev-state on top of /dev">
414mount --bind /dev /lib/dev-state 417mount --bind /dev /lib/dev-state
415mount -t devfs none /dev 418mount -t devfs none /dev
416devfsd /dev 419devfsd /dev
417</pre> 420</pre>
418 421

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20