2

So a couple of months ago I installed, on my computer, dual boot so I could have windows and ubuntu at the same time. I had some struggles because my PC is designed with UEFI support (Model: ASUS VivoBook S15). However I made it work, but I only had 6 Mb for my swap partition! Now my PC sometimes freezes for no reason, and I have to reboot. I think the problem is that partition. Does anyone know how I can extend my swap partition?

enter image description here

2
  • 3
    You can try to create a swapfile, activate it and add it to your /etc/fstab . Details here : linuxize.com/post/create-a-linux-swap-file – schaiba Oct 27 '19 at 12:57
  • 1
    If you want/need a partition as opposed to a file, then reside the root partition (you will have to use a live distro, MS can't do it, not without some 3rd party app, and you can't do it when it is online). – ctrl-alt-delor Oct 27 '19 at 20:11
1

Use sudo swapoff /dev/sda6 to stop using it for swapping, then you can resize/move/rearrange the swap partition any way you like.

If you resize the swap partition, or completely recreate it in a different location, you might have to run sudo mkswap /dev/sda<whatever> on it afterwards, unless GParted already does that for you. Then just edit your /etc/fstab if necessary (since the UUID of the swap partition will change on mkswap, or the device name may change if you recreate the swap partition elsewhere), and run sudo swapon -a to activate it again.

1
  • I would not try to resize it, there is Microsoft stuff in the way, and it is sure to break. – ctrl-alt-delor Oct 27 '19 at 20:10
0

Do you use Hibernation? Then you must have a swap partition equal in size to your RAM chip size.

If you don't, boot from Windows of a Linux Live USB and delete /dev/sda6 because 4MB is more trouble than it's worth.

Then. boot back into Linux and create a swap file in your root partition, because your system is guaranteed to be unstable without it. How much? See here.

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.