1 <sect1 id="ch-system-MAKEDEV" xreflabel="Makedev">
2 <title>Creating devices with Makedev-&makedev-version;</title>
3 <?dbhtml filename="makedev.html" dir="chapter06"?>
5 <para>The MAKEDEV package contains a script for making device nodes.</para>
7 <screen>&buildtime; &makedev-time;
8 &diskspace; &makedev-compsize;</screen>
13 <sect2><title> </title><para> </para></sect2>
16 <title>Making devices</title>
18 <para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename>
19 file doesn't create a directory for you to <command>cd</command> into, as
20 the file contains only a shell script.</para>
22 <para>Install the <command>MAKEDEV</command> script:</para>
24 <screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV
25 chmod 754 /dev/MAKEDEV</userinput></screen>
27 <para>Run the script to create the device files:</para>
29 <screen><userinput>cd /dev
30 ./MAKEDEV -v generic-nopty</userinput></screen>
32 <para>The meaning of the arguments:</para>
35 <listitem><para><userinput>-v</userinput>: This tells the script to run in
36 verbose mode.</para></listitem>
38 <listitem><para><userinput>generic-nopty</userinput>: This instructs
39 <command>MAKEDEV</command> to create a generic selection of commonly used
40 device special files, except for the ptyXX and ttyXX range of files. We don't
41 need those files because we are going to use Unix98 PTYs via the
42 <emphasis>devpts</emphasis> file system.</para></listitem>
45 <para>If it turns out that some special device <filename>zzz</filename> that
46 you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>.
47 Alternatively, you may create devices via the <command>mknod</command>
48 program. Please refer to its man and info pages if you need more
51 <para>If you wish your system to be FHS-compliant, then the
52 <filename>MAKEDEV</filename> script has to remain present in the
53 <filename class="directory">/dev</filename> directory. This way it is always
54 available for making extra device nodes.</para>
56 <para>Additionally, if you were unable to mount the devpts file system earlier
57 in <xref linkend="ch-system-proc"/>, now is the time to try the alternatives. If
58 your kernel supports the devfs file system, run the following command to mount
61 <screen><userinput>mount -t devfs devfs /dev</userinput></screen>
63 <para>This will mount the devfs file system over the top of the new static
64 <filename>/dev</filename> structure. This poses no problems, as the device nodes
65 created are still present, they are just hidden by the new devfs
68 <para>If this still doesn't work, the only option left is to use the MAKEDEV
69 script to create the ptyXX and ttyXX range of files that would otherwise not be
70 needed. Ensure you are still in the <filename>/dev</filename> directory then run
71 <userinput>./MAKEDEV -v pty</userinput>. The downside of this is, we are
72 creating an extra 512 device special files which will not be needed when we
73 finally boot into the finished LFS system.</para>
77 &aa-makedev-shortdesc;