From 5e5b61aa28dc1cd88f1f70a022dc6e966cffef83 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Aug 2016 17:27:08 +0100 Subject: [PATCH] Create mount.static and use it for mounting the filesystems. This is less error-prone, particularly as for some inexplicable reason regular mount has stopped working. --- Makefile | 3 ++- init.sh | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 530efbd..aa5bd8c 100644 --- a/Makefile +++ b/Makefile @@ -502,7 +502,8 @@ stage3-chroot/usr/bin/mount: util-linux-$(UTIL_LINUX_VERSION).tar.xz --without-tinfo \ --without-ncurses \ --without-systemd \ - --disable-makeinstall-chown + --disable-makeinstall-chown \ + --enable-static-programs=mount cd util-linux-$(UTIL_LINUX_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make cd util-linux-$(UTIL_LINUX_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make install DESTDIR=$(ROOT)/stage3-chroot rm -f stage3-chroot/usr/lib64/*.la diff --git a/init.sh b/init.sh index 267ae74..7dbb8fd 100755 --- a/init.sh +++ b/init.sh @@ -5,12 +5,12 @@ LD_LIBRARY_PATH=/usr/lib64 export LD_LIBRARY_PATH # Root filesystem is mounted as ro, remount it as rw. -mount -o remount,rw / +mount.static -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 +mount.static -t proc /proc /proc +mount.static -t sysfs /sys /sys +mount.static -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run mkdir -p /run/lock # XXX devtmpfs -- 1.8.3.1