Skip to content
Snippets Groups Projects
Commit eeff0066 authored by Zoé Bőle's avatar Zoé Bőle
Browse files

added bind mounts

parent 70ee87b3
No related branches found
No related tags found
1 merge request!12RC1 of MNT Reform System Image and Rescue Image
......@@ -3,7 +3,8 @@
set -x
set -e
sudo apt install parted multistrap udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support
# make sure build tools are installes
sudo apt-get -y install parted multistrap udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support
# build the linux kernel
./mkkernel.sh
......
......@@ -5,6 +5,23 @@
ETC=./template-etc
SKEL=./template-skel
mbind() {
for d in dev proc sys
do
mount /$d target-userland/$d -o bind || echo "Bind-mounting /$d failed"
done
}
munbind() {
for d in dev proc sys
do
umount -f target-userland/$d || echo "Umounting $d failed"
done
}
# Make sure there are no bind-mounts before attempting to delete the target
munbind
rm -rf ./target-userland
mkdir ./target-userland
......@@ -62,8 +79,10 @@ cp $ETC/eth.network target-userland/etc/systemd/network/
mkdir -p target-userland/var/lib/alsa
cp $ETC/asound.state target-userland/var/lib/alsa/
mknod target-userland/dev/random c 1 8
mknod target-userland/dev/urandom c 1 9
mbind
#mknod target-userland/dev/random c 1 8
#mknod target-userland/dev/urandom c 1 9
chown root:root -R target-userland/*
chown root:shadow target-userland/etc/shadow
......@@ -90,3 +109,5 @@ EOF
mkdir -p target-userland/etc/pulseaudio
cp $ETC/daemon.conf target-userland/etc/pulse/
munbind
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment