0

So I've decided to dual boot Windows and Arch Linux on my SSD, allocating 8GB for the latter. What ended up happening is that 8GB was clearly not enough, and now I've resized the Windows partition, freeing up 2GB to expand Linux. The problem is that I have no idea how to expand my Linux partition, since the free space starts before the Arch (/dev/sda4) partition, and so I'd like to know if it is even possible to perform the expansion, and if not, know if there's anything I could do at all. Here's a screenshot of cfdisk, and here's the output of sudo fdisk -l /dev/sda (which doesn't seem to show the free space, I'm not sure why):

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x64936636

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048   1026047   1024000   500M  7 HPFS/NTFS/exFAT
/dev/sda2         1026048 211715424 210689377 100.5G  7 HPFS/NTFS/exFAT
/dev/sda3       232689664 234436607   1746944   853M 27 Hidden NTFS WinRE
/dev/sda4       215912448 232689663  16777216     8G 83 Linux

Partition table entries are not in disk order.
1

If /dev/sda4 is used as your Linux root filesystem, this is a type of manipulation you cannot do while the Linux system is running. You'll need a bootable partition management utility, like PartedMagic. or GParted Live.

You'll need to first move the Linux partition backwards on the disk so that it's starting point moves to the start of the free area, and then expand it at the tail end. It is possible that PartedMagic might present them as a single resizing operation, but fundamentally it will take two steps.

  • If you search for "GParted resize linux", there are tons of videos and tutorials on how to do this - gparted.org/…. – slm Jul 18 '18 at 11:15
  • next time you may consider using LVM based install for your linux. With lvm you actually can do that kind of manipulation online even without reboot. – goteguru Jul 18 '18 at 11:34

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.