0
I have a Debian 9 system which is installed on a single storage device.
The size of the device is a bit less than 4 GB, and there is a single partition, onto which the debian image has been written.
I cannot remove this device. It is part of an embedded system and is permanently attached.
However, I can add an SD card to the system, as a spare slot is provided for user expansion if a larger FS is required.
My intention is to create a single partition on an SD card, probably a 16 GB one.
I would like to know what directories is it safe to move to the SD card? And how can I do this?
For example, many Linux systems move the /home folder to a separate physical device or a seperate partition.
So I know I can create a /home directory on the root of the SD filesystem. What I don't know how to do is how to tell the Debian system that /home has moved? Presumably I need to copy all the contents of /home on the original file system to the new SD card before telling Debian that it has moved?
I am guessing that I can also move /tmp and /var folders.
Is there anything else that I can safely move? I presume I should not move /bin, /sbin or /root under any circumstances?
I have worked with systems like this before, where /home is on a different disk, but I have never had to move it after an installation was finished.
I also didn't know what keywords I should be searching for to find this information - so sorry if it seems like a bit of an amature request. Thanks
1https://www.tecmint.com/move-home-directory-to-new-partition-disk-in-linux/ – None – 2019-06-07T17:01:22.947
@GabrielaGarcia Thanks, that answers one of my questions – user3728501 – 2019-06-07T17:19:38.383
@GabrielaGarcia If you want to add that link as an answer I'll upvote you since 2 others seem to have posted answers, neither of which are as good as the information contained in that article – user3728501 – 2019-06-07T19:09:58.737
Have you also done general clean up? IE, remove old kernels, run
apt-get clean
etc ? – ivanivan – 2019-06-07T19:18:15.067@ivanivan yes - there isn't anything I'm aware of on the system that we can delete either – user3728501 – 2019-06-07T19:28:54.517
@ivanivan Perhaps I should have included in my question "are there any directories we can move which will likely get us back a few hundred megabytes minimum?" - our home folder is pretty much empty except for a few basic user config files – user3728501 – 2019-06-07T19:30:20.230