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