1

I want to increase the size of my root partition.

This is a screenshot of the gparted:

enter image description here

Gryu
  • 7,559
  • 9
  • 33
  • 52

2 Answers2

0
  • You should backup your important data first
  • Boot into windows and change locations of some folders such as Downloads, Documents, Music, Videos, Pictures, Desktop folders replacing C by D, so your C (/dev/sda2 partition) will become less used
  • Reduce C partition size from windows
  • Prepare Ubuntu installation USB flash drive and boot into it without installing (Try without Ubuntu installing option in previous Ubuntu releases 19.10-)
  • Run GParted
  • Do swapoff on linux-swap partition
  • Extend your Ubuntu's root partition size
  • Do swapon on linux-swap partition
  • Apply changes
  • Reboot

I've not tested it with GPT/EFI disks, so make sure you have backed up your important data or wait for more reliable answer or investigate it yourself

Gryu
  • 7,559
  • 9
  • 33
  • 52
0
  1. Backup anything you don't want to lose to an external drive, another PC, or the cloud
  2. Verify that backup matched the source files with checksums or some other method
  3. Repeat 1-2 using a different external drive or different PC or different cloud destination
  4. Boot from an Ubuntu LiveUSB
  5. In a terminal window, run swapoff to turn off swapping
  6. Open the Disks app (more) (and more)
  7. Delete the dedicated swap partition by clicking on it and pressing the - button. Swap partitions are passe unless, as per https://help.ubuntu.com/community/SwapFaq you have a special need for it. That link also discusses swap file sizing.
  8. Close Disks.
  9. Open Gparted. Remember, with it, you specify a change, then commit the change with the green checkmark enter image description here.
  10. Select the root partition. Expand it to use the open space where the swap partition was.
  11. Apply changes with that green checkmark.
  12. Exit from Gparted.
  13. Reboot into your Ubuntu on your internal drive.
  14. Add a swap file, with the size set as per https://help.ubuntu.com/community/SwapFaq with a command like sudo fallocate -l 4G /swapfile (here assuming a 4G swap file) (more).
  15. Alter its permissions with sudo chmod 600 /swapfile
  16. Make it a swap file with sudo mkswap /swapfile
  17. Turn on swap with sudo swapon /swapfile
  18. Make the change permanent with sudo nano /etc/fstab where you add a line in that /etc/fstab file /swapfile swap swap defaults 0 0 then save and exit from nano (more on nano) with Ctrl-S Ctrl-X
  19. Make sure the swap file is set up with sudo swapon --show
K7AAY
  • 17,202