makedev.xml 2.7 KB

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