Results 1 to 10 of 10

Thread: Resize swap partition??

  1. #1
    Join Date
    May 2008
    Location
    Ireland
    Beans
    325
    Distro
    Ubuntu 10.04 Lucid Lynx

    Resize swap partition??

    Hey people!

    Can anyone out..... ====> tell me the best way to resize a swap partition?

    I read somewhere that your swap partition should be the same size as you RAM in order for Suspend to work.....?

    Im running Lucid

    Thanks in advance

  2. #2
    Join Date
    Feb 2009
    Location
    Trinidad and Tobago
    Beans
    340
    Distro
    Ubuntu Development Release

    Re: Resize swap partition??

    Use the live CD. It comes with GParted, a graphical disk partitioning utility.
    System>Administration>Gparted Partition Editor
    or <alt+f2> type
    Code:
    sudo gparted
    and press enter
    Edit your partitions there.
    The above post definitely does not contain any sarcasm at all.

  3. #3
    Join Date
    Nov 2009
    Location
    Madrid, Spain
    Beans
    1,403
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Resize swap partition??

    GParted is a good tool for that purpose.

    But this task is not trivial. When you modify the size of a swap partition, you change its UUID. So, you will have to update the /etc/fstab with the new UUID of your swap partition.

    Theses bash commands could be useful if you try to change the size of your swap partition:

    #List the UUIDs detected in your system
    sudo blkid

    # Stop the swap
    sudo swapoff -a

    #Restart the swap
    sudo swapon -a
    Best regards,

    Luis

  4. #4
    Join Date
    Nov 2009
    Location
    Madrid, Spain
    Beans
    1,403
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Resize swap partition??

    You can use an Ubuntu Live CD, but I think that it is easier to run your Lucid Ubuntu.

    GParted is not included in the standard Ubuntu installation. So, please, install it using Synaptic.

  5. #5
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Resize swap partition??

    You actually don't need any swap at all for suspend. You do need it for hibernate though. You may want to read through the Ubuntu Swap FAQ and decide if you really need more swap: https://help.ubuntu.com/community/SwapFaq
    Don't try to make something "fast" until you are able to quantify "slow".

  6. #6
    Join Date
    May 2008
    Location
    Ireland
    Beans
    325
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Resize swap partition??

    so is there any other reason my suspend or hibernate dont work?

  7. #7
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Resize swap partition??

    Quote Originally Posted by Kaneda187 View Post
    so is there any other reason my suspend or hibernate dont work?
    My PC would not Suspend when my Swap was too small, as soon as I resized it (and fixed the UUID in the resume file) it would Suspend and Hibernate correctly.

    Try it.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  8. #8
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Resize swap partition??

    Quote Originally Posted by dcstar View Post
    My PC would not Suspend when my Swap was too small, as soon as I resized it (and fixed the UUID in the resume file) it would Suspend and Hibernate correctly.

    Try it.
    That sounds like a completely separate issue. I've been running without any swap at all on this laptop for 2 years and it has suspend and resumed without fail every day.
    Don't try to make something "fast" until you are able to quantify "slow".

  9. #9
    Join Date
    Nov 2009
    Location
    Madrid, Spain
    Beans
    1,403
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Resize swap partition??

    You can read this interesting comment in this page: https://help.ubuntu.com/community/SwapFaq

    Hibernation (suspend-to-disk) The hibernation feature (suspend-to-disk) writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as big as your RAM size. The hibernation implementation currently used in Ubuntu, swsusp, needs a swap or suspend partition. It cannot use a swap file on an active file system.

  10. #10
    Join Date
    May 2008
    Location
    Ireland
    Beans
    325
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Resize swap partition??

    I think I'll give it a try later!

    thanks and let ya know how it goes!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •