0

So I know the deal about booting a liveCD and doing everything from there but here is the problem:

partitions

As you can see i have 2 partitions the home and the /. So, i want to take 300Gb from the windows partition and grow the / and the /home partitions. Will the / data interfere with the resize of the /home partition backwards? If so, how can i fix this?

I know there is a way to move the swap partition, so before I resize I will move the swap partition to the end of the /home partition

  • 1
    If you delete swap & create a new one after /home you will also have to edit fstab with new UUID. You need to have good backups, which you should already have. But will have to move / to left & then move /home left & then expand right. Do each separately as the more data you have the longer it can take. Any interruption will totally corrupt your data. An alternative is just to make another 300GB data partition. If you want to share with Windows use NTFS, or if ext4 be sure to set ownership & permissions. – oldfred Sep 6 '17 at 18:13
  • so just to be sure, 1- backup, 2- change the swap, 3- resize the windows partition, 4-move the /to the left and make it grow, 5-move the /home to the left and resize it, 6-profit? – martor Sep 6 '17 at 20:43
  • Not sure about the profit? But yes. Only use Windows tools to resize Windows & immediately reboot Windows so it can run chkdsk which is required after any resize. – oldfred Sep 6 '17 at 20:50
1

You must do it in stages:

  1. Back up all your important data! The sort of operations you're suggesting carry a small risk of catastrophic damage to your data. Thus, although the risk is small, the consequences should you encounter problems are big enough that you should not fail to back up your data!
  2. Shrink /dev/sda3 from the end, leaving a gap between it and /dev/sda6.
  3. Move /dev/sda6 (the swap partition) to the left, thus moving the gap between it and /dev/sda7.
  4. Move and resize /dev/sda7 (your / partition) so that there's no gap between it and /dev/sda6 and so that it's the desired size. Behind the scenes, this is actually two operations, but GParted lets you enter it as one.
  5. Move and resize /dev/sda8 (your /home partition) so that it fills the remaining freed space. Again, this is actually two operations, but it can be done as one in GParted.

There are, of course, variants on this procedure. You suggested deleting and re-creating your swap partition, for instance, which is a possibility, but it's likely to be easier to move it.

Note that any operation that involves moving the start of a partition (as in steps 4 and 5, and to a lesser extent even 3) is both risky and time-consuming. Depending on your needs, you might instead consider shrinking your Windows partition and creating a new partition in the freed space. You could then mount the new partition someplace convenient. This will be much faster and safer than moving two data partitions and one swap partition, but the end result will be less convenient.

If you do this sort of thing often, you should look into Logical Volume Management (LVM), which is a way of managing filesystems that's much more flexible than conventional partitions. (In practice, LVM is usually, but not always, implemented on top of conventional partitions.) Converting an existing installation to use LVM is difficult, and LVM has its own learning curve, so switching from what you've got now to LVM is likely to take more effort than your one round of move/resize operations; but you might look into it for future installations, or even to convert now if you expect to be doing more of this sort of thing with your current installation.

  • so I made it work with the comment from oldfred, this answer is also correct so I'll mark it as the answered. Thanks – martor Sep 8 '17 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.