0

enter image description herewant to shrink home ie sda5 and expand root ie sda3

Device        Start       End   Sectors   Size Type
/dev/sda1      2048  20469759  20467712   9.8G Linux swap
/dev/sda2  20469760  28469247   7999488   3.8G BIOS boot
/dev/sda3  28469248  48939007  20469760   9.8G Linux filesystem
/dev/sda4  48939008  49133567    194560    95M EFI System
/dev/sda5  49133568 976771071 927637504 442.3G Linux filesystem

New partition

Device Start End Sectors Size Type /dev/sda1 2048 20469759 20467712 9.8G Linux swap /dev/sda2 20469760 28469247 7999488 3.8G BIOS boot /dev/sda3 28469248 79622143 51152896 24.4G Linux filesystem /dev/sda4 79622144 80670719 1048576 512M EFI System /dev/sda5 80670720 976773119 896102400 427.3G Linux filesystem

  • While you're in gparted, try cleaning up your partition order. You've got swap first? Typically partitioning should be boot, root, home then swap. The simplest method is often the best method. – user857648 Aug 10 '18 at 19:05
  • @beertempest: How is your way "simplest"? Why is your partition order "the best method"? You're making stuff up. – waltinator Aug 10 '18 at 23:27
  • It's not "my" partition order. It's the typical order for partitioning fresh installs. Do some research before you accuse people of something. – user857648 Aug 11 '18 at 18:59
  • @beertempest I thought swap was usually after boot? – George Udosen Aug 13 '18 at 2:36
  • @GeorgeUdosen Swap is not being accessed as much as the root or home partitions during regular use so to speed read/write times up between root and home a bit it's better off last in the order. – user857648 Aug 13 '18 at 22:18
1

Yes, you can do this, but it's a little more complicated.

You MUST boot from some other medium (Live USB, Live CD, network boot from your local network, ...) and run gparted. /dev/sda? MUST NOT be mounted during this process. You should have reliable power, and not be running on battery.

"Free Space" (which you will create by shrinking /dev/sda5) can only be added to adjacent partitions, so you will have to move partitions around.

All of this is from within gparted:

Select /dev/sda5.

Menu->Partition->Move/Resize will bring up a window like thisexample of gparted resize/move

When you set the new partition size, be sure to have all of your free space in Free space preceeding.

This will create Free space between /dev/sda4 and /dev/sda5.

Select /dev/sda4 and Menu->Partition->Move/Resize.

Then, move /dev/sda4 to the other side of the "Free space" by clicking on the up-arrow in "Free space preceeding".

Finally, select /dev/sda3, Menu->Partition->Move/Resize and adjust the "New size".

Examine the list of pending operations, double-checking for misexpressed intent. Fix as needed. When there's a match between what you want to do and what gparted is going to do, click the checkmark and stand back.

  • thanks. but after resizing i'm unable to boot i'm pasting new partition image plz help – Shailey999 Aug 12 '18 at 12:39
1

You sure can. Download gparted. Boot off that and you can resize the partitions. When your done resizing and have applied your changes, boot into your linux kernel. Gparted only resizes physical volumes, so you'll then have to resize the logical volume and the file system. See examples below.

  • Extend the volume in LVS: lvextend -l 100%FREE /dev/vg1/root
  • Resize Filesystem: resize2fs /dev/sda5
0

Yes, it is possible. You could boot your computer with a live medium that has a partition manager and use it to resize your partitions. Trying to do so after booting your system is usually not possible.

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.