Setting up a SD card as /home(?)

Hi, I’m sure that the answer is out there somewhere, unfortunately, I lack the proper search terms to know how to express exactly what I’m trying to do. I apologize if this is a fairly easy questions.

I’m a brand new Manjaro XFCE user, with little Linux experience, One of my laptop is small and lacks power (I mostly use it to browse and write) Obviously, it didn’t worked too great with Windows 10, worse than that, it came with a 32Go partition and Win took more than 60% of it, while also requiring frequent updates and constantly complaining about not having enough space for it. My short term solution was just to add a 64Go SD card for it, but I decided to switch to Manjaro on the advice of a friend, so far I’m really liking it.

The one thing I’m having a hard time understanding, is how partitions and disk hierarchies fonction. For example, I’d like to set up my SD card as an extention of my main drive, and make sure that by default, programs and files are downloaded / installed on it.

I don’t need a step-by-step answer, but if one of you could point me towards the right terms / guides, it would be appreciated.

Hi @Naberius, and welcome!

I get the feeling you’d benefit greatly from the following:

Bear in mind that SD cards have a very limited amount of reads/writes it can do. So, using it where there’s going to be a lot of read/write activity is not really recommended. Although, I suspect everyone’s aware some things just can’t be helped.

However, there are steps you can take to maximise the SD card’s lifetime:

https://archlinuxarm.org/forum/viewtopic.php?f=31&t=8950

https://archlinuxarm.org/forum/viewtopic.php?f=31&t=9929

https://raspberrypi.stackexchange.com/questions/169/how-can-i-extend-the-life-of-my-sd-card

Hope this helps!

3 Likes

Thanks! I’ll give this a read tonight and see if I can manage to deal with my stuff.
I’m not planning to do a lot of Read/write activities anyway, I’d rather make sure that my 26Go “main” drive keeps as much space as possible for the few things that might require more.

Thank you again!

1 Like

It would require that you mount the entire /usr tree to your SDCARD - there is no way that will work well for you.

Yeah, that’s what I’ve read so far, I’ll still look into it a bit more. I could set it as “nofail” as I understand, but I can understand that it would lead to some issues…

Is there really no way to specify onto which partition I want a specific program to be installed?

Not AFAIK.

Or, now that I think about it, not easily. I think.

No - there is not.

Applications installed from the repos - follow a specific packaging pattern which cannot be changed.


Some applications are self-contained and can be run from a folder using the apps startup script.

Jetbrains tools are examples of self contained applications - appimages is yet another approach where everything is stored in one file.

It’s unfortunately a tiny (cheap) laptop : switching its drive is not going to be an option (while screwing it back together, the screw dug into the plastic and are now slightly protruding)

My option seems to be to mount my SD card under /home, (nofail) and use it to store everything but programs and simply do my best to not use more than 20Go of programs? I still have a guide to read, I’ll dig into this later.

Thanks again!

Would seem that is your best bet, yes.

My system partition (“root”) for Manjaro KDE is 16 GB. It contains everything except /home/. I still have plenty of comfortable breathing room to spare. I’ve also installed a good number of applications, and even have a 2GB swap file that sits on this partition. It is formatted as XFS.

The only caveat is I configured Timeshift to save backups to an external USB (rather than the default inside the system partition). Otherwise, 16 GB total would be cutting it very close not work at all.

So I think you’ll be fine to reserve the 32 GB internal drive for your entire system, including application installations, packages, cache, and updates, and even Timeshift backups. (Which is the default setup.)

This minimizes the complexity of using more advanced workarounds.


Now you can use the 64 GB SD card as your sole /home partition. This will hold all of your user data, downloads, configs, media, etc.


Might be better to go with the simpler solution, rather than get funky and make future maintenance more complex and frustrating.


FOR YOUR INFO: SD cards are not reliable data storage media. Consider everything you save to it “at risk”. Make sure you have recent and frequents backups of your personal data. I’m assuming this isn’t your “main” computer, and thus everything stored on it is “secondary”; whereas your important files live on more reliable storage.

nahh
nofail just means
nothing would hang or fail
if the mount of that particular directory/drive/network share failed for some reason
But that cannot happen if it is as essential as /usr.
If that mount fails
nothing will work.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.