source: postlfs/config/devices.xml@ 5e9adc53

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 5e9adc53 was 5e9adc53, checked in by Chris Staub <chris@…>, 15 years ago

Added xml tag for directory

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@8052 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 4.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="postlfs-devices" xreflabel="About Devices">
9 <?dbhtml filename="devices.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>About Devices</title>
17
18 <indexterm zone="postlfs-devices">
19 <primary sortas="e-etc-udev-rules">/etc/udev/rules.d</primary>
20 </indexterm>
21
22
23 <para>Although most devices needed by packages in BLFS and beyond are set up
24 properly by <application>udev</application> using the default rules installed
25 by LFS in <filename class="directory">/etc/udev/rules.d</filename>, there are
26 cases where the rules must be modified or augmented.</para>
27
28 <para condition="html" role="usernotes">User Notes:
29 <ulink url="&blfs-wiki;/aboutdevices"/></para>
30
31 <sect2>
32 <title>Multiple Sound Cards</title>
33
34 <para>If there are multiple sound cards in a system, the "default"
35 sound card becomes random. The method to establish sound card order
36 depends on whether the drivers are modules or not. If the sound card
37 drivers are compiled into the kernel, control is via kernel command line
38 parameters in <filename>/boot/grub/menu.lst</filename>. For example,
39 if a system has both an FM801 card and a SoundBlaster PCI card, the
40 following can be appended to the command line:</para>
41
42<screen><literal>snd-fm801.index=0 snd-ens1371.index=1</literal></screen>
43
44 <para>If the sound card drivers are built as modules, the order can be
45 established in the <filename>/etc/modprobe.conf</filename> file
46 with:</para>
47
48<screen><literal>options snd-fm801 index=0
49options snd-ens1371 index=1</literal></screen>
50
51 </sect2>
52
53 <sect2>
54 <title>Udev Device Attributes</title>
55
56 <para>Fine-tuning of device attributes such as group name and permissions
57 is possible by creating extra <application>udev</application> rules,
58 matching on something like this. The vendor and product can be found by
59 searching the <filename class='directory'>/sys/devices</filename> directory
60 entries or using <command>udevadm info</command> after the device has been
61 attached. See the documentation in the current
62 <application>udev</application> directory of
63 <filename class='directory'>/usr/share/doc</filename> for details.</para>
64
65<screen><literal>SUBSYSTEM=="usb_device", SYSFS{idVendor}=="05d8", SYSFS{idProduct}=="4002", \
66 GROUP:="scanner", MODE:="0660"</literal></screen>
67
68 <note><para>The above line is used for descriptive purposes only. The
69 scanner <application>udev</application> rules are put into place when
70 installing <xref linkend='sane'/>.</para></note>
71
72 </sect2>
73
74 <sect2>
75 <title>USB Device Issues</title>
76
77 <para>Some older applications, such as <application>VMware</application>,
78 need the following deprecated entry in the <filename>/etc/fstab</filename>
79 file. This is not normally needed.</para>
80
81<screen><literal>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</literal></screen>
82
83 </sect2>
84
85<!--
86 <sect2>
87 <title>Multiple Network Interfaces</title>
88
89
90 </sect2>
91-->
92
93 <sect2>
94 <title>Devices for Servers</title>
95
96 <para>In some cases, it makes sense to disable
97 <application>udev</application> completely and create static devices.
98 Servers are one example of this situation. Does a server need the
99 capability of handling dynamic devices? Only the system administrator can
100 answer that question, but in many cases the answer will be no.</para>
101
102 <para>If dynamic devices are not desired, then static devices must be
103 created on the system. In the default configuration, the
104 <filename>/etc/rc.d/rcsysinit.d/S10udev</filename> boot script mounts a
105 <systemitem class="filesystem">tmpfs</systemitem> partition over the
106 <filename class="directory">/dev</filename> directory. This problem can be
107 overcome by mounting the root partition temporarily:</para>
108
109 <warning><para>If the instructions below are not followed carefully, your
110 system could become unbootable.</para></warning>
111
112
113<screen><userinput>mount --bind / /mnt
114cp -a /dev/* /mnt/dev
115rm /etc/rc.d/rcsysinit.d/{S10udev,S45udev_retry}
116umount /mnt</userinput></screen>
117
118 <para>At this point, the system will use static devices upon the next
119 reboot. Create any desired additional devices using
120 <command>mknod</command>.</para>
121
122 <para>If you want to restore the dynamic devices, recreate the
123 <filename>/etc/rc.d/rcsysinit.d/{S10udev,S45udev_retry}</filename> symbolic
124 links and reboot again. Static devices do not need to be removed (console
125 and null are always needed) because they are covered by the <systemitem
126 class="filesystem">tmpfs</systemitem> partition. Disk usage for devices is
127 negligible (about 20&ndash;30 bytes per entry.)</para>
128
129 </sect2>
130
131</sect1>
Note: See TracBrowser for help on using the repository browser.