PINE64
Automount SD card - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: UBPorts on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=125)
+---- Thread: Automount SD card (/showthread.php?tid=10349)



Automount SD card - MasterGreenbolt - 06-19-2020

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?


RE: Automount SD card - kop316 - 06-26-2020

(06-19-2020, 06:45 PM)MasterGreenbolt Wrote: 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 am trying to figure that out now too.

https://forums.ubports.com/topic/4457/pinephone-sd-card-not-mounting/6

It appears to be a known issue.


RE: Automount SD card - hiimtye - 07-06-2020

I just wrote a bash script to mount my sdcard to ~/sdcard. it's a slight nuisance, but at least it's very simple


RE: Automount SD card - mercrapper - 07-09-2020

(07-06-2020, 06:12 PM)hiimtye Wrote: I just wrote a bash script to mount my sdcard to ~/sdcard. it's a slight nuisance, but at least it's very simple

How did you mount it as writeable?


RE: Automount SD card - hiimtye - 07-10-2020

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 ####-####


RE: Automount SD card - doelf - 07-20-2020

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!


RE: Automount SD card - hiimtye - 07-24-2020

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.


RE: Automount SD card - FOSSagent0 - 08-16-2020

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?