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

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

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

Revision 1.7 Revision 1.8
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3 3
4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/udev-guide.xml,v 1.7 2004/04/25 16:44:49 swift Exp $ --> 4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/udev-guide.xml,v 1.8 2004/04/26 09:52:41 swift Exp $ -->
5 5
6<guide link="/doc/en/udev-guide.xml"> 6<guide link="/doc/en/udev-guide.xml">
7<title>Gentoo udev Guide</title> 7<title>Gentoo udev Guide</title>
8 8
9<author title="Author"> 9<author title="Author">
10 <mail link="swift@gentoo.org">Sven Vermeulen</mail> 10 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
11</author>
12<author title="Contributor">
13 <mail link="g.guidi@sns.it">Gregorio Guidi</mail>
11</author> 14</author>
12 15
13<abstract> 16<abstract>
14This document explains what udev is and how you can use udev to fit your needs. 17This document explains what udev is and how you can use udev to fit your needs.
15</abstract> 18</abstract>
16 19
17<license/> 20<license/>
18 21
19<version>0.6</version> 22<version>0.7</version>
20<date>Apr 25, 2004</date> 23<date>April 26, 2004</date>
21 24
22<chapter> 25<chapter>
23<title>What is udev?</title> 26<title>What is udev?</title>
24<section> 27<section>
25<title>The /dev Directory</title> 28<title>The /dev Directory</title>
173<section> 176<section>
174<title>Requirements</title> 177<title>Requirements</title>
175<body> 178<body>
176 179
177<p> 180<p>
178To be able to use udev on Gentoo, you must install 181udev is meant to be used in combination with a 2.6 kernel (like
179<c>sys-apps/baselayout-1.8.6.13-r1</c> or later and <c>sys-fs/udev</c>. 182<c>development-sources</c> or <c>gentoo-dev-sources</c>). If you're using such a
180If necessary, edit <path>/etc/portage/package.keywords</path> so that your 183kernel then you just have to make sure that you have a recent
181system uses the ~ARCH tree for <c>sys-fs/udev</c>: 184<c>sys-apps/baselayout</c> version. That's all you need.
182</p>
183
184<pre caption="/etc/portage/package.keywords">
185sys-fs/udev ~x86
186</pre>
187
188<p> 185</p>
189If you haven't done so already, also install <c>sys-apps/hotplug</c>. 186
187<pre caption="Installing udev">
188# <i>emerge udev</i>
189</pre>
190
190</p> 191<p>
192udev will install <c>hotplug-base</c> as one of it's dependencies. If you
193intend to use hotplug to execute specific actions when you plug in your
194favorite USB or IEEE1394 device then you should also emerge the whole bunch
195of hotplug scripts.
196</p>
191 197
192<pre caption="Installing necessary tools"> 198<pre caption="Installing optional hotplug scripts">
193# <i>emerge baselayout udev hotplug</i> 199# <i>emerge hotplug</i>
194</pre> 200</pre>
195 201
196<p> 202<p>
197Kernelwise, if you're using the default set by <c>genkernel</c> then you're all 203Kernelwise, if you're using the default set by <c>genkernel</c> then you're all
198set. Otherwise be sure to activate the following options: 204set. Otherwise be sure to activate the following options:
237work of many Gentoo developers that hacked our init scripts to get udev playing 243work of many Gentoo developers that hacked our init scripts to get udev playing
238nicely with Gentoo! 244nicely with Gentoo!
239</warn> 245</warn>
240 246
241<p> 247<p>
242First of all we'll deactivate the rules that save the device file nodes. 248We'll deactivate the rules hat save the device file nodes: edit the
243From <c>sys-apps/baselayout-1.8.6.13-r1</c> onwards, you can edit the
244<c>RC_DEVICE_TARBALL</c> variable in <path>/etc/conf.d/rc</path> and set it to 249<c>RC_DEVICE_TARBALL</c> variable in <path>/etc/conf.d/rc</path> and set it to
245<c>no</c>: 250<c>no</c>:
246</p> 251</p>
247 252
248<pre caption="/etc/conf.d/rc"> 253<pre caption="/etc/conf.d/rc">
249RC_DEVICE_TARBALL="no" 254RC_DEVICE_TARBALL="no"
250</pre> 255</pre>
251 256
252<p> 257<p>
253We also need to manually create some device node files in order for our system 258If you have included devfs support in your kernel, you can deactivate it in
254to perform a succesful boot: 259the bootloader configuration: add <c>devfs=nomount</c> as a kernel parameter. If
260you want to use devfs and deactivate udev, add <c>gentoo=noudev</c> as kernel
261parameter.
262</p>
263
264</body>
265</section>
266</chapter>
267
268<chapter>
269<title>Known Issues</title>
270<section>
271<title>Missing device node files at boot</title>
272<body>
273
274<p>
275If you can't boot succesfully because you get an error about
276<path>/dev/null</path> not found, or because the initial console is missing, the
277problem is that you lack some device files that must be available <e>before</e>
278<path>/dev</path> is mounted and handled by udev. This is common on Gentoo
279machines installed from old media.
280</p>
281
282<p>
283If you run <c>sys-apps/baselayout-1.8.12</c> or later, this problem is
284alleviated since the boot process should still manage to complete. However, to
285get rid of those annoying warnings, you should create he missing devices nodes
286as described below.
287</p>
288
289<p>
290To see which devices nodes are present before the <path>/dev</path> filesystem
291is mounted, run the following commands:
292</p>
293
294<pre caption="Listing device nodes available at boot">
295# <i>mkdir test</i>
296# <i>mount --bind / test</i>
297# <i>cd test/dev</i>
298# <i>ls</i>
299</pre>
300
301<p>
302The devices needed for a succesful boot are <path>/dev/null</path> and
303<path>/dev/console</path>. If they didn't show up in the previous test, you have
304to create them manually. Issue the following commands in the <path>test/</path>
305directory created previously:
255</p> 306</p>
256 307
257<pre caption="Creating necessary device node files"> 308<pre caption="Creating necessary device node files">
258# <i>mknod -m 660 /dev/console c 5 1</i> 309# <i>mknod -m 660 dev/console c 5 1</i>
259# <i>mknod -m 660 /dev/null c 1 3</i> 310# <i>mknod -m 660 dev/null c 1 3</i>
260</pre> 311</pre>
261 312
262<p>
263If you have included devfs support in your kernel, you can deactivate it from
264the bootloader configuration: add <c>devfs=nomount</c> as kernel parameter.
265</p> 313<p>
266 314When you're finished, don't forget to unmount the <path>test/</path> directory:
267<p> 315</p>
268If you want to use devfs and deactivate udev, add <c>gentoo=noudev</c> as kernel 316
269parameter. 317<pre caption="Unmounting the test/ directory">
318# <i>umount test</i>
270</p> 319</pre>
271 320
272</body> 321</body>
273</section>
274<section> 322</section>
275<title>Current Issues</title> 323<section>
324<title>udev and nvidia</title>
325<body>
326
327<p>
328If you use the proprietary driver from nVidia and the X server fails to start on
329a udev-only system, then make sure you have:
330</p>
331
332<ul>
333 <li>
334 the <c>nvidia</c> module listed in
335 <path>/etc/modules.autoload.d/kernel-2.6</path>
336 </li>
337 <li>
338 a version of <c>nvidia-kernel</c> equal to or greater han
339 <c>media-video/nvidia-kernel-1.0.5336-r2</c>
340 </li>
341 <li>
342 a version of baselayout equal to or greater than
343 <c>sys-apps/baselayout-1.8.12</c>
344 </li>
345</ul>
346
276<body> 347</body>
348</section>
349<section>
350<title>Other issues</title>
351<body>
277 352
278<note>
279Please report the <e>temporary fixes</e> to current issues to the Gentoo
280Documentation Project by using the <uri link="http://bugs.gentoo.org">Gentoo
281Bugzilla</uri> website.
282</note>
283
284<p>
285Q. My system doesn't display anything when booting using udev
286</p> 353<p>
287 354If device nodes are not created when a module is loaded from
355<path>/etc/modules.autoload.d/kernel-2.6</path> but they appear when you load
356the module manually with modprobe then you should try upgrading to
357<c>sys-apps/baselayout-1.8.12</c> or later.
288<p> 358</p>
289A. If this is the case, then you will need to create the 359
290<path>/dev/console</path> and <path>/dev/null</path> devices as mentioned in our
291Configuration section.
292</p> 360<p>
361Support for the framebuffer devices (<path>/dev/fb/*</path>) comes with the
362kernel starting from version 2.6.6-rc2.
363</p>
364
365<p>
366For kernels older than 2.6.4 you have to explicitly include support for the
367<path>/dev/pts</path> filesystem.
368</p>
369
370<pre caption="Enabling the /dev/pts filesystem">
371File systems ---&gt;
372 Pseudo filesystems ---&gt;
373 [*] /dev/pts file system for Unix98 PTYs
374</pre>
293 375
294</body> 376</body>
295</section> 377</section>
296</chapter> 378</chapter>
297 379
309<p> 391<p>
310<uri link="http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html">Decibel's 392<uri link="http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html">Decibel's
311UDEV Primer</uri> is an in-depth document about udev and Gentoo. 393UDEV Primer</uri> is an in-depth document about udev and Gentoo.
312</p> 394</p>
313 395
396<p>
397<uri link="http://www.reactivated.net/udevrules.php">Writing udev rules</uri> by
398fellow Gentoo developer Daniel Drake is an excellent document to learn how to
399customize your udev installation.
400</p>
401
314</body> 402</body>
315</section> 403</section>
316</chapter> 404</chapter>
317 405
318</guide> 406</guide>

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20