mount sd card (#31)

* mount sd card

* just use a script

* noatime
This commit is contained in:
Adeeb Shihadeh
2022-01-07 11:07:11 -08:00
committed by GitHub
parent feb8207d78
commit 1aec6ea7ba
4 changed files with 30 additions and 1 deletions
-1
View File
@@ -2,6 +2,5 @@
/dev/disk/by-partlabel/modem_a /firmware auto ro
/dev/disk/by-partlabel/persist /persist auto ro,discard,nosuid,nodev,noexec
/dev/disk/by-partlabel/userdata /data auto discard,noatime,nodiratime,nosuid,nodev,nofail 0 0
/dev/nvme0n1 /data/media auto discard,nosuid,nodev,nofail,x-systemd.device-timeout=5s 0 0
tmpfs /var tmpfs rw,nosuid,nodev,size=128M,mode=755 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,size=150M,mode=1777 0 0
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=Mount storage drive
After=data.mount
[Service]
Type=oneshot
ExecStart=/usr/comma/mount-storage.sh
[Install]
WantedBy=local-fs.target
+1
View File
@@ -17,6 +17,7 @@ systemctl enable weston.service
systemctl enable wifi.service
systemctl enable init-qcom.service
systemctl enable power_drop_monitor.service
systemctl enable mount_storage.service
systemctl enable brightnessd.service
systemctl enable ssh-param-watcher.path
systemctl enable ssh-param-watcher.service
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
SD="/dev/mmcblk0"
NVME="/dev/nvme0n1"
MOUNT_OPTS="nosuid,nodev,noatime,nodiratime"
MOUNTPOINT="/data/media"
if mount $NVME $MOUNTPOINT -o discard,$MOUNT_OPTS; then
echo "Mounted NVMe"
exit 0
else
echo "Failed to mount NVMe"
fi
if mount $SD $MOUNTPOINT -o $MOUNT_OPTS; then
echo "Mounted SD card"
else
echo "Failed to mount SD card"
fi