source: postlfs/config/devices.xml@ aaa763cd

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 aaa763cd was aaa763cd, checked in by Chris Staub <chris@…>, 15 years ago

Updated udev command

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@8051 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
59 be found by searching the /sys/devices directory entries or using
60 <command>udevadm info</command> after the device has been attached. See the
61 documentation in the current <application>udev</application> directory of
62 <filename class='directory'>/usr/share/doc</filename> for details.</para>
63
64<screen><literal>SUBSYSTEM=="usb_device", SYSFS{idVendor}=="05d8", SYSFS{idProduct}=="4002", \
65 GROUP:="scanner", MODE:="0660"</literal></screen>
66
67 <note><para>The above line is used for descriptive purposes only. The
68 scanner <application>udev</application> rules are put into place when
69 installing <xref linkend='sane'/>.</para></note>
70
71 </sect2>
72
73 <sect2>
74 <title>USB Device Issues</title>
75
76 <para>Some older applications, such as <application>VMware</application>,
77 need the following deprecated entry in the <filename>/etc/fstab</filename>
78 file. This is not normally needed.</para>
79
80<screen><literal>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0</literal></screen>
81
82 </sect2>
83
84<!--
85 <sect2>
86 <title>Multiple Network Interfaces</title>
87
88
89 </sect2>
90-->
91
92 <sect2>
93 <title>Devices for Servers</title>
94
95 <para>In some cases, it makes sense to disable
96 <application>udev</application> completely and create static devices.
97 Servers are one example of this situation. Does a server need the
98 capability of handling dynamic devices? Only the system administrator can
99 answer that question, but in many cases the answer will be no.</para>
100
101 <para>If dynamic devices are not desired, then static devices must be
102 created on the system. In the default configuration, the
103 <filename>/etc/rc.d/rcsysinit.d/S10udev</filename> boot script mounts a
104 <systemitem class="filesystem">tmpfs</systemitem> partition over the
105 <filename class="directory">/dev</filename> directory. This problem can be
106 overcome by mounting the root partition temporarily:</para>
107
108 <warning><para>If the instructions below are not followed carefully, your
109 system could become unbootable.</para></warning>
110
111
112<screen><userinput>mount --bind / /mnt
113cp -a /dev/* /mnt/dev
114rm /etc/rc.d/rcsysinit.d/{S10udev,S45udev_retry}
115umount /mnt</userinput></screen>
116
117 <para>At this point, the system will use static devices upon the next
118 reboot. Create any desired additional devices using
119 <command>mknod</command>.</para>
120
121 <para>If you want to restore the dynamic devices, recreate the
122 <filename>/etc/rc.d/rcsysinit.d/{S10udev,S45udev_retry}</filename> symbolic
123 links and reboot again. Static devices do not need to be removed (console
124 and null are always needed) because they are covered by the <systemitem
125 class="filesystem">tmpfs</systemitem> partition. Disk usage for devices is
126 negligible (about 20&ndash;30 bytes per entry.)</para>
127
128 </sect2>
129
130</sect1>
Note: See TracBrowser for help on using the repository browser.