I boot ubports from the eMMC (preinstalled) and added a micro-sd to the system. If I mount the card manually, I get at least "read" access to the card. But there is no auto-mount happening of the sd-card. Does anyone have any suggestions to automatically mount the card and be able to write to it?
I just wrote a bash script to mount my sdcard to ~/sdcard. it's a slight nuisance, but at least it's very simple
you mount it with the user as the owner.
echo $UID
will give you the user's ID. for me it was 32011
sudo umount /media/sdcard
sudo mkdir /media/sdcard
sudo mount -U 1A11-CBE8 /media/sdcard -o uid=32011
to get the UUID of the sdcard, check /dev/disk/by-uuid/ and it should be an identifier in the form of ####-####
07-20-2020, 03:24 AM
(This post was last modified: 07-21-2020, 03:18 AM by doelf.
Edit Reason: the preview generated additional breaks after each line of text
)
To automount the SD card you will have to edit /lib/init/fstab since /etc/fstab is regenerated at every boot.
Step by step:
1) Create a new directory for mounting the SD card. I've put it in my home directory:
mkdir SD
2) get the device name of your SD card by calling:
lsblk
It will be something like mmcblk0
3) check the file system of the SD card:
grep "^device /dev/" /proc/self/mountstats
If formated by ubuntu touch it should be VFAT.
4) make the system writable:
sudo mount -o rw,remount /
5) get root privileges:
sudo su
6) edit /lib/init/fstab by calling:
nano /etc/fstab
7) You'll have to set the keyboard to nano's hotkeys using the menu on the left.
Otherwise you won't be able to save and exit. Add the following line right at the end:
/dev/mmcblk0 /home/phablet/SD vfat rw,auto,user,umask=0000 0 0
You will have to change the mount-directory, device name and filesystem according to what you found out in steps 1), 2) and 3)!
8) Restart your phone.
Please remember: When your phone is updated to a new release, you will have to apply this change again!
07-24-2020, 05:10 PM
(This post was last modified: 07-24-2020, 05:10 PM by hiimtye.)
this is the method that I used:
1. install udiskie
sudo pacman -Syu udiskie
2. add udiskie to autorun
<varies by choice of desktop>
3. create a symlink to /run/media/yourUsername as a quick shortcut in your home folder to any inserted sdcards
ln -s /run/media/yourUsername $HOME/sdcard
et voila! no matter what sd card you insert, and no matter what updates you perform, it will still mount your sdcards to the sdcards folder in your home folder.
08-16-2020, 05:40 AM
(This post was last modified: 08-16-2020, 05:46 AM by FOSSagent0.
Edit Reason: Added another question
)
There is a new Ubuntu touch image ( Aug 13, 2020 #73) that was released did this fix the problem? What file systems does it not work with at the moment?