swap partition change

Asked by bazsik

I bought RAM memory to my notebook so I want to change the size of the swap partition.
Is it possible to do it, or I should reinstall the system....?
What happen if I put plus memory into my notebook?

thx

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Nizar Kerkeni (nizarus) said :
#1

what is the size of your swap partition ? If you have 1Gb, or more, no need to have more swap.

What happen if I put plus memory into my notebook?
You feel it more efficient :)

Revision history for this message
bazsik (bazsikadam) said :
#2

It's an old notebook, and it has 256 MB ram I wanna add and other one 256MB modul.
The swap size is 300MB and I thought the OS needs the same swap size like op.memory.

I mean "what happen" can Ubuntu manage the ram changing...

Revision history for this message
Sébastien Corriveau (sebcor-deactivatedaccount) said :
#3

> I want to change the size of the swap partition.
> Is it possible to do it, or I should reinstall the system....?

It is possible to change the swap size, you don't need to reinstall Ubuntu to do so.

> What happen if I put plus memory into my notebook?

Ubuntu should recognize the new RAM automatically.

> I thought the OS needs the same swap size like op.memory.

No, it doesn't.

To be honest, I wouldn't change the swap size on your system, 512 MB RAM + 300 MB swap sounds good for me.

If you really want to change your swap size, you need to follow those steps:

1- turn off swapping with the "swapoff" command
2- if needed, make some free space on your harddisk by resizing your data existing partitions
3- delete your swap partition and recreate a bigger one (or simply add a second swap partition)
4- turn on swapping with the "swapon" command

Sebastien.

Revision history for this message
bazsik (bazsikadam) said :
#4

Thank you Sebastien,

I'm a new user of Ubuntu and I don't know how can I do the steps above...
how can I delete the swap and make a new without deleting my else partitions?

Revision history for this message
Sébastien Corriveau (sebcor-deactivatedaccount) said :
#5

First of all, you must be careful when you play with partitions. An error can cost you all your data. I would suggest that you take a backup of your system before doing so.

There's an application called "gparted" that you can use to create/remove/resize your partition easily. you can install it with the following command:

    sudo apt-get install gparted

You can then start it from the "System" -> "Administration" -> "Partition editor" menu option on the Gnome panel.

Hope that helps.
Sebastien.

Can you help with this problem?

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

To post a message you must log in.