Switched from mounting /dev on a ramfs to a tmpfs.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@6208 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Archaic 2005-06-27 23:17:32 +00:00
parent 4bcbf2936d
commit 8446a0be74
4 changed files with 17 additions and 13 deletions

View File

@ -91,6 +91,9 @@ First a summary, then a detailed log.</para>
</itemizedlist> </itemizedlist>
</listitem> </listitem>
<listitem><para>June 27th, 2005 [archaic]: Switched from mounting /dev on a
ramfs to a tmpfs.</para></listitem>
<listitem><para>June 27th, 2005 [archaic]: Filled in text for errata page. <listitem><para>June 27th, 2005 [archaic]: Filled in text for errata page.
Thanks for the text, Steve!</para></listitem> Thanks for the text, Steve!</para></listitem>

View File

@ -22,19 +22,18 @@ mknod -m 666 /dev/null c 1 3</userinput></screen>
</sect2> </sect2>
<sect2> <sect2>
<title>Mounting ramfs and Populating /dev</title> <title>Mounting tmpfs and Populating /dev</title>
<para>The recommended method of populating the <filename <para>The recommended method of populating the <filename
class="directory">/dev</filename> directory with devices is to mount a virtual class="directory">/dev</filename> directory with devices is to mount a virtual
filesystem (such as <systemitem class="filesystem">ramfs</systemitem> or filesystem (such as <systemitem class="filesystem">tmpfs</systemitem>) on the
<systemitem class="filesystem">tmpfs</systemitem>) on the <filename <filename class="directory">/dev</filename> directory, and allow the devices to
class="directory">/dev</filename> directory, and allow the devices to be created be created dynamically on that virtual filesystem as they are detected or
dynamically on that virtual filesystem as they are detected or accessed. This is accessed. This is generally done during the boot process. Since this new system
generally done during the boot process. Since this new system has not been has not been booted, it is necessary to do what the bootscripts would otherwise
booted, it is necessary to do what the bootscripts would otherwise do by do by mounting <filename class="directory">/dev</filename>:</para>
mounting <filename class="directory">/dev</filename>:</para>
<screen><userinput>mount -n -t ramfs none /dev</userinput></screen> <screen><userinput>mount -n -t tmpfs none /dev</userinput></screen>
<para>The Udev package is what actually creates the devices in the <filename <para>The Udev package is what actually creates the devices in the <filename
class="directory">/dev</filename> directory. Since it will not be installed class="directory">/dev</filename> directory. Since it will not be installed
@ -51,8 +50,10 @@ mknod -m 444 /dev/urandom c 1 9
chown root:tty /dev/{console,ptmx,tty}</userinput></screen> chown root:tty /dev/{console,ptmx,tty}</userinput></screen>
<!-- --> <!-- -->
<para>There are some symlinks and directories required by LFS that are <para>There are some symlinks and directories required by LFS that are created
not created by Udev, so create those here:</para> during boot by the bootscripts. Since this is a chroot environment and not a
booted environment, those symlinks and directories need to be created
here:</para>
<screen><userinput>ln -s /proc/self/fd /dev/fd <screen><userinput>ln -s /proc/self/fd /dev/fd
ln -s /proc/self/fd/0 /dev/stdin ln -s /proc/self/fd/0 /dev/stdin

View File

@ -29,7 +29,7 @@ environment.</para>
chroot environment. To keep the host up to date, perform a <quote>fake chroot environment. To keep the host up to date, perform a <quote>fake
mount</quote> for each of these now:</para> mount</quote> for each of these now:</para>
<screen><userinput>mount -f -t ramfs ramfs $LFS/dev <screen><userinput>mount -f -t tmpfs tmpfs $LFS/dev
mount -f -t tmpfs tmpfs $LFS/dev/shm mount -f -t tmpfs tmpfs $LFS/dev/shm
mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts</userinput></screen> mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts</userinput></screen>

View File

@ -27,7 +27,7 @@ numbers for every possible device that might exist in the world. Using
the udev method, only those devices which are detected by the kernel the udev method, only those devices which are detected by the kernel
get device nodes created for them. Because these device nodes will be get device nodes created for them. Because these device nodes will be
created each time the system boots, they will be stored on a created each time the system boots, they will be stored on a
<systemitem class="filesystem">ramfs</systemitem> (a file system that <systemitem class="filesystem">tmpfs</systemitem> (a file system that
resides entirely in memory and does not take up any disk space). resides entirely in memory and does not take up any disk space).
Device nodes do not require much disk space, so the memory that is Device nodes do not require much disk space, so the memory that is
used is negligible.</para> used is negligible.</para>