makedev.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <sect1 id="ch06-MAKEDEV" xreflabel="Makedev">
  2. <title>Creating devices with Makedev-&makedev-version;</title>
  3. <?dbhtml filename="makedev.html" dir="chapter06"?>
  4. <para>The MAKEDEV package contains a script for making device nodes.</para>
  5. <screen>Estimated build time: &makedev-time;
  6. Estimated required disk space: &makedev-compsize;</screen>
  7. &aa-makedev-down;
  8. &aa-makedev-dep;
  9. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  10. <sect2>
  11. <title>Making devices</title>
  12. <para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename>
  13. file doesn't create a directory for you to <userinput>cd</userinput> into, as
  14. the file contains only a shell script.</para>
  15. <para>Install the <userinput>MAKEDEV</userinput> script:</para>
  16. <screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 &gt; /dev/MAKEDEV
  17. chmod 754 /dev/MAKEDEV</userinput></screen>
  18. <para>Run the script to create the device files:</para>
  19. <screen><userinput>cd /dev
  20. ./MAKEDEV -v generic-nopty</userinput></screen>
  21. <para>The meaning of the arguments:</para>
  22. <itemizedlist>
  23. <listitem><para><userinput>-v</userinput>: This tells the script to run in
  24. verbose mode.</para></listitem>
  25. <listitem><para><userinput>generic-nopty</userinput>: This instructs
  26. <userinput>MAKEDEV</userinput> to create a generic selection of commonly used
  27. device special files, except for the ptyXX and ttyXX range of files. We don't
  28. need those files because we are going to use Unix98 PTYs via the
  29. <emphasis>devpts</emphasis> file system.</para></listitem>
  30. </itemizedlist>
  31. <para>If it turns out that some special device <filename>zzz</filename> that
  32. you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>.
  33. Alternatively, you may create devices via the <userinput>mknod</userinput>
  34. program. Please refer to its man and info pages if you need more
  35. information.</para>
  36. <para>Additionally, if you were unable to mount the devpts filesystem earlier
  37. in <xref linkend="ch06-proc"/>, now is the time to try the alternatives. If
  38. your kernel supports the devfs file system, run the following command to mount
  39. devfs:</para>
  40. <screen><userinput>mount -t devfs devfs /dev</userinput></screen>
  41. <para>This will mount the devfs file system over the top of the new static
  42. <filename>/dev</filename> structure. This poses no problems, as the device nodes
  43. created are still present, they are just hidden by the new devfs
  44. filesystem.</para>
  45. <para>If this still doesn't work, the only option left is to use the MAKEDEV
  46. script to create the ptyXX and ttyXX range of files that would otherwise not be
  47. needed. Ensure you are still in the <filename>/dev</filename> directory then run
  48. <userinput>./MAKEDEV -v pty</userinput>. The downside of this is, we are
  49. creating an extra 512 device special files which will not be needed when we
  50. finally boot into the finished LFS system.</para>
  51. </sect2>
  52. &aa-makedev-shortdesc;
  53. &aa-makedev-desc;
  54. </sect1>