View Single Post
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#27
Originally Posted by meemorph View Post
1. If I create an ambience from a picture on the sd-card, this ambience is gone after reboot. Thats why I think, the mount-sd.sh is executed too late. If I copy the picture to the picture folder (tempfs) and create the ambience, it is persistent. You should try, If an ambience if persistent with your conf.
Hm, that's interesting: now i have this problem too. I never had it, when using my own mountpoint (/mnt/sdcard2). Just tried it again with own mountpoint and the problem is gone again...
are there important reasons not to use an own mountpoint?

Originally Posted by meemorph View Post
2. I advise to use the .android subdirectory for the /data/sdcard rebind, like you did in your script. Because: I did an uninstall of the android support an all android apps. Then I did a new install of the android support. After that the /data/sdcard folder was *completly* empty. The android support deleted the hole folder, I think. I had some pictures before uninstalling and installing the androis support in that folder, but everything was gone, not only the folders of the android apps. If someone binds the root of the sdcard to /data/sdcard, do not uninstall and install android support, before you have a backup.
that's good to know!


Edit: it totally seems like the mount-sd.sh is called twice during bootup process.
One time at an early stage, where the ambiance stuff works (but default mountpoint is not ready).
And one time later, where the default mountpoint is ready, but it's too late for the ambiance stuff.

When i add these lines at the end of the file
Code:
if [ "$ACTION" = "add" ]; then
    mount /dev/mmcblk1p1 /mnt/sdcard2
    mount -o bind /mnt/sdcard2/.home /home/nemo
    mount -o bind /mnt/sdcard2/.android /data/sdcard
else
  umount /data/sdcard
  umount /home/nemo
  umount /mnt/sdcard2
fi
my df output looks like this:
Code:
[nemo@localhost ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 14G  4.1G  9.2G  31% /
/dev/mmcblk0p28        14G  4.1G  9.2G  31% /
devtmpfs              406M   64K  406M   1% /dev
tmpfs                 407M  268K  406M   1% /dev/shm
tmpfs                 407M   23M  384M   6% /run
tmpfs                 407M     0  407M   0% /sys/fs/cgroup
tmpfs                 407M   24K  407M   1% /tmp
/dev/mmcblk0p25       8.0M  4.2M  3.8M  54% /persist
/dev/mmcblk0p19       8.0M  4.1M  3.9M  52% /drm
/dev/mmcblk0p18        64M   45M   20M  70% /firmware
/dev/mmcblk0p28        14G  4.1G  9.2G  31% /swap
/dev/mmcblk0p28        14G  4.1G  9.2G  31% /home
/dev/mmcblk0p9         48M  7.5M   40M  16% /var/systemlog
/dev/mmcblk1p1         60G  2.6G   54G   5% /mnt/sdcard2
/dev/mmcblk1p1         60G  2.6G   54G   5% /home/nemo
/dev/mmcblk1p1         60G  2.6G   54G   5% /data/sdcard
tmpfs                 407M     0  407M   0% /mnt/asec
tmpfs                 407M     0  407M   0% /mnt/obb
/dev/mmcblk1p1         60G  2.6G   54G   5% /run/user/100000/media/sdcard
/dev/mmcblk1p1         60G  2.6G   54G   5% /home/nemo
/dev/mmcblk1p1         60G  2.6G   54G   5% /data/sdcard
Now i added a condition:
Code:
if [ "$ACTION" = "add" ]; then
  if [ $(mount | grep -c /mnt/sdcard2) != 1 ]; then
    mount /dev/mmcblk1p1 /mnt/sdcard2
    mount -o bind /mnt/sdcard2/.home /home/nemo
    mount -o bind /mnt/sdcard2/.android /data/sdcard
  fi
else
  umount /data/sdcard
  umount /home/nemo
  umount /mnt/sdcard2
fi
and the output looks like this:
Code:
[nemo@localhost ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 14G  4.1G  9.2G  31% /
/dev/mmcblk0p28        14G  4.1G  9.2G  31% /
devtmpfs              406M   64K  406M   1% /dev
tmpfs                 407M  204K  406M   1% /dev/shm
tmpfs                 407M   33M  374M   9% /run
tmpfs                 407M     0  407M   0% /sys/fs/cgroup
tmpfs                 407M  8.0K  407M   1% /tmp
/dev/mmcblk0p19       8.0M  4.1M  3.9M  52% /drm
/dev/mmcblk0p25       8.0M  4.2M  3.8M  54% /persist
/dev/mmcblk0p9         48M  6.6M   41M  14% /var/systemlog
/dev/mmcblk0p18        64M   45M   20M  70% /firmware
/dev/mmcblk0p28        14G  4.1G  9.2G  31% /swap
/dev/mmcblk0p28        14G  4.1G  9.2G  31% /home
/dev/mmcblk1p1         60G  2.7G   54G   5% /mnt/sdcard2
/dev/mmcblk1p1         60G  2.7G   54G   5% /home/nemo
/dev/mmcblk1p1         60G  2.7G   54G   5% /data/sdcard
tmpfs                 407M     0  407M   0% /mnt/asec
tmpfs                 407M     0  407M   0% /mnt/obb
/dev/mmcblk1p1         60G  2.7G   54G   5% /run/user/100000/media/sdcard

Last edited by Leinad; 2014-01-25 at 12:29.
 

The Following User Says Thank You to Leinad For This Useful Post: