makedev-inst.xml 2.4 KB

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