[arch-general] [PATCH] automatically mount debugfs
Markus Trippelsdorf
markus at trippelsdorf.de
Thu Oct 15 12:31:59 EDT 2009
Here is a patch for rc.sysinit to automatically mount the kernel's
debugfs, if available.
(I switched from Gentoo to Arch two days ago and first sent this message
to arch-dev-public which turned out to be read-only. Maybe a hint on the
mailman page would be nice, to spare future newbies the same experience?)
--- rc.sysinit_old 2009-10-14 20:08:56.776237753 +0200
+++ rc.sysinit 2009-10-14 20:40:28.227216838 +0200
@@ -19,6 +19,13 @@
/bin/mount -n -t proc none /proc
/bin/mount -n -t sysfs none /sys
+# mount debugfs, if available
+if [ -d /sys/kernel/debug ]; then
+ if grep -qs debugfs /proc/filesystems; then
+ mount -n -t debugfs -o nodev,noexec,nosuid debugfs /sys/kernel/debug
+ fi
+fi
+
# Copy static device nodes to /dev
/bin/cp -a /lib/udev/devices/* /dev/
@@ -288,7 +295,7 @@
/bin/mount -o remount,rw /
# Write /proc, /sys and /dev to /etc/mtab
if [ -e /proc/mounts ]; then
- /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
+ /bin/grep -e "/proc " -e "/sys " -e "/dev " -e "debugfs" /proc/mounts >> /etc/mtab
fi
# now mount all the local filesystems
/bin/mount -a -t $NETFS -O no_netdev
--
Markus
More information about the arch-general
mailing list