I have a dual boot machine with Windows 10 and Ubuntu 16.04 LTS.
I want to allocate my space to my home partition but I have to move my Linux Swap Partition.
How can I do it?
Here are my partitions before I shrink C volume in windows:
Partitions before C drive shrink:
Here it's my partition now with no allocate space:
No allocated partition:
2 Answers
Use swapoff to deactivate the swap partition.
Note that once deactivated, the swap partition can also simply be deleted (and removed from /etc/fstab), because it really just stores temporary data. Later you can create a new empty swap partition of the desired size and activate it again.
1The unallocated space that you have created follows partition /dev/nvme0n1p3which is the Windows partition.
I assume that you wish to resize /dev/nvme0n1p7 which is the Linux partition
of /.
To do that, you need to move the unallocated space to follow /dev/nvme0n1p7.
You can do that by moving left (up) the partitions of/dev/nvme0n1p6 (linux-swap) and /dev/nvme0n1p7 itself.
Once the unallocated space follows /dev/nvme0n1p7, then you may extend it over
this space.
As an error during such an operation can be disastrous, I suggest to take good backups before starting, even taking a backup image of the entire disk (if you have enough external disk space).