Mount some standard filesystems like /proc in the stage3 init.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 6 Aug 2016 14:47:23 +0000 (15:47 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 6 Aug 2016 19:09:30 +0000 (20:09 +0100)
init.sh

diff --git a/init.sh b/init.sh
index f619f30..37ea1b5 100755 (executable)
--- a/init.sh
+++ b/init.sh
@@ -1,6 +1,17 @@
 #!/bin/bash -
 # Init script installed in stage3 disk image.
 
+# Root filesystem is mounted as ro, remount it as rw.
+mount -o remount,rw /
+
+# Mount standard filesystems.
+mount -t proc /proc /proc
+mount -t sysfs /sys /sys
+mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run
+mkdir -p /run/lock
+
+# XXX devtmpfs
+
 echo
 echo "Welcome to the Fedora/RISC-V stage3 disk image"
 echo "https://fedoraproject.org/wiki/Architectures/RISC-V"