diff options
author | Tom Gundersen <teg@jklm.no> | 2011-03-29 15:14:33 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2011-04-23 21:43:22 +0200 |
commit | 09c27ea248efebe1e72aa688cb55996dadbbbe29 (patch) | |
tree | a886ec50087620f1d197199cc75498bb25e7b06f /rc.sysinit | |
parent | 9ce42645e7568a08e31ea1b2eab4edef0487828c (diff) |
/dev: mount /dev/pts and /dev/shm during early boot
This has two purposes:
1) it allows boot services like bootlogd (that needs /dev/pts) to be
started very early in boot, and
2) by setting the standard options in rc.sysinit rather than in fstab we
have control over them and can easily integrate them with other packages
and make adjustments to fix bugs. This brings /dev/{pts,shm} into line
with how we handle /dev, /proc, /sys and /run.
With this patch /dev/{pts,shm} can (and probably should) be removed from
the default fstab file, and fstab should only contain entries for the
mountpoints the user has specified during install, like /boot, /home and
/var. It will now be possible to boot a working system with an empty fstab.
If /dev/{pts,shm} is in fstab the mountoptions there will take precedenc
over the standard ones.
Cc: Pierre Schmitz <pierre@archlinux.org>
Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -16,7 +16,7 @@ run_hook sysinit_start # export standard PATH (will be overridden later when /etc/profile is sourced, but is usefull for UDev) export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -# mount /dev, /proc, /sys, /run (the api filesystems) +# mount /proc, /sys, /dev, /dev/pts and /dev/shm (the api filesystems) if ! /bin/mountpoint -q /dev; then if grep -q devtmpfs /proc/filesystems 2>/dev/null; then /bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid @@ -24,12 +24,12 @@ if ! /bin/mountpoint -q /dev; then /bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid fi fi - -/bin/mkdir -p /dev/{pts,shm} - -/bin/mountpoint -q /proc || /bin/mount -n -t proc proc /proc -o nosuid,noexec,nodev -/bin/mountpoint -q /sys || /bin/mount -n -t sysfs sysfs /sys -o nosuid,noexec,nodev -/bin/mountpoint -q /run || /bin/mount -n -t tmpfs tmpfs /run -o mode=755,size=10M,nosuid,noexec,nodev +/bin/mkdir -p /run/lock /dev/{pts,shm} +/bin/chmod 1777 /run/lock +/bin/mountpoint -q /dev/pts || /bin/mount /dev/pts &> /dev/null \ + || /bin/mount -n -t devpts devpts /dev/pts -o mode=620,gid=5,nosuid,noexec +/bin/mountpoint -q /dev/shm || /bin/mount /devshm &> /dev/null \ + || /bin/mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev # start up our mini logger until syslog takes over /sbin/minilogd |