Partition howto

I have a very simple task, which could go horribly wrong if I do not get advice first.

I have an SSD and a hard drive. The SSD contains my /boot and / partitions, but all the volatile stuff (/home, /var and swap) is on my hard drive - although I have just realised that the SSD also has my /etc folder on it.

So I would like to move the /etc folder to my hard drive. Bearing in mind my / partition is on the SSD, what’s the easiest and safest way to do this? Can it be done without resizing an existing hard drive partition and creating a new one for /etc?

TIA, but forgive me if I am overlooking something blindingly obvious.

/etc is not that volatile. /tmp would be better also /var/cache.

Basic procedure would be to create a partition on the HD and set it to mount at the point you want. (/etc f that is really what you want.) And then from a live DVD or any live Linux rename /etc on (/etcold maybe) SSD and copy contents to the new HD partition. Now boot to the SSD and the new partition should be mounted and used. If all is well you can get ride of the renamed /etcold

Note if you don’t have space on the HD for a new partition you will have to make space. And any time you fool with partitioning back up any important stuff.

Thanks.I was hoping to avoid creating a partition just for lil ol’ /etc because it will inevitably waste some space, but WTH :slight_smile:

Apart from /etc, all my volatile data (including /tmp /var etc) is already on the hard drive, and only system and apps on the SSD.

On 2013-11-21 20:36, haughtonomous wrote:

> So I would like to move the /etc folder to my hard drive.

AFAIK, “/etc” is unmovable.
And if it were movable, you need fast access to it or you lose the
advantage.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Well, I’ve successfully created some space on my hdd for the small new partition (50MB), and copied the /etc contents to it, and I can manually mount it, but I wondering how it gets mounted at boot time if the /etc/fstab file is now on as yet the unmounted partition? If I amend the /etc/fstab file to automount the new partition as /etc, will it work?

Would that be because /etc/fstab needs to be available in order that the partition can be mounted at /etc? (ie a circular problem?)

You can mount it and it will overrule the one on the SSD but the one on he SD will still exist and in order to rename it you have to boot from a live and do it from there since /etc files are actively used in the OS. Like changing a tire while driving.

Also since files in /etc really does not change that much during a session but are read a lot I don’t see the point.

On 2013-11-22 17:36, haughtonomous wrote:

> Well, I’ve successfully created some space on my hdd for the small new
> partition (50MB), and copied the /etc contents to it, and I can manually
> mount it, but I wondering how it gets mounted at boot time if the
> /etc/fstab file is now on as yet the unmounted partition? If I amend the
> /etc/fstab file to automount the new partition as /etc, will it work?

Please do not continue, you will break your system. "/etc/ has to be in
root, it is mandatory.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-11-22 17:46, haughtonomous wrote:

> Would that be because /etc/fstab needs to be available in order that the
> partition can be mounted at /etc? (ie a circular problem?)

The start up scripts themselves are in /etc. How do you run them before
mounting /etc?

There is a list of directories in “/” that can not be moved to a
different partition. You can find the list in the opensuse.doc book.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Well it looks like there wasn’t much point and I have been warned off doing it anyway. My thought was to put all volatile data on the hard drive and only non-volatile (ie system and apps) on the SSD. Perhaps I am too cautious about the durability of SSDs.

Thanks for all contributions to this thread - even in the end if I haven’t done anything, I have at least learned new stuff.