Results 1 to 10 of 10

Thread: Swap wont turn on automatically

  1. #1
    Join Date
    Feb 2009
    Location
    Kennesaw, Georgia
    Beans
    122
    Distro
    Ubuntu 12.04 Precise Pangolin

    Swap wont turn on automatically

    I am having a problem with my swap partition. It wont automatically turn on. When I go into the gnome partition editor from the desktop, I can select the swap partition and "swapon" it, but I want ubuntu to do it automatically on startup.

    Anyone?

  2. #2
    Join Date
    Feb 2008
    Location
    Townsville, Qld Australia
    Beans
    1,065

    Re: Swap wont turn on automatically

    To have swap enabled at startup there has to be an associated entry in /etc/fstab. If you post the current contents of that file it should be pretty easy to determine whether it is enabled or not.
    Registered Linux User #464572
    journal.ryanhaigh.net
    www.ryanhaigh.net

  3. #3
    Join Date
    Feb 2009
    Location
    Kennesaw, Georgia
    Beans
    122
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Swap wont turn on automatically

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda5
    UUID=fbab27fc-af55-451e-a361-5b593e6f7c49 / ext3 relatime,errors=remount-ro 0 1
    # /dev/sda6
    UUID=a6a50703-1855-4211-81c2-212e878918f9 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0


    I recently resized and its still not working
    Last edited by Dr Belka; April 8th, 2009 at 02:59 AM. Reason: cuz

  4. #4
    Join Date
    Jan 2008
    Location
    Spain
    Beans
    1,180
    Distro
    Ubuntu

    Re: Swap wont turn on automatically

    Quote Originally Posted by Dr Belka View Post
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda5
    UUID=fbab27fc-af55-451e-a361-5b593e6f7c49 / ext3 relatime,errors=remount-ro 0 1
    # /dev/sda6
    UUID=a6a50703-1855-4211-81c2-212e878918f9 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0


    I recently resized and its still not working
    Probably the UUID of the swap partition is incorrect. To see this, can you please post the output of
    Code:
    sudo blkid
    What's even more important than free software? - OPEN FORMATS.

  5. #5
    Join Date
    Feb 2009
    Location
    Kennesaw, Georgia
    Beans
    122
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Swap wont turn on automatically

    /dev/sda1: UUID="2A38FDC038FD8AD9" LABEL="PQSERVICE" TYPE="ntfs"
    /dev/sda2: UUID="2CBABF41BABF05FC" LABEL="OS" TYPE="ntfs"
    /dev/sda3: UUID="2ECA38BB0DAFEEAE" LABEL="Storage" TYPE="ntfs"
    /dev/sda5: UUID="fbab27fc-af55-451e-a361-5b593e6f7c49" TYPE="ext3"
    /dev/sda6: TYPE="swap" UUID="ff381bef-a608-4aea-b506-6333915b7a94"
    /dev/sdb1: SEC_TYPE="msdos" LABEL="486MiB fat" UUID="499F-8664" TYPE="vfat"

  6. #6
    Join Date
    Feb 2008
    Location
    Townsville, Qld Australia
    Beans
    1,065

    Re: Swap wont turn on automatically

    As you can see the swap UUID you got from that last command doesn't match the one in /etc/fstab. You can edit the /etc/fstab entry so that it matches the real UUID of the partition and then it should mount swap every boot.

    Use alt-f2 to bring up the run dialog then:
    Code:
    gksudo gedit /etc/fstab
    Did you resize some of your partitions or something?
    Registered Linux User #464572
    journal.ryanhaigh.net
    www.ryanhaigh.net

  7. #7
    Join Date
    Feb 2009
    Location
    Kennesaw, Georgia
    Beans
    122
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Swap wont turn on automatically

    i mentioned that i did resize the partiton

  8. #8
    Join Date
    Feb 2009
    Location
    Kennesaw, Georgia
    Beans
    122
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Swap wont turn on automatically

    Alright, i edited the file and restarted and it worked. Thank you all very much.

  9. #9
    Join Date
    Jan 2008
    Location
    Spain
    Beans
    1,180
    Distro
    Ubuntu

    Re: Swap wont turn on automatically

    Quote Originally Posted by Dr Belka View Post
    Alright, i edited the file and restarted and it worked. Thank you all very much.
    You're welcome
    What's even more important than free software? - OPEN FORMATS.

  10. #10
    Join Date
    May 2008
    Beans
    65
    Distro
    Xubuntu 12.04 Precise Pangolin

    Smile Re: Swap wont turn on automatically

    Thank you JC Cheloven, I had this exact same issue after messing around resizing my partitions. It is now resolved.

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
  •