0

I am trying to expand the size of my root directory as I am running low on space. I have tried resizing it from a Live USB and it won't let me.

Screenshot of the partition manager from the LiveUSB

The text in red is the mounting point (according the partition manager) when booting from the drive. /dev/sdc5 mounts to /boot/efi and /dev/sdc6 mounts to /

fdisk -l /dev/sdc yields:

Disk /dev/sdc: 29.3 GiB, 31406948352 bytes, 61341696 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: 0x4e13a3a7

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sdc1           2048 15628287 15626240  7.5G  c W95 FAT32 (LBA)
/dev/sdc2       37490686 61339647 23848962 11.4G  5 Extended
/dev/sdc5  *    37490688 38539263  1048576  512M ef EFI (FAT-12/16/32)
/dev/sdc6       38541312 61339647 22798336 10.9G 83 Linux
  • Please add the output of fdisk -l /dev/sdc to your question. – Emmanuel Rosa Sep 22 '18 at 1:21
  • I guess the KDE Partition Manager is unable to resize an extended partition when it contains logical partitions. I recommend using GPT (GUID Partition Table) instead of the old MBR partition table. At least don't put the ESP (EFI System Partition) on a logical partition inside an extended partition, since that is not supported, or at least not portable. See the answer to this question. – Johan Myréen Sep 22 '18 at 4:44
  • @EmmanuelRosa done. – Husky2490 Sep 23 '18 at 20:07
  • @JohanMyréen would reinstalling be easier? – Husky2490 Sep 23 '18 at 20:08
0

You don't have any unallocated space after the extended partition into which you can resize it. You can either reinstall or if you want to take the arguably more fun approach, perform the following gymnastics:

  1. Create two primary partitions using the unallocated space: one will be your new ESP, which you can make 256MB (or even 128MB) and the other will be new your rootfs. Create them in that order.
  2. At this point you'll have two ESP's, so remove the original ESP to avoid any conflicts. Note that deleting the partition will not wipe out the data; The partition can be revived with the information I had you add to your post.
  3. Format the new partitions accordingly and copy your files over.
  4. Check the /etc/fstab in the new rootfs, and update it if needed.
  5. Boot from the USB drive to ensure everything is working.
  6. Delete the extended partition. You'll now have unallocated space after your rootfs partition.
  7. Resize the rootfs partition into the unallocated space. You'll need to boot from another system to do this.
  8. Resize the rootfs to grow into the now larger partition, using resize2fs.

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.