4

I have tried to sort my partitions to change the order, but when I try to use s command of gdisk, this warning appears:

You may need to edit /etc/fstab and/or your boot loader configuration!

And it doesn't let me use the command. What can I do to sort the partitions? (I can't use fdisk).

Thank you!

GAD3R
  • 3,900
fnicolas
  • 41
  • 1
  • 3

2 Answers2

7

Use the s command in gdisk.

The warning doesn't prevent you from using the command. It's just a warning. If you use s and then p, you'll probably find that the partitions are, indeed, sorted and ready to be written.

Note that the "Sort" command only does what it says – sorts the partition table entries in ascending order, to match the actual disk layout. It doesn't let you move the GPT entries manually (use "Expert" → "Transpose" for that), and it does not move the actual partition contents.

grawity
  • 501,077
2

Slightly easier, from the command prompt:

sgdisk --sort <device>

sgdisk is included in the gdisk package on CentOS 6 and 7