Results 1 to 6 of 6

Thread: Replace /Swap partition with Swap file?

  1. #1
    Join Date
    Oct 2007
    Beans
    Hidden!

    Angry [SOLVED] Replace /Swap partition with Swap file?

    Hello everyone,
    I currently have Ubuntu Desktop 10.10 installed and have a great setup. However, I'm trying to install another OS on the hard drive and need to remove a partition. I've read online that I can remove the Swap partition and use a "Swap file". My question is this:

    Is it possible to replace the Swap partition with a "swap file" without having to re-install linux? And if so, how do I accomplish this?


    Dual-booting: Mac OS X 10.6.3 / Ubuntu Desktop 10.10
    Macbook Pro 6,1
    2.8 GHz Intel Core i7, 4 GB RAM

    Any help is appreciated.

    Thanks,
    Misha
    Last edited by mishathegoat; November 3rd, 2010 at 06:22 PM. Reason: Solved

  2. #2
    Join Date
    Jul 2009
    Location
    Dayton Ohio USA
    Beans
    1,069
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Replace /Swap partition with Swap file?

    I'm currently using a swap file, created with instructions from this page https://help.ubuntu.com/community/SwapFaq
    Nice horns
    It's okay, I'm a limo driver

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

    Re: Replace /Swap partition with Swap file?

    Quote Originally Posted by mishathegoat View Post
    Hello everyone,
    I currently have Ubuntu Desktop 10.10 installed and have a great setup. However, I'm trying to install another OS on the hard drive and need to remove a partition. I've read online that I can remove the Swap partition and use a "Swap file". My question is this:

    Is it possible to replace the Swap partition with a "swap file" without having to re-install linux? And if so, how do I accomplish this?
    ........
    You can also just resize your existing partitions using an Ubuntu install CD (search for detailed instructions).

    After reading up on this, the main issue with a Swap file is the potential for it to be created in a non-contiguous manner (not using a continuous portion of disk space) which may affect performance compared to a Swap partition which is usually created in one single block of disk space.

    I had thought that a Swap file would be affected by/affect the filesystem it was associated with, but the Linux kernel bypasses all filesystem components and accesses the disk directly for Swap IO.
    Last edited by dcstar; November 3rd, 2010 at 08:49 AM.
    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

  4. #4
    Join Date
    Sep 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Replace /Swap partition with Swap file?

    from 10.04 to 10.10 i use swapspace software and it works great, it creates swap file when needed.
    tox.chat - Future open source Skype alternative.
    Distroshare - New remastersys alternative

  5. #5
    Join Date
    Oct 2007
    Beans
    Hidden!

    Re: Replace /Swap partition with Swap file?

    Quote Originally Posted by MooPi View Post
    I'm currently using a swap file, created with instructions from this page https://help.ubuntu.com/community/SwapFaq
    Nice horns
    Likewise Heh heh
    Thanks for the quick response, the FAQ was just what I needed.

    Quote Originally Posted by dcstar
    You can also just resize your existing partitions using an Ubuntu install CD (search for detailed instructions).

    After reading up on this, the main issue with a Swap file is the potential for it to be created in a non-contiguous manner (not using a continuous portion of disk space) which may affect performance compared to a Swap partition which is usually created in one single block of disk space.

    I had thought that a Swap file would be affected by/affect the filesystem it was associated with, but the Linux kernel bypasses all filesystem components and accesses the disk directly for Swap IO.
    Thanks for the useful info!

    Quote Originally Posted by forcecore
    from 10.04 to 10.10 i use swapspace software and it works great, it creates swap file when needed.
    Thanks, do you happen to remember the name of the software?

  6. #6
    Join Date
    Sep 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Replace /Swap partition with Swap file?

    swapspace is name search from synaptic
    tox.chat - Future open source Skype alternative.
    Distroshare - New remastersys alternative

Tags for this Thread

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
  •