Persistently mount SD card?
#1
I have Mobian installed on my eMMC and use a 128GB SD card to store my music collection. Unfortunately I've had troubles with various music players "losing" my music library after a while and having to re-scan or re-build it when I open the app after a few days (which can take quite a while). I believe I read somewhere that Mobian only mounts the SD card when it's needed, rather than keeping it persistently mounted, and I'm guessing this may be behind my problem.

I've read about the option to mount the SD card as an extended home directory in the tweaks section of the Mobian wiki, but I'm not sure I want to wipe my SD card and follow those directions just to see if this fixes my music problem. Does anyone know if there's a way to persistently mount an SD card without wiping it and setting it as the home directory? Or is this even something I'd want to do? Presumably there's a reason the card isn't persistently mounted in the "stock" Mobian installation. Any thoughts on the matter would be appreciated.
#2
(10-05-2020, 05:17 PM)DarkManiels Wrote: I have Mobian installed on my eMMC and use a 128GB SD card to store my music collection. Unfortunately I've had troubles with various music players "losing" my music library after a while and having to re-scan or re-build it when I open the app after a few days (which can take quite a while). I believe I read somewhere that Mobian only mounts the SD card when it's needed, rather than keeping it persistently mounted, and I'm guessing this may be behind my problem.

I've read about the option to mount the SD card as an extended home directory in the tweaks section of the Mobian wiki, but I'm not sure I want to wipe my SD card and follow those directions just to see if this fixes my music problem. Does anyone know if there's a way to persistently mount an SD card without wiping it and setting it as the home directory? Or is this even something I'd want to do? Presumably there's a reason the card isn't persistently mounted in the "stock" Mobian installation. Any thoughts on the matter would be appreciated.
/etc/fstab is the place where you can do this. I do it so, since I had the same problems you reported. I don't have the home directory mounted on the sd card, though there are certainly some benefits like being able to flash the image directly to the emmc and then installing the packages you need as a way to restore your system vs. backing up your whole emmc with jumpdrive and dd.
Code:
UUID=youruuid / ext4 defaults 0 0
UUID=youruuid /boot ext4 defaults 0 0
UUID=youruuid          /mnt/sdcard      exfat-fuse  defaults    0      0
Just as an example my fstab. blkid can give you the uuid of your SD card. Be careful, don't reboot until the output of mount -v -a is correct. If you can't figure it out, just delete the lines you added and ask for help.
#3
(10-06-2020, 04:00 AM)fernando_c_m Wrote:
(10-05-2020, 05:17 PM)DarkManiels Wrote: I have Mobian installed on my eMMC and use a 128GB SD card to store my music collection. Unfortunately I've had troubles with various music players "losing" my music library after a while and having to re-scan or re-build it when I open the app after a few days (which can take quite a while). I believe I read somewhere that Mobian only mounts the SD card when it's needed, rather than keeping it persistently mounted, and I'm guessing this may be behind my problem.

I've read about the option to mount the SD card as an extended home directory in the tweaks section of the Mobian wiki, but I'm not sure I want to wipe my SD card and follow those directions just to see if this fixes my music problem. Does anyone know if there's a way to persistently mount an SD card without wiping it and setting it as the home directory? Or is this even something I'd want to do? Presumably there's a reason the card isn't persistently mounted in the "stock" Mobian installation. Any thoughts on the matter would be appreciated.
/etc/fstab is the place where you can do this. I do it so, since I had the same problems you reported. I don't have the home directory mounted on the sd card, though there are certainly some benefits like being able to flash the image directly to the emmc and then installing the packages you need as a way to restore your system vs. backing up your whole emmc with jumpdrive and dd.
Code:
UUID=youruuid / ext4 defaults 0 0
UUID=youruuid /boot ext4 defaults 0 0
UUID=youruuid          /mnt/sdcard      exfat-fuse  defaults    0      0
Just as an example my fstab. blkid can give you the uuid of your SD card. Be careful, don't reboot until the output of mount -v -a is correct. If you can't figure it out, just delete the lines you added and ask for help.
Thank you, @fernando_c_m , and sorry for the late reply. This seems to have fixed my problem.
#4
um, I think I need help. I was able to follow the mobian tweaks up until finding out the UUID:

Now that you have Mobian installed on the eMMC and a fresh sdcard inserted, power on the phone and launch the terminal. First, mount the sdcard by running
Code:
sudo mkdir /mnt/sdcard && sudo mount -t ext4 /dev/mmcblk0p1 /mnt/sdcard
. Then, copy the current contents of /home to it with
Code:
sudo cp -aR /home/* /mnt/sdcard/
. Then, unmount it from the temporary mountpoint with
Code:
sudo umount /mnt/sdcard
, and mount it at /home with
Code:
sudo mount -t ext4 /dev/mmcblk0p1 /home
. Finally, we will need to acquire the UUID of the sdcard and add an entry to fstab. Run
Code:
sudo blkid /dev/mmcblk0p1
to get the UUID, and then copy just the UUID (it will look like 1f255d6ae-1634-2aa4-172cfa15) and edit /etc/fstab with vim or nano (or whatever). Copy the first line, and paste it at the bottom of the file as a new third line. Then replace the UUID with what you copied from the output of blkid, and change the / to /home, and finally change the final 0 to a 2 (this will tell fsck to check it after the other entries). It should look like this:
Code:
UUID=a2c1f977-0405-4ae1-8169-639b8ae53e3b    /home    ext4    defaults    0    2


Here's where I got confused. Can I just add the third line by typing in the UUID I got from sudo blkid /dev/mmcblk0p1?
At the moment, it looks like the sd card is there. My storage Usage has a "Storage 1(the size of my 32G sd card) with a Home folder having 581 MB,, and Storage 2 (my internal memory) with Operating system of 5.1GB. 
I should not leave it as is, but I'm confused as to what the portions after each UUID should look like.
Please help!
#5
(11-12-2020, 04:57 PM)HLing Wrote: um, I think I need help. I was able to follow the mobian tweaks up until finding out the UUID:

........

Here's where I got confused. Can I just add the third line by typing in the UUID I got from sudo blkid /dev/mmcblk0p1?
At the moment, it looks like the sd card is there. My storage Usage has a "Storage 1(the size of my 32G sd card) with a Home folder having 581 MB,, and Storage 2 (my internal memory) with Operating system of 5.1GB. 
I should not leave it as is, but I'm confused as to what the portions after each UUID should look like.
Please help!

It looks like you're following the directions from the wiki to mount an SD card as your home directory. I was looking for a way to persistently mount an SD card but keep my home directory on the eMMC, which is what @fernando_c_m helped me with. Sorry - I haven't tried those directions in the wiki, so I don't know how to answer your question. Hopefully someone else can help out, or you could ask as a separate question.
#6
(11-19-2020, 04:30 PM)DarkManiels Wrote:
(11-12-2020, 04:57 PM)HLing Wrote: um, I think I need help. I was able to follow the mobian tweaks up until finding out the UUID:

........

Here's where I got confused. Can I just add the third line by typing in the UUID I got from sudo blkid /dev/mmcblk0p1?
At the moment, it looks like the sd card is there. My storage Usage has a "Storage 1(the size of my 32G sd card) with a Home folder having 581 MB,, and Storage 2 (my internal memory) with Operating system of 5.1GB. 
I should not leave it as is, but I'm confused as to what the portions after each UUID should look like.
Please help!

It looks like you're following the directions from the wiki to mount an SD card as your home directory. I was looking for a way to persistently mount an SD card but keep my home directory on the eMMC, which is what @fernando_c_m helped me with. Sorry - I haven't tried those directions in the wiki, so I don't know how to answer your question. Hopefully someone else can help out, or you could ask as a separate question.

Thanks,  DarkManiels, for your reply.  I  misunderstood  then.  oops. My pinephone  is working fine  now. the 32G  card is   seen but not mounted. That's the good news.   The bad news is I messed up   my work desktop computer as a  result of carelessness  when I used Jumpdrive to  write  the fstab. (instead, the desktop fstab file got deleted, nothing  boots..


Possibly Related Threads…
Thread Author Replies Views Last Post
  APN settings not working with new operator SIM card user641 1 1,383 03-01-2023, 04:43 PM
Last Post: anonymous
  What does handle SD card automount? mdk 1 1,369 01-29-2023, 03:15 AM
Last Post: mdk
  New SD card won't auto-mount, will only mount as read-only 3x5co 3 2,333 07-16-2022, 02:28 PM
Last Post: dachalife
  Apps and SD Card biketool 2 2,349 03-06-2022, 09:47 AM
Last Post: biketool
  How to flash a µSD-Card with Balena Etcher walter1950 1 1,608 01-22-2022, 02:06 AM
Last Post: bcnaz
  How to insert a SIM-Card and/or a µSD-Card walter1950 0 1,152 01-21-2022, 02:46 PM
Last Post: walter1950
  When I set SD card as /home, PP can't complete boot nelstomlinson 4 3,505 12-27-2021, 03:06 PM
Last Post: nelstomlinson
  weird SIM card question RodneyMyers 4 5,521 10-16-2020, 01:47 PM
Last Post: ThrillGates
  Activating a sim card bcnaz 4 6,401 08-08-2020, 06:37 PM
Last Post: bcnaz
  Unable to mount exFAT file system jyc88 4 6,634 07-23-2020, 05:21 PM
Last Post: jyc88

Forum Jump:


Users browsing this thread: 1 Guest(s)