Announcement

Collapse
No announcement yet.

Hibernate: First half works, second doesn't

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hibernate: First half works, second doesn't

    Hello!
    This is a Kubuntu thread. (Not Ubuntu's!) It begins like this: I tried Ubuntu's (not Kubuntu's!) Live CD. Using it, I installed Ubuntu on an external hard disk. The idea is that I can move it between two computers.

    At the time of installation, there were three options. Two said that I already had Ubuntu installed on the hard disk but I actually have Kubuntu, not Ubuntu. So I tried the third option, which was the "custom" option that lets one deal with partitions directly. Anyway, the other two options were to replace Kubuntu (which they thought was Ubuntu) or to install alongside it, but that was not what I wanted.

    The installer wanted to use Kubuntu's swap area but I wanted a new swap to be installed in the external hard disk so that when I move it to the other computer it works. So I did all the proper partitioning and configuration on the external hard disk: ext4 + swap. On the internal hard disk, I marked the partitions to not be used by the installer. I think I did the right choice -- the Kubuntu partition is untouched.

    However, when I booted into Kubuntu to make sure everything was in order, I found that the Hibernate option was missing. I use it a lot, so I've been trying to troubleshoot it back into full functionality.

    I discovered that the swap partition on the internal (Kubuntu's) hard disk was deactivated. But every time I would activate it and restart to see if Kubuntu gained the Hibernate option, it would deactivate again. So I deleted the swap partition and recreated it myself. But I would still have the same problem. I finally made the swap partition to stay active by editing /etc/fstab and changing the UUID of the swap partition with the new one, which I obtained by running blkid. (Quite unfortunately, I forgot to write down the old UUID.) So now the Hibernate option works... well, not really, only the first half works. It powers down as hibernations normally do, I can tell since I've done it often and the behavior is identical to how it used to be. But when I power the computer back on, the system does not resume what had hibernated, instead it powers on as if I had chosen Shut down instead of Hibernate.

    I use Hibernate a lot. Can anyone please tell me how to fix this situation? Thank you very, very much.

    #2
    First of all, Kubuntu is Ubuntu, on the system level, that is why it shows up that way.

    Have you successfully hibernated with 12.04 (any flavour)? Hibernation has been disabled in this version as it was deemed too buggy and unreliable, and could cause data loss.
    There are ways to turn it back on, if this is the case for you.

    I am not clear on which drive you want the swap to be on. I would think having the swap on the portable drive would be the correct way, as your hibernated session is written there, to be restored when you move to the other computer.

    Comment


      #3
      I had used the information on the following thread, which I started, to enable Hibernation on Kubuntu, and I have been using it for a long time.
      http://www.kubuntuforums.net/showthr...ight=hibernate

      I have a swap on the internal drive (Kubuntu's) and on the external drive (Ubuntu's). When I use the external drive I want Ubuntu to use the swap on the external drive only but I haven't checked on this (it's a different matter that's outside of this thread). When I use the internal drive I want Kubuntu to use the swap on the interval drive only -- like it always did. In other words, I don't want mixing of operations across drives.

      I think I have problems with UUIDs. I think the change I did to /etc/fstab was correct and necessary so that my swap keeps working correctly on Kubuntu. But I think that I may need to adjust the UUID on some other file too but I don't know which one is it, or if there is more than one such file, or if (perhaps) the solution is actually not related to UUIDs.
      Last edited by Kurious; Aug 20, 2012, 05:04 AM.

      Comment


        #4
        Originally posted by Kurious View Post
        I think I have problems with UUIDs. I think the change I did to /etc/fstab was correct and necessary so that my swap keeps working correctly on Kubuntu. But I think that I may need to adjust the UUID on some other file too but I don't know which one is it, or if there is more than one such file, or if (perhaps) the solution is actually not related to UUIDs.
        /etc/fstab should be the only place you need to list the swap partitions you want to use.
        You can test it without rebooting by turning swap off and on with the following;
        Code:
        sudo swapoff -a
        sudo swapon -a
        You might want to run "sudo blkid -c /dev/null" and check the UUIDs again, the -c /dev/null voids the caches blkid normally reads from and causes it to re-obtain the values.

        Comment


          #5
          Hello, Just to let you know that I have *not* abandoned this thread. I just will not be able to try this and respond until several days have passed. Thank you for replying.

          Comment


            #6
            Here's what happened.
            "sudo swapoff -a" worked
            "sudo swapon -a" said: "cannot find the device for UUID=(then it displayed some UUID here)"
            "sudo blkid -c /dev/null" displayed the UUID for my normal data/OS partition but not for the swap partition
            "sudo swapon -s" displayed nothing
            "sudo swapon -a -e -f -v" supposedly worked, but then "sudo swapon -s" displayed nothing again
            I opened "KDE Partition Manager" and had to reconfigure the swap partition to be linuxswap, and activate it
            I used "cat /etc/fstab" to show me the swap UUID in that file
            "sudo swapon -s" confirmed an installed swap partition but does not display an UUID
            "sudo blkid -c /dev/null" displayed two UUIDs: my normal data/OS partition, and for the swap partition
            However, the UUID in /etc/fstab was different from blkid's. So I edited /etc/fstab to match with "sudo kate"
            "sudo swapoff -a" and "sudo swapon -a" now works without problem
            EDIT (post update): I also had restarted and verified that Kubuntu did not lose this new configuration.

            I think the use of "-c /dev/null" for "blkid" did help.

            Regarding Ubuntu, I would like the Ubuntu team to look at this thread and consider improving the installer in case someone wants to do what I did: to create OS+swap on an external disk *without* touching the swap on the internal disk. (I don't think that this was a result of my misusing the Ubuntu installer, however, I admit I could be wrong. In that case, I claim that the installer needs to be a little more used-friendly.) Can anyone recommend a good website so that I record the installer bug, or, if anyone wants to do it on my behalf I'd be grateful -- it's just a matter of pointing to this thread.

            I'm not marking this thread as solved yet until the Ubuntu side is resolved. (I mean simply recording the installer bug, not waiting until it is fixed. This could help other Kubuntu users not go through this in the first place. In fact, I may want to reinstall Ubuntu in the same way and I already hesitate having to go through this.)

            Again it may be a few days until I reply again.

            Thank you!
            Last edited by Kurious; Aug 26, 2012, 08:25 AM.

            Comment


              #7
              https://bugs.launchpad.net/ubuntu/+s...ls/+bug/923326

              Launchpad is the place to report bugs - Ubuntu folks are extremely unlikely to see this.
              The above bug report has a lot of mumbo jumbo from one user, but feel free to add your bit to it. The real culprit is not the installer, but the mechanisms used for suspend/hibernate.

              Another thing to try is specifying in your bootloader the correct swap partition
              https://help.ubuntu.com/community/Po...roubleshooting may have some hunts as well
              https://help.ubuntu.com/12.04/ubuntu...hibernate.html

              Unfortunately, Ubuntu is designed more as a general purpose OS, and the gui installer in particular is designed around ease of use.

              Comment

              Working...
              X