2

I recently made a small mistake as I was installing Arch and ended up with my partitions looking like this:

enter image description here

Basically, my Arch partition sda9 is stuck between my Windows partition and some sort of Windows recovery/diagnostic partitions. This has left me with only 80 MiB of space, and you can imagine the problems that's causing.

Is there an easy way to move my Arch partition to the unallocated space after sda8 (xubuntu)? I already tried using dd, but had no luck.

1 Answer 1

0

Create a new empty partition after /dev/sda8, make it the size that you want your Arch partition to be. Then do cat /dev/sda9 > /dev(the partition you just created) when in a root shell. (You can't just use sudo as it will make you root to run cat, but not to access the new partition.) You just duplicated your Arch partition, but now you need to expand the filesystem to the full size of the partition. You can either let gparted take care of this for you (I believe it will do it for you if you check the new filesystem), or just run sudo resize2fs /dev/(the new partition), and then check it to be on the safe side with sudo fsck /dev/(the new partition). You can now delete the original Arch partition. Just make sure to update your grub parameters if you didn't address the filesystem by UUID!

3
  • I'll try this once I get the chance. On a side note: why cat and not dd?
    – carreter
    Commented Aug 7, 2016 at 13:07
  • Also, what do you mean by "bash parameters"? This is my first time with Arch, so I haven't dug around much with lower-level config files before.
    – carreter
    Commented Aug 7, 2016 at 13:09
  • @palmerito0 dd is really old, for one, and it's just overkill for what you need to do. If you just need to clone a file, cat is by far the best option. The syntax is really simple (cat reads off a file and pipes in to standard output), and then you can just pipe it into a new file. Also, I'm sorry, I meant grub parameters, as in which filesystem the system boots from. Commented Aug 7, 2016 at 23:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .