2

Because, of course, the obvious way to have a larger root partition is to resize and thereby expand it. Now my problem is that I have the root partition, the home partition, and some unallocated space in that exact order: GParted output of the disc
Now a probable solution is to back-up my /home partition, remove it, resize root, place /home back, and hope for the best. However, I am scared that this might break my installation as the new /home partition will have a different UUID and maybe other stuff I am not aware of.
Another solution I could think of would be to have multiple partitions which act as root, but apparently that is impossible.
Roughly the same question has been asked here, but the answer to that question is unsatisfactory to me as "yes" does not exactly describe how to do so (as well as 'bad stuff' being undefined).

So my question is: What is the best way to (effectively) enlarge my root partition, without losing my data in /home and/or breaking the system?

3 Answers 3

4

/usr and /var typically use up the most space in the root directory. if you have a lot of third party software, /opt may be quite large also.

It is possible to make partitions that mount to these directories in the same manner that /home mounts to the root directory.

That said, it is easier to boot from a live CD/USB and move the /home partition as in mentioned in the comments.

Of course, back up important data before doing either operation.

3

I'm assuming you're using your actual installation when running GParted which is why you can't move home.

If you instead boot with a live Ubuntu DVD/USB then you can easily move the Home partition to the end of the disk and then expand Root non-destructively.

From the picture you posted I don't believe you'll have any problems, but manipulating disk data is inherently dangerous so please back up anything you can't afford to lose before attempting it.

4
  • So if I'd move /home using GParted, all the data on the partition would be preserved? As far as I knew, data was stored in a certain address range so that when the partition moves, the data is still stored in the same location and therefore then outside of the partition. Sep 17, 2017 at 23:26
  • Moving/resizing partition is usually safe. You should have backups regardless. There's absolutely nothing else you need to know.
    – user692175
    Sep 17, 2017 at 23:39
  • 1
    Data are moved with the partition. In your case I'd increase the size of sdc2 (extended partition) first, because both partitions (/,/home) reside in the extended partition. moving or resizing a partition does not change the UUID of the partition.
    – mook765
    Sep 17, 2017 at 23:44
  • The data moves with the partition Simon so there's no danger of losing it because the partition location changes. However as I said there are other things that can go wrong when manipulating partitions so please back up your data just in case.
    – Mitch
    Sep 19, 2017 at 0:15
0

First you need to expand sdc2 into the free space, then you can move your home partition ( sdc6 ) to the right, then expand your root ( sdc5 ) into the free space. This requires that both the home and root partition be unmounted at the time, which means you need to boot from a livecd to do this. You should of course, make a backup first, since a power failure or other problem in the process will destroy your data.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .