Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Swap Memory Stays Inactive

  1. #1
    Join Date
    Mar 2011
    Location
    BD
    Beans
    125
    Distro
    Ubuntu 12.04 Precise Pangolin

    Swap Memory Stays Inactive

    i have 2gm RAM and 2.3 gb Swap. for some reason my swap memory does not activate on its own, i have to activate it manually from gparted each time i start ubuntu.

    i did a fresh reinstall from scratch yesterday and created 2gb swap from installation disk. swap was activated automatically then. but hibernation did not work, so i increased swap to 2.3gb but didnt try hibernate yet, pretty sure it wont work. but the problem now is swap stays inactive in each boot.

    why is this happening? how can i fix this? should i ask this question in launchpad.net?

    thanks.

  2. #2
    Join Date
    Feb 2008
    Beans
    5,636

    Re: Swap Memory Stays Inactive

    Activate your swap and post us the output of
    Code:
    sudo blkid
    and the contents of your fstab file
    Code:
    gksu gedit /etc/fstab
    If you haven't used UUIDs in fstab, perhaps increasing swap via gparted changed its UUID and it's now not recognized by your system.

  3. #3
    Join Date
    Mar 2011
    Location
    BD
    Beans
    125
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Swap Memory Stays Inactive

    Results for sudo blkid:

    /dev/sda1: UUID="8bcd1749-f82d-4d4a-967d-ee8a3583e8e2" TYPE="ext4"
    /dev/sda5: UUID="c2b167db-7250-4d6a-900f-3e1d3cf599fb" TYPE="swap"

    Results for gksu gedit /etc/fstab:

    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc nodev,noexec,nosuid 0 0
    /dev/sda1 / ext4 errors=remount-ro 0 1
    # swap was on /dev/sda5 during installation
    UUID=cdca37ca-6eb0-414e-883a-a5c94d5f9465 none swap sw 0 0

  4. #4
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Swap Memory Stays Inactive

    If you look you'll see the UUID's for swap are different
    When you changed your swap it's UUID changed, so the one in fstab is now incorrect. Edit the entry in fstab to reflect the current one, as in

    Code:
    UUID=c2b167db-7250-4d6a-900f-3e1d3cf599fb
    just edit the UUID=, the rest of the line is good

  5. #5
    Join Date
    Jun 2007
    Location
    K-o-T,
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Swap Memory Stays Inactive

    If you want to hibernate,and your uuid has changed,you also have to change etc/initramfs-tools/conf.d/resume to reflect the change in the UUID.

    Please post output of
    Code:
    cat /etc/initramfs-tools/conf.d/resume
    Good Luck
    Last edited by plucky; April 14th, 2011 at 08:14 AM. Reason: correct command
    Hypertension = Take with a pinch of salt
    | Psychocats | Ubuntu Documentation | Howto [Solved] | BBcode list | Brother Website |

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!

    Re: Swap Memory Stays Inactive

    and don't forget to run an update-initramfs after putting the correct UUID in the config.

  7. #7
    Join Date
    Mar 2011
    Location
    BD
    Beans
    125
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Swap Memory Stays Inactive

    plucky Re: Swap Memory Stays Inactive
    If you want to hibernate,and your uuid has changed,you also have to change etc/initramfs-tools/conf.d/resume to reflect the change in the UUID.

    Please post output of Code:
    cat etc/initramfs-tools/conf.d/resume
    Output is:
    cat: etc/initramfs-tools/conf.d/resume: No such file or directory. :S

    mc4man Re: Swap Memory Stays Inactive
    If you look you'll see the UUID's for swap are different
    When you changed your swap it's UUID changed, so the one in fstab is now incorrect. Edit the entry in fstab to reflect the current one, as in

    Code:
    UUID=c2b167db-7250-4d6a-900f-3e1d3cf599fb
    just edit the UUID=, the rest of the line is good
    Changed and saved it.

    QLee Re: Swap Memory Stays Inactive
    and don't forget to run an update-initramfs after putting the correct UUID in the config.
    How do i run an update-initramfs?

  8. #8
    Join Date
    Jun 2007
    Location
    K-o-T,
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Swap Memory Stays Inactive

    Output is:
    cat: etc/initramfs-tools/conf.d/resume: No such file or directory. :S
    Sorry I forgot to put a / in front of etc.I have corrected my other post as it is now
    Code:
    cat /etc/initramfs-tools/conf.d/resume
    How do i run an update-initramfs?
    From a terminal
    Code:
    sudo update-initramfs
    Good Luck
    Hypertension = Take with a pinch of salt
    | Psychocats | Ubuntu Documentation | Howto [Solved] | BBcode list | Brother Website |

  9. #9
    Join Date
    May 2010
    Beans
    4
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Swap Memory Stays Inactive

    i ran into the same problem when i wanted to update my swap memory. followed the walktrhu and it worked !!!
    thanks

  10. #10
    Join Date
    Mar 2011
    Location
    BD
    Beans
    125
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Swap Memory Stays Inactive

    @plucky

    sorry for the late reply, for some reason i could not access this thread from my mail, nor could i see this thread in my subscription list :S.

    anyways the result for
    cat /etc/initramfs-tools/conf.d/resume
    is:
    RESUME=UUID=cdca37ca-6eb0-414e-883a-a5c94d5f9465
    i changed the UUID from fstab but the above UUID shows the previous UUID still.

    and when i updated the initramfs using the code sudo update-initramfs it ask for more like
    You must specify at least one of -c, -u, or -d.

    Usage: /usr/sbin/update-initramfs [OPTION]...

    Options:
    -k [version] Specify kernel version or 'all'
    -c Create a new initramfs
    -u Update an existing initramfs
    -d Remove an existing initramfs
    -t Take over a custom initramfs with this one
    -b Set alternate boot directory
    -v Be verbose
    -h This message
    please help

    EDIT: i selected "-u" eg: sudo update-initramfs -u
    it then did something but nothing really happened.
    Last edited by rez182; April 18th, 2011 at 08:22 AM.

Page 1 of 2 12 LastLast

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
  •