When I set up arch linux, I created a partition with fdisk, and ran mkfs.ext4 on /dev/sda.

Now, I want to partition /dev/sda to have 2 partitions, instead of just one. The problem is, that when I try to resize /dev/sda, it shows that the unallocated space is in the partition, and I cannot create a new partition.

image of setup in gparted

  • 2
    It seems technically it's not a partition. You have a filesystem on the entire device. – Kamil Maciorowski Jan 18 at 17:45
  • @KamilMaciorowski Yup, that's my problem. – skiilaa Jan 18 at 17:45

To convert a volume without a partition table to one with a partition table one can copy the data elsewhere than back again after the format, or perform the operation in place;

  • shrink the file system to start at 1GB and end 1GB before the end.
  • note down the exact start/end locations.
  • write a new partition table (will look like the data is lost)
  • create a partition around the noted locations.

you may want to do this on a test volume before trying it with important data so you know how to do it correctly.

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.