mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 11:49:20 +01:00
Change bootscripts to use devtmpfs for /dev.
Move mounting of /dev to mountvirtfs and ensure /dev gets placed in /etc/mtab. Change fstab and kernel configuration sections to reflect these changes. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9710 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
6c3ab2e4b6
commit
e9ba8aa85f
@ -46,6 +46,7 @@ case "${1}" in
|
|||||||
mount -f /proc || failed=1
|
mount -f /proc || failed=1
|
||||||
mount -f /sys || failed=1
|
mount -f /sys || failed=1
|
||||||
mount -f /run || failed=1
|
mount -f /run || failed=1
|
||||||
|
mount -f /dev || failed=1
|
||||||
(exit ${failed})
|
(exit ${failed})
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
|
|
||||||
|
@ -41,14 +41,25 @@ case "${1}" in
|
|||||||
|
|
||||||
if ! mountpoint /proc >/dev/null; then
|
if ! mountpoint /proc >/dev/null; then
|
||||||
log_info_msg2 " ${INFO}/proc"
|
log_info_msg2 " ${INFO}/proc"
|
||||||
mount -n /proc || failed=1
|
mount -n -o nosuid,noexec,nodev /proc || failed=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! mountpoint /sys >/dev/null; then
|
if ! mountpoint /sys >/dev/null; then
|
||||||
log_info_msg2 " ${INFO}/sys"
|
log_info_msg2 " ${INFO}/sys"
|
||||||
mount -n /sys || failed=1
|
mount -n -o nosuid,noexec,nodev /sys || failed=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! mountpoint /dev >/dev/null; then
|
||||||
|
log_info_msg2 " ${INFO}/dev"
|
||||||
|
mount -n -o mode=0755,nosuid /dev || failed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -s /run/shm /dev/shm
|
||||||
|
|
||||||
|
# Copy the only static device node that Udev >= 155 doesn't
|
||||||
|
# handle to /dev
|
||||||
|
cp -a /lib/udev/devices/null /dev
|
||||||
|
|
||||||
(exit ${failed})
|
(exit ${failed})
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
exit $failed
|
exit $failed
|
||||||
|
@ -43,36 +43,10 @@ case "${1}" in
|
|||||||
/etc/rc.d/init.d/halt stop
|
/etc/rc.d/init.d/halt stop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mount a temporary file system over /dev, so that any devices
|
|
||||||
# made or removed during this boot don't affect the next one.
|
|
||||||
# The reason we don't write to mtab is because we don't ever
|
|
||||||
# want /dev to be unavailable (such as by `umount -a').
|
|
||||||
if ! mountpoint /dev > /dev/null; then
|
|
||||||
mount -n -t tmpfs tmpfs /dev -o mode=755
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${?} != 0 ]; then
|
|
||||||
log_failure_msg2
|
|
||||||
msg="FAILURE:\n\nCannot mount a tmpfs "
|
|
||||||
msg="${msg}onto /dev, this system will be halted.\n\n"
|
|
||||||
msg="${msg}After you press Enter, this system "
|
|
||||||
msg="${msg}will be halted and powered off.\n\n"
|
|
||||||
log_failure_msg "$msg"
|
|
||||||
log_info_msg "Press Enter to continue..."
|
|
||||||
wait_for_user
|
|
||||||
/etc/rc.d/init.d/halt stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln -s /run/shm /dev/shm
|
|
||||||
|
|
||||||
# Udev handles uevents itself, so we don't need to have
|
# Udev handles uevents itself, so we don't need to have
|
||||||
# the kernel call out to any binary in response to them
|
# the kernel call out to any binary in response to them
|
||||||
echo > /proc/sys/kernel/hotplug
|
echo > /proc/sys/kernel/hotplug
|
||||||
|
|
||||||
# Copy the only static device node that Udev >= 155 doesn't
|
|
||||||
# handle to /dev
|
|
||||||
cp -a /lib/udev/devices/null /dev
|
|
||||||
|
|
||||||
# Start the udev daemon to continually watch for, and act on,
|
# Start the udev daemon to continually watch for, and act on,
|
||||||
# uevents
|
# uevents
|
||||||
/sbin/udevd --daemon
|
/sbin/udevd --daemon
|
||||||
|
@ -37,6 +37,18 @@
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>2012-01-16</para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>[bdubbs] - Change bootscripts to use devtmpfs for /dev.
|
||||||
|
Move mounting of /dev to mountvirtfs and ensure /dev gets
|
||||||
|
placed in /etc/mtab. Change fstab and kernel configuration
|
||||||
|
sections to reflect these changes.</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>2012-01-11</para>
|
<para>2012-01-11</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
@ -22,15 +22,17 @@
|
|||||||
<screen><userinput>cat > /etc/fstab << "EOF"
|
<screen><userinput>cat > /etc/fstab << "EOF"
|
||||||
<literal># Begin /etc/fstab
|
<literal># Begin /etc/fstab
|
||||||
|
|
||||||
# file system mount-point type options dump fsck
|
# file system mount-point type options dump fsck
|
||||||
# order
|
# order
|
||||||
|
|
||||||
|
/dev/<replaceable><xxx></replaceable> / <replaceable><fff></replaceable> defaults 1 1
|
||||||
|
/dev/<replaceable><yyy></replaceable> swap swap pri=1 0 0
|
||||||
|
proc /proc proc nosuid,noexec,nodev 0 0
|
||||||
|
sysfs /sys sysfs nosuid,noexec,nodev 0 0
|
||||||
|
devpts /dev/pts devpts gid=4,mode=620 0 0
|
||||||
|
tmpfs /run tmpfs defaults 0 0
|
||||||
|
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
|
||||||
|
|
||||||
/dev/<replaceable><xxx></replaceable> / <replaceable><fff></replaceable> defaults 1 1
|
|
||||||
/dev/<replaceable><yyy></replaceable> swap swap pri=1 0 0
|
|
||||||
proc /proc proc defaults 0 0
|
|
||||||
sysfs /sys sysfs defaults 0 0
|
|
||||||
devpts /dev/pts devpts gid=4,mode=620 0 0
|
|
||||||
tmpfs /run tmpfs defaults 0 0
|
|
||||||
# End /etc/fstab</literal>
|
# End /etc/fstab</literal>
|
||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
|
@ -58,10 +58,17 @@
|
|||||||
|
|
||||||
<para>Configure the kernel via a menu-driven interface. For general
|
<para>Configure the kernel via a menu-driven interface. For general
|
||||||
information on kernel configuration see <ulink
|
information on kernel configuration see <ulink
|
||||||
url="&hints-root;kernel-configuration.txt"/>. BLFS has some information
|
url="&hints-root;kernel-configuration.txt"/>. BLFS has some information
|
||||||
regarding particular kernel configuration requirements of packages outside
|
regarding particular kernel configuration requirements of packages outside
|
||||||
of LFS at <ulink
|
of LFS at <ulink
|
||||||
url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>:</para>
|
url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>. </para>
|
||||||
|
|
||||||
|
<note><para>Due to recent changes in <application>udev</application>, be sure to
|
||||||
|
select:</para>
|
||||||
|
|
||||||
|
<screen role="nodump">Device Drivers --->
|
||||||
|
Generic Driver Options --->
|
||||||
|
Maintain a devtmpfs filesystem to mount at /dev</screen></note>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>make LANG=<replaceable><host_LANG_value></replaceable> LC_ALL= menuconfig</userinput></screen>
|
<screen role="nodump"><userinput>make LANG=<replaceable><host_LANG_value></replaceable> LC_ALL= menuconfig</userinput></screen>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!ENTITY version "SVN-20120111">
|
<!ENTITY version "SVN-20120116">
|
||||||
<!ENTITY releasedate "Jan 11, 2012">
|
<!ENTITY releasedate "Jan 16, 2012">
|
||||||
<!ENTITY copyrightdate "1999-2012"><!-- jhalfs needs a literal dash, not – -->
|
<!ENTITY copyrightdate "1999-2012"><!-- jhalfs needs a literal dash, not – -->
|
||||||
<!ENTITY milestone "7.1">
|
<!ENTITY milestone "7.1">
|
||||||
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
|
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
|
||||||
|
@ -297,7 +297,7 @@
|
|||||||
<!ENTITY less-ch6-du "3.5 MB">
|
<!ENTITY less-ch6-du "3.5 MB">
|
||||||
<!ENTITY less-ch6-sbu "less than 0.1 SBU">
|
<!ENTITY less-ch6-sbu "less than 0.1 SBU">
|
||||||
|
|
||||||
<!ENTITY lfs-bootscripts-version "20111128"> <!-- Scripts depend on this format -->
|
<!ENTITY lfs-bootscripts-version "20120116"> <!-- Scripts depend on this format -->
|
||||||
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile -->
|
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile -->
|
||||||
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
|
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
|
||||||
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!-- Updated in Makefile -->
|
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!-- Updated in Makefile -->
|
||||||
|
Loading…
Reference in New Issue
Block a user