summaryrefslogtreecommitdiffstats
path: root/stage1
diff options
context:
space:
mode:
authorAl Stone <ahs3@redhat.com>2012-11-13 14:02:08 -0700
committerAl Stone <ahs3@redhat.com>2012-11-13 14:02:08 -0700
commit90c5a8046f7c788b698765608dcc582f01567988 (patch)
treef4c4ba57bfb4c03cf5582a360ec14924db467a12 /stage1
parent1b93f16ba077c1cfa02b02e7939b3b9a6f9e5554 (diff)
downloadbootstrap.git.DONOTUSE-90c5a8046f7c788b698765608dcc582f01567988.tar.gz
bootstrap.git.DONOTUSE-90c5a8046f7c788b698765608dcc582f01567988.tar.xz
bootstrap.git.DONOTUSE-90c5a8046f7c788b698765608dcc582f01567988.zip
clean up /proc, /sys mounts
Diffstat (limited to 'stage1')
-rwxr-xr-xstage121
1 files changed, 15 insertions, 6 deletions
diff --git a/stage1 b/stage1
index 6e189a0..c32eb49 100755
--- a/stage1
+++ b/stage1
@@ -914,13 +914,22 @@ EOF
make busybox CROSS_COMPILE=${TARGET}-
make install CONFIG_PREFIX=${ROOTFS}
- # simple start up script to be invoked by hand, if desired
+ # add in some basic mount points
+ [ -d ${ROOTFS}/proc ] || mkdir ${ROOTFS}/proc
+ [ -d ${ROOTFS}/sys ] || mkdir ${ROOTFS}/sys
(
- echo '#!/bin/sh'
- echo mount -t proc proc /proc
- echo mount -t sysfs sysfs /sys
- ) > $ROOTFS/do_mounts.sh
- chmod +x $ROOTFS/do_mounts.sh
+ echo "proc /proc proc defaults 0 0"
+ echo "sysfs /sys sysfs defaults 0 0"
+ ) > $ROOTFS/etc/fstab
+
+ # and a place holder for other useful initializations
+ [ -d ${ROOTFS}/etc/init.d ] || mkdir -p ${ROOTFS}/etc/init.d
+ echo "#!/bin/sh" > ${ROOTFS}/etc/init.d/rcS
+ (
+ echo "#!/bin/sh"
+ echo "/bin/mount -a"
+ ) > $ROOTFS/etc/init.d/rcS
+ chmod +x ${ROOTFS}/etc/init.d/rcS
;;
util-linux )