Moving these posts to a new thread to isolate the discussion of mounts.
Either symlinks or bind mounts would work. I use a bind mount in /etc/fstab for my own SDcard, but if you do it, be sure to add the nofail option (my full list of options are auto,bind,nofail ) so that you won’t get stuck at boot if there isn’t an sd card present.
For instance this is how I ensure my Documents directory is stored on my SD card:
Repeat the second “bind” mount line for any other folders you want to bind mount into your home dir. The destination directory will need to exist.
@Kyle_Rankin I put in a beefy sd card of 128GB and mounted according to your instructions, just to realize I didn’t move the contents of my previous Documents folder to the sd card folder before mounting.
Do you keep the Documents folder etc. on the device and just empty them or what do you recommend?
EDIT: Just noticed that all of the mounts are write protected for the user purism, how can I change that?
df -h reports a total space of my 128G card as 117G, used as 24K and available as 111G, why isnt the total space available?
After rebooting and mounting the sd card, I have no write permissions.
Sorry for the noob questions about mounting and formatting, but I am trying to set m L5 up as a proper convergent device together with a laptop dock and for that I need a good amount of disk space on the device.
The difference in reported space and actual usable space could be the difference between “gigabytes” and “gibibytes” and disk manufacturers tend to use the metric that makes the disk seem larger.
The permissions are because when you mount a file system it is owned by root unless you pass extra options to fstab (or mount) to change that. What you will want to do is create directories within that mount point that are owned by your purism user:
Ok, if I start with mounting only /dev/sda, do I have to give it user permissions before I copy the folders over to it (I have a backup of all the folders from my first attempt)? Because I haven’t been able to copy anything to the sd card when not mounted to my /mnt.
Yes, if you create a folder within /mnt/sda1/ you will need to give it the user permissions you want it to have, because you are creating it initially as the root user, so initially it will be owned by the root user.
I’m not sure if this is the best place for this, but it seems there is some experience/expertise on this thread relevant to my goal/issue.
I have an SD card that I’d like to use for my /home partition, which I’ve been using for a little over week with some success, but I’ve noticed that sometimes the mount will flip to read-only. This either occurs over some period of time or on reboot. For example:
$ mount | grep home
/dev/mapper/home on /home type ext4 (rw,relatime)
And after some time:
$ mount | grep home
/dev/mapper/home on /home type ext4 (ro,relatime)
I know the rw is redundant with defaults, but wanted to be explicit about it. There is one partition on the card, which is luks and unlocked with a key file on boot. Any ideas on what might be going on here? I could see in the instance of reboot that maybe there is something happening out of time, but I find it really odd that the partition could flip from rw to ro while the phone is powered on.
If I can’t get this working, I’ll move to a solution suggested earlier in this thread by mounting the card under /media and then symlinking from the /home folder, but feel like this is not ideal.
Yeah? I took it out of my phone and plugged it into my laptop to run an fsck and it turned up no issues. Is there any way I can confirm that to be the issue before running out to buy another card? I just got this one and I think it worked for a short period before this issue started, but it was a fairly brief period, so it may have been luck. Would it be worth while to reformat and start from scratch? I’m only hesitant to do that because of the time involved.
What is the capacity of your current card? Surely you have some spare card to try, even if of lower capacity? (I would rather try a spare card than reformat the existing card.)
I hate to ask but there have been many reports of counterfeit cards (from well beyond the Purism ecosystem). Sometimes those cards have a data storage capacity that is much lower than the capacity that the card reports to the operating system (but of course they are sold at a price that is close to appropriate for the reported capacity)
So … are you comfortable that you bought from a reputable supplier and a reputable brand of card? Was the price unusually low?
I don’t know if it’s the same issue, but I will say that I randomly get an error where the Librem 5 stops being able to read the SD card. It happens the same time as another known issue where the modem suddenly stops working until a reboot is done. When I reboot to fix the modem it fixes the SD card read error too.
256 GB and no, unfortunately I don’t have another. It just doesn’t seem to be a storage medium I need that often.
Not exactly. I bought it from a store that seems a tiny bit sketchy, but other interactions have been fine with them. Also, when I asked them how much it costs, they asked me how much I want to pay, which has never happened to me before. It’s a SanDisk.
Are there any ways to confirm any of these scenarios? The disk utility shows size and brand as expected, though I don’t know how trustworthy those are.
Say what now? Yeah that sounds somewhat sketchy. I believe you need to confirm or eliminate as a possibility the scenario that the card is counterfeit.
Some counterfeit cards have modified firmware so as to pretend to be what you thought you were buying i.e. they lie to the operating system.
Fair enough. I have a fleet of Raspberry Pi devices, so I have spare uSD cards around for those anyway.
I guess the point is that if you go out and buy a legitimate small (<= 32 GB) uSD card, it won’t cost much money (a handful of dollars).
Good question. I don’t have a ready-made script to cover it - and the test that I would want to do is destructive (to the content of the file system) so you would need to save the directory tree from the card first (and reformat and restore the directory tree afterwards).
Then I would generate a random 4KiB block of data, write it to the highest 4KiB-aligned block on the card, read it back, compare what you wrote with what you read. If you can be bothered, repeat for a downward random succession of other similarly aligned blocks.
That isn’t exhaustive but if any such block either fails to write, fails to read or compares as different then the card is either faulty or counterfeit.
If anyone knows of a shell command that can conduct this sort of test automatically, please chime in!
Beware though; this software will destroy all the data on your card so make sure you make a backup of your data somewhere safe before running the tests.
Wow, this is wild, I had no idea this problem was prevalent enough to necessitate tools like this. I’ll give it a try some time, but for now I’ve resorted to buying another card from a different source since it’s not terribly expensive. It’s only been 24 hours, but I haven’t observed the same issue yet. I will report back once I have a chance to run the tests on the card or if the new one falters.