devel-su
mkdir /mnt/sd
mount /dev/mmcblk1p1 /mnt/sd
mkdir /mnt/sd/.home
chown nemo:nemo /mnt/sd/.home
mkdir /mnt/sd/.android
chmod 777 /mnt/sd/.android
rsync -a /home/nemo/ /mnt/sd/.home
rsync -a /data/sdcard/ /mnt/sd/.android
#!/bin/bash ACTION=$1 if [ "$ACTION" = "add" ]; then mount /dev/mmcblk1p1 /mnt/sd mount -o bind /mnt/sd/.home /home/nemo mount -o bind /mnt/sd/.android /data/sdcard else umount /data/sdcard umount /home/nemo umount /mnt/sd fi
cp mount-sd.custom.sh /usr/sbin/mount-sd.custom.sh chown root:root /usr/sbin/mount-sd.custom.sh chmod +x /usr/sbin/mount-sd.custom.sh
[Unit] Description=Handle custom sdcard After=local-fs.target RequiresMountsFor=/home [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/mount-sd.custom.sh add ExecStop=/usr/sbin/mount-sd.custom.sh remove [Install] WantedBy=multi-user.target
cp mount-custom.service /lib/systemd/system/mount-custom.service chown root:root /lib/systemd/system/mount-custom.service systemctl enable mount-custom.service
df -h
Filesystem Size Used Avail Use% Mounted on rootfs 14G 1.9G 12G 15% / /dev/mmcblk0p28 14G 1.9G 12G 15% / devtmpfs 406M 64K 406M 1% /dev tmpfs 407M 360K 406M 1% /dev/shm tmpfs 407M 28M 380M 7% /run tmpfs 407M 0 407M 0% /sys/fs/cgroup tmpfs 407M 20K 407M 1% /tmp /dev/mmcblk0p19 8.0M 4.1M 3.9M 52% /drm /dev/mmcblk0p9 48M 9.2M 39M 20% /var/systemlog /dev/mmcblk0p28 14G 1.9G 12G 15% /swap /dev/mmcblk0p28 14G 1.9G 12G 15% /home /dev/mmcblk0p25 8.0M 4.2M 3.8M 54% /persist /dev/mmcblk0p18 64M 45M 20M 70% /firmware tmpfs 407M 0 407M 0% /mnt/asec tmpfs 407M 0 407M 0% /mnt/obb /dev/mmcblk1p1 60G 8.3G 49G 15% /mnt/sd /dev/mmcblk1p1 60G 8.3G 49G 15% /home/nemo /dev/mmcblk1p1 60G 8.3G 49G 15% /data/sdcard /dev/mmcblk1p1 60G 8.3G 49G 15% /media/sdcard/4582345364s...