0

Following this answer, I formated my sdcard as ext4-fs.

Then tried mounting the sdcard into termux home as the link above says

mount /dev/block/mmcblk1p2 /data/data/com.termux/files/home/ext4-fs

I get error mount: bad /etc/fstab: No such file or directory

I could only mount the partition with root using su command, only then the mount command doesn't give error.

Mounting the partition with su from terminal or with app like Link2Sd (which also uses root) makes the mount point (i.e where the partition is mounted) unreadable for Termux.

What am I missing?

He (the author of the answer above) even went further to create a symlink to Termux $PREFIX using another terminal app which is impossible without root also as thus also not readable by Termux which even complicates everything

I think this should be possible, what am I doing wrong pls

2
  • 2
    That's expected. mount never works without root (or at least CAP_SYS_ADMIN to be more precise). Mounting a filesystem is a privileged action not meant to be performed by ordinary users. // You need to set proper permissions; owner, group, mode and SELinux context on the mount point to make it accessible to non-privileged apps like Termux. Run ls -lZ . in Termux HOME directory to get these parameters. – Irfan Latif Apr 8 at 17:37
  • Hi @Irfan thanks for looking to my question. Changing the owner, group to uid of Termux (gotten from id command) and also chmod 777 doesn't help. I get Permission denied. What's that with SELinux context, please any help will be appreciated – Mab Apr 8 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.