| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 | <sect1 id="ch-system-MAKEDEV" xreflabel="Makedev"><title>Creating devices with Makedev-&makedev-version;</title><?dbhtml filename="makedev.html" dir="chapter06"?><para>The MAKEDEV package contains a script for making device nodes.</para><screen>&buildtime; &makedev-time;&diskspace; &makedev-compsize;</screen>&aa-makedev-down;&aa-makedev-dep;<sect2><title> </title><para> </para></sect2><sect2><title>Making devices</title><para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename>file doesn't create a directory for you to <command>cd</command> into, asthe file contains only a shell script.</para><para>Install the <command>MAKEDEV</command> script:</para><screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEVchmod 754 /dev/MAKEDEV</userinput></screen><para>Run the script to create the device files:</para><screen><userinput>cd /dev./MAKEDEV -v generic-nopty</userinput></screen><para>The meaning of the arguments:</para><itemizedlist><listitem><para><userinput>-v</userinput>: This tells the script to run inverbose mode.</para></listitem><listitem><para><userinput>generic-nopty</userinput>: This instructs<command>MAKEDEV</command> to create a generic selection of commonly useddevice special files, except for the ptyXX and ttyXX range of files. We don'tneed those files because we are going to use Unix98 PTYs via the<emphasis>devpts</emphasis> file system.</para></listitem></itemizedlist><para>If it turns out that some special device <filename>zzz</filename> thatyou need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>.Alternatively, you may create devices via the <command>mknod</command>program. Please refer to its man and info pages if you need moreinformation.</para><para>If you wish your system to be FHS-compliant, then the<filename>MAKEDEV</filename> script has to remain present in the<filename class="directory">/dev</filename> directory. This way it is alwaysavailable for making extra device nodes.</para><para>Additionally, if you were unable to mount the devpts file system earlierin <xref linkend="ch-system-proc"/>, now is the time to try the alternatives. Ifyour kernel supports the devfs file system, run the following command to mountdevfs:</para><screen><userinput>mount -t devfs devfs /dev</userinput></screen><para>This will mount the devfs file system over the top of the new static<filename>/dev</filename> structure. This poses no problems, as the device nodescreated are still present, they are just hidden by the new devfsfile system.</para><para>If this still doesn't work, the only option left is to use the MAKEDEVscript to create the ptyXX and ttyXX range of files that would otherwise not beneeded. Ensure you are still in the <filename>/dev</filename> directory then run<userinput>./MAKEDEV -v pty</userinput>. The downside of this is, we arecreating an extra 512 device special files which will not be needed when wefinally boot into the finished LFS system.</para></sect2>&aa-makedev-shortdesc;&aa-makedev-desc;</sect1>
 |