-3

Please leave the two posts open, until you can write a good answer to cover both.

The layout of my current disk is:

enter image description here

In gparted, when I select a partition, and click "Partition->resize/move", is it correct that I can only move the partition if there is unallocated region immediately behind or before it? For example, is it correct that I can move sda4 anywhere into the 93G unallocated region, but I can't move sda3 at all?

If yes, does that imply that the relative order between partitions can't be changed?

What is the command which gparted uses to perform partition moving?

marked as duplicate by Stephen Harris, Rui F Ribeiro, pLumo, Haxiel, jimmij Feb 28 at 9:25

This question was marked as an exact duplicate of an existing question.

  • 2
    You can get the answer but the knowledge you've got, just do thinking. If you want to move the partition, which part of data you need to write? Based on your knowledge about partition table. – 炸鱼薯条德里克 Feb 27 at 15:18
  • @炸鱼薯条德里克 I am not sure. Could you explain specifically to my questions? Thanks. – Tim Feb 27 at 15:20
  • 1
    Remember as less rules as you can, and think as more as you can. I've marked this as duplicate. – 炸鱼薯条德里克 Feb 27 at 15:22
2

gparted does indeed only consider moving partitions inside the space currently occupied by the partition and any free space before and after it. So you can’t move sda3 yet; but you can move sda4, and if you do, you’ll be able to move sda3 using the freed space between sda4 and sda3. (Assuming the other constraints on moving partitions are met: you can’t move a partition containing a mounted file system, and the file system must be clean.)

This does imply that the relative order between partitions can’t be changed. However, gparted can copy partitions and delete them, which produces the same end result.

In most cases, gparted uses its own implementation to move partitions. For partitions containing ext2/3/4 file systems or Linux swap, it will however use e2image (if available) and mkswap respectively. The “File System Support” entry in the “View” menu will show you what features are supported given the currently installed tools, and list the tools gparted needs:

enter image description here

  • @Tim As your filesystems are supported, go with gparted. Right click on the partition and choose your action. I guess deleting is always possible with gparted as long as the partition table is not corrupted. Other actions depend on the supported fs types and installed tools. Click on "View -> File System Support" for a list of all supported actions (move, copy, shrink, etc.). – Freddy Feb 28 at 8:39

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