Results 1 to 2 of 2

Thread: Problems with Swap Partition

  1. #1
    Join Date
    Sep 2011
    Beans
    0

    Problems with Swap Partition

    Hi. Yesterday I did a fresh install of xubuntu on my notebook. I created a new partition table, and 4 primary partitions (boot, swap, root, home).

    After restarting the swap partition was showing as Unkown in gparted, so I booted again from USB, formatted the partition to linux swap, and selected swapon. Now the partition was showing as linux-swap in gparted, but it's not being used. The command free -m shows available swap, but 0 used, and the hibernation option is greyed out. After another reboot it shows 0 available swap, hibernation option is gone, but I can still find the partition in gparted as linux-swap.

    Then I followed instructions for fixing broken swap partition I found:
    Code:
    sudo swapoff -a sudo cryptsetup remove /dev/mapper/cryptswap1 sudo gedit /etc/crypttab
    Remove the SWAP line (e.g. /dev/sda2)
    sudo /sbin/mkswap /dev/sda2 sudo swapon /dev/sda2 sudo gedit /etc/fstab
    Replace /dev/mapper/cryptswap1 with /dev/sda2. sudo ecryptfs-setup-swap
    After this free -m shows available swap again, but 0 used. hibernation option is back but greyed out again.

    cat /proc/swaps returns this
    Code:
    Filename                Type        Size    Used    Priority
    /dev/dm-0                               partition    4001788    0    -1
    Im not sure why it shows /dev/dm-0 instead of /dev/sda2.

    Im still a beginner but I really want to get this right.
    Any help or tips are much appriciated.

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems with Swap Partition

    Did you encrypt /home?

    If so then swap is also encrypted and gparted then cannot see it. So it was correct.

    When you recreated it, it had a new UUID, so you have to update fstab with the new UUID.
    But then I do not know if with encryption it goes back and encrypts or not?
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







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
  •