I am trying to delete my linux-swap partition /dev/sda5 and allocate the free space to /dev/sda6.
But when i try to delete sda5 GParted gives an error "You have to umount sda6". But i can not umount sda6. I gives me the error "umount: /: target is busy" If i reduce the size of sda5 i can not allocate the unallocated space to sda6.
Can anyone give me some advice on how to do this the right way?
I have a multi-boot system with windows and Linux. (Grub2)
/
, and extended the filesystem with little impact.parted /dev/sda unit s print
. If the start/end sector range of your swap partition is not AFTER the start/end range of your/
partition, abort this procedure. Otherwise make a note of the end sector of the swap partition. Next, turn off your swap partition withswapoff -a
. Next, edit/etc/fstab
and remove the entry for your swap partition...parted /dev/sda rm 5
Removing that partition will likely change the partition number for/
, so runlsblk
to get the correct partition number for/
. Next, resize the/
partition withparted /dev/sda unit s resizepart ROOT_PART_NUMBER_HERE LAST_SECTOR_HERE
. Finally, you can grow the filesystem online withresize2fs /dev/sdaROOT_PART_NUMBER_HERE
...