Add swap file to Xubuntu system missing swap partition?

Asked by Harold Heinbaugh

I manually partitioned my Xubuntu desktop and did a clean install without a swap partition. Do I have to blank the drive and redo the partitions and reinstall OS? Or, is there a way to reduce the size of the large partition and add a Swap partition? gparted will not allow me to shrink the large ext4 partition eventhoughugh the size/move screen appears the attempt to reduce the size does not respond.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You can use a swap file instead if you wish. bit easier.

Revision history for this message
Harold Heinbaugh (hheinbaugh2) said :
#2

Cannot reduce lv partion to allow for swap partition.

Revision history for this message
Thomas Krüger (thkrueger) said :
#3

At first: on most systems today with 4GB RAM and more there is no need for a swap partition. Except, of cause, you are doign very RAM intensive things.

Also there is the option to create a swap file instead of a partition.
Details: https://help.ubuntu.com/community/SwapFaq

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#4

You must boot from a live media of Ubuntu (Xubuntu) such as CD/DVD/USB and then use gparted from there. The root partition must be unmounted so gparted can shrink it.

Swap file is a good choice ,although is bit slower than the partition.

Swap memory is needed if you want to hibernate.

Also read this
https://help.ubuntu.com/community/SwapFaq

Thanks

Can you help with this problem?

Provide an answer of your own, or ask Harold Heinbaugh for more information if necessary.

To post a message you must log in.