Move mounting of debugfs back to chromeos_startup script
Since boards built without debugd do not have debugfs-access user and
group, the mount command for debugfs will fail, causing the script to
exit early before /run is mounted as tmpfs. Move the mount command
back to chromeos_startup, which will continue execution after the
mount.
BUG=chromium:388394
TEST=panther boots with debugfs mounted.
TEST=duck boots, /run is mounted as tmpfs.
Change-Id: I86a9aa99790d4692184a202c99c848c55469a1ab
Reviewed-on: https://chromium-review.googlesource.com/205353
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Steve Fung <stevefung@chromium.org>
Tested-by: Steve Fung <stevefung@chromium.org>
diff --git a/chromeos_startup b/chromeos_startup
index 7a1a089..f4de3e6 100755
--- a/chromeos_startup
+++ b/chromeos_startup
@@ -35,6 +35,13 @@
cleanup_mounts
}
+# Mount debugfs as bootstat depends on /sys/kernel/debug
+mount -n -t debugfs -o nodev,noexec,nosuid,mode=0750,uid=0,gid=debugfs-access \
+ debugfs /sys/kernel/debug
+
+# bootstat writes timings to both tmpfs and debugfs.
+bootstat pre-startup
+
# Some startup functions are split into a separate library which may be
# different for different targets (e.g., regular Chrome OS vs. embedded).
. /usr/share/cros/startup_utils.sh
diff --git a/pre-startup.conf b/pre-startup.conf
index 0fc9295..5c30917 100644
--- a/pre-startup.conf
+++ b/pre-startup.conf
@@ -11,13 +11,7 @@
# The kernel and /sbin/init mount /proc, /sys and /dev before
# we get here.
mount -n -t tmpfs -o nodev,noexec,nosuid tmp /tmp
- # Mount debugfs as bootstat depends on /sys/kernel/debug
- mount -n -t debugfs -o nodev,noexec,nosuid,mode=0750,uid=0,gid=debugfs-access \
- debugfs /sys/kernel/debug
mount -n -t tmpfs -o mode=0755,nodev,noexec,nosuid run /run
mkdir -m 1777 /run/lock
-
- # bootstat writes timings to both tmpfs and debugfs.
- bootstat pre-startup
end script