Fixing mount points

This commit is contained in:
Adam Boardman 2021-01-01 00:47:46 +00:00
parent a9dc3cc4be
commit 31eec882d7
4 changed files with 65 additions and 7 deletions

View file

@ -0,0 +1,20 @@
[Unit]
Description=Droid mount for /config
Before=local-fs.target systemd-modules-load.service
[Mount]
What=none
Where=/config
Type=configfs
Options=nodev,noexec,nosuid
# Options had SELinux context option:
# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10
[Install]
WantedBy=local-fs.target
# From ./out/target/product/cosmopda/root/init.rc :
# mount configfs none /config nodev noexec nosuid

View file

@ -0,0 +1,18 @@
[Unit]
Description=Droid mount for /system
Before=local-fs.target systemd-modules-load.service
[Mount]
What=/system_root/system
Where=/system
Type=overlay
# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10
[Install]
WantedBy=local-fs.target
# From ./out/target/product/cosmopda/root/fstab.mt6771 :
# /dev/mmcblk0p33 / ext4 ro wait,verify,recoveryonly

View file

@ -0,0 +1,20 @@
[Unit]
Description=Droid mount for /system_root
Before=local-fs.target systemd-modules-load.service
[Mount]
What=/dev/disk/by-partlabel/system
Where=/system_root
Type=ext4
Options=ro
# Options had SELinux context option:
# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10
[Install]
WantedBy=local-fs.target
# From ./out/target/product/cosmopda/root/fstab.mt6771 :
# /dev/mmcblk0p33 / ext4 ro wait,verify,recoveryonly

View file

@ -1,14 +1,14 @@
#!/bin/sh -e #!/bin/sh -e
# Read-only flipped model doesn't need all this # Read-only flipped model doesn't need all this
[ -d /android ] && exit 0 #[ -d /android ] && exit 0
/usr/lib/lxc-android/update-fstab #/usr/lib/lxc-android/update-fstab
grep -q " /data" /proc/mounts 2>/dev/null || mount /data #grep -q " /data" /proc/mounts 2>/dev/null || mount /data
grep -q " /system" /proc/mounts 2>/dev/null || mount /system #grep -q " /system" /proc/mounts 2>/dev/null || mount /system
grep -q " /vendor" /proc/mounts 2>/dev/null || mount /vendor #grep -q " /vendor" /proc/mounts 2>/dev/null || mount /vendor
grep -q " /persist" /proc/mounts 2>/dev/null || mount /persist || true #grep -q " /persist" /proc/mounts 2>/dev/null || mount /persist || true
[ -e /lib/modules ] || ln -s /system/lib/modules /lib/modules #[ -e /lib/modules ] || ln -s /system/lib/modules /lib/modules
device=$(grep ^ro.product.device= /system/build.prop |sed -e 's/.*=//') device=$(grep ^ro.product.device= /system/build.prop |sed -e 's/.*=//')
[ -e /lib/udev/rules.d/70-$device.rules ] || \ [ -e /lib/udev/rules.d/70-$device.rules ] || \
cp /usr/lib/lxc-android/70-$device.rules /lib/udev/rules.d/ cp /usr/lib/lxc-android/70-$device.rules /lib/udev/rules.d/