Changeset e9ba8aa8 for bootscripts/lfs


Ignore:
Timestamp:
01/16/2012 06:34:31 PM (12 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
f70b664
Parents:
6c3ab2e
Message:

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

Location:
bootscripts/lfs/init.d
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/lfs/init.d/mountfs

    r6c3ab2e re9ba8aa8  
    4747      mount -f /sys  || failed=1
    4848      mount -f /run  || failed=1
     49      mount -f /dev  || failed=1
    4950      (exit ${failed})
    5051      evaluate_retval
  • bootscripts/lfs/init.d/mountvirtfs

    r6c3ab2e re9ba8aa8  
    4242      if ! mountpoint /proc >/dev/null; then
    4343         log_info_msg2 " ${INFO}/proc"
    44          mount -n /proc || failed=1
     44         mount -n -o nosuid,noexec,nodev /proc || failed=1
    4545      fi
    4646
    4747      if ! mountpoint /sys >/dev/null; then
    4848         log_info_msg2 " ${INFO}/sys"
    49          mount -n /sys || failed=1
     49         mount -n -o nosuid,noexec,nodev /sys || failed=1
    5050      fi
     51
     52      if ! mountpoint /dev >/dev/null; then
     53         log_info_msg2 " ${INFO}/dev"
     54         mount -n -o mode=0755,nosuid /dev  || failed=1
     55      fi
     56
     57      ln -s /run/shm /dev/shm
     58     
     59      # Copy the only static device node that Udev >= 155 doesn't
     60      # handle to /dev
     61      cp -a /lib/udev/devices/null /dev
    5162
    5263      (exit ${failed})
  • bootscripts/lfs/init.d/udev

    r6c3ab2e re9ba8aa8  
    4444      fi
    4545
    46       # Mount a temporary file system over /dev, so that any devices
    47       # made or removed during this boot don't affect the next one.
    48       # The reason we don't write to mtab is because we don't ever
    49       # want /dev to be unavailable (such as by `umount -a').
    50       if ! mountpoint /dev > /dev/null; then
    51          mount -n -t tmpfs tmpfs /dev -o mode=755
    52       fi
    53 
    54       if [ ${?} != 0 ]; then
    55          log_failure_msg2
    56          msg="FAILURE:\n\nCannot mount a tmpfs "
    57          msg="${msg}onto /dev, this system will be halted.\n\n"
    58          msg="${msg}After you press Enter, this system "
    59          msg="${msg}will be halted and powered off.\n\n"
    60          log_failure_msg "$msg"
    61          log_info_msg "Press Enter to continue..."
    62          wait_for_user
    63          /etc/rc.d/init.d/halt stop
    64       fi
    65 
    66       ln -s /run/shm /dev/shm
    67 
    6846      # Udev handles uevents itself, so we don't need to have
    6947      # the kernel call out to any binary in response to them
    7048      echo > /proc/sys/kernel/hotplug
    71 
    72       # Copy the only static device node that Udev >= 155 doesn't
    73       # handle to /dev
    74       cp -a /lib/udev/devices/null /dev
    7549
    7650      # Start the udev daemon to continually watch for, and act on,
Note: See TracChangeset for help on using the changeset viewer.