I saw in https://unix.stackexchange.com/a/501410/ that gparted can move a partition in a disk.

Since gparted is said to be a frontend of parted, what is the corresponding command(s) using parted to move a partition anywhere? Sorry, I only know parted has resizepart which only changes the end of a position, instead of moving a whole partition.



parted used to be able to move partitions and resize (certain) file systems, but this feature was removed in version 3.0 because it was deemed to difficult to maintain.

  • Thanks. How would you move a partition, if you can only use parted now? If you can use something else, what would you use for moving a partition? – Tim Feb 22 '19 at 13:42
  • 2
    I would use gparted. I avoid partitions anyway, so I never need to move or resize partitions; I use LVM everywhere, and skip partitions entirely on non-bootable disks. – Stephen Kitt Feb 22 '19 at 13:46
  • " I use LVM everywhere, and skip partitions entirely on non-bootable disks". (1) Do you not use LVM on bootable disks? Why (2) Do you partition bootable disks? (3) Speaking of that, I'd appreciate if you could also consider unix.stackexchange.com/questions/502305/… – Tim Feb 22 '19 at 13:47
  • 1
    On bootable disks, I have whatever partitions are needed to boot the system (such as the ESP on EFI systems, or /boot on BIOS or U-boot systems), and one big partition occupying all the available space, which is used as a PV in LVM. On non-bootable disks, I use the entire disk as a PV, with no partitions at all. – Stephen Kitt Feb 22 '19 at 13:51
  • 1
    LVM provides the same level of protection as partitions or any other file system container: file system corruption is limited to a single file system, and one file system running out of free space doesn’t affect others. However any mounted file system is liable to be “messed up” by a program running amok. – Stephen Kitt Feb 22 '19 at 15:15

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.