Announcement

Collapse
No announcement yet.

SWAP and hibernation problem

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

    SWAP and hibernation problem

    Recently,I tried to get my kubuntu into hibernation.But he just logged me out.Somebody said to me thats because my swap partition isn't working.I went to gparted and ! mark is next to my swap partition.And I went to KSysGuard,and its says that there is no swap space.Whats happening?

    #2
    Re: SWAP and hibernation problem

    don't know, but...

    it happened to me once.
    it was after i upgraded my system from edgy to feisty, i think.
    my system wouldn't recognize i had a swap partition.
    label was gone.

    anyway, if it's just that, it's easy to fix.

    need to double check a few things, though...

    let's see what the system says (not the gui front-ends, i mean).
    boot up your box and issue the following from command line:

    Code:
    swapon -s
    to get the list of the swap partitions currently configured on your system

    Code:
    free
    to have a report on the use of mem (including swap) on your system

    Code:
    cat /etc/fstab
    to make sure swap is actually in the configuration file as it should

    Code:
    blkid
    this is just the uuids vs devices mapping

    thanks.
    gnu/linux is not windoze

    Comment


      #3
      Re: SWAP and hibernation problem

      dusan@kubuntu:~$ swapon -s
      Filename Type Size Used Priority
      dusan@kubuntu:~$


      dusan@kubuntu:~$ free
      total used free shared buffers cached
      Mem: 515840 509896 5944 0 7764 277820
      -/+ buffers/cache: 224312 291528
      Swap: 0 0 0
      dusan@kubuntu:~$


      dusan@kubuntu:~$ cat /etc/fstab
      # /etc/fstab: static file system information.
      #
      # <file system> <mount point> <type> <options> <dump> <pass>
      proc /proc proc defaults 0 0
      # /dev/sdb1
      UUID=db16e84e-6401-4f07-815c-9e555189a78e / ext3 defaults,errors=remount-ro 0 1
      # /dev/sdb5
      UUID=36cf2f85-c8b5-4050-b8ea-a9ca24795a23 none swap sw 0 0
      /dev/sda1 /media/sda ntfs-3g nouser,defaults,atime,exec,force 0 2
      /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
      /dev/sdc1 /media/sdc1 ntfs-3g nouser,defaults,atime,exec,force 0 2
      /dev/fd0 /media/floppy0 auto rw,user,noauto,exec 0 0
      dusan@kubuntu:~$


      dusan@kubuntu:~$ blkid
      /dev/sda1: UUID="BC20449720445B12" TYPE="ntfs"
      /dev/sdb1: UUID="db16e84e-6401-4f07-815c-9e555189a78e" SEC_TYPE="ext2" TYPE="ext3"
      /dev/sdb5: UUID="ed340510-8374-4351-a1bf-d34964128724" TYPE="swsuspend"
      /dev/sdc1: UUID="FE3C6A553C6A08CB" LABEL="Big Brother" TYPE="ntfs"
      /dev/sdc3: TYPE="swap" UUID="0dd683f8-8055-4e05-a926-8bac2c3390bb"
      dusan@kubuntu:~$





      Comment


        #4
        Re: SWAP and hibernation problem

        Originally posted by helen1

        dusan@kubuntu:~$ blkid
        /dev/sda1: UUID="BC20449720445B12" TYPE="ntfs"
        /dev/sdb1: UUID="db16e84e-6401-4f07-815c-9e555189a78e" SEC_TYPE="ext2" TYPE="ext3"
        /dev/sdb5: UUID="ed340510-8374-4351-a1bf-d34964128724" TYPE="swsuspend"
        /dev/sdc1: UUID="FE3C6A553C6A08CB" LABEL="Big Brother" TYPE="ntfs"
        /dev/sdc3: TYPE="swap" UUID="0dd683f8-8055-4e05-a926-8bac2c3390bb"
        Here is the problem -- the UUID of the /dev/sdb5 partition has changed. If you open Kate as the Super User and edit the /etc/fstab file (Alt-F2 "kdesu kate /etc/fstab) to use this UUID for your swap partition, then it will work again.

        But, what is this /dev/sdc3 swap partition? Did you mean for that to also be a swap partition? You only need one!

        Also, it might be that /dev/sdb5 needs to be re-formatted as a swap partition, because it says "swsuspend". Do that first, it will make a new UUID. Then run blkid again, to see the new UUID, then edit /etc/fstab to make the UUID the same as you see in blkid.

        Comment


          #5
          Re: SWAP and hibernation problem

          How to edit?What to write?And I didnt know that I have 2 swap partitions.

          Look this picture.
          Attached Files

          Comment


            #6
            Re: SWAP and hibernation problem

            It looks like /dev/sdb5 was supposed to be swap. What is /dev/sdc3?

            Comment


              #7
              Re: SWAP and hibernation problem

              there are 2 discs on this system.
              or you have a removable disc connected.
              in gparted, click on the drop down menu on top-right hand side.
              you select devices from up there.
              i'll let dibl go on on this.
              gnu/linux is not windoze

              Comment


                #8
                Re: SWAP and hibernation problem

                @ Don

                I dont have sdc3.I only have sdc that is according to gparted,unlocated space.But this unlocated space is NTFS partition that works fine,on Kubuntu and on Windows.

                Comment


                  #9
                  Re: SWAP and hibernation problem

                  The blkid command is showing correctly 3 hard drives currently running on this system.

                  /dev/sda is a NTFS-formatted drive

                  /dev/sdb is for Linux, and has one ext3 partition, and one which is in your screen shot which I think was meant to be the swap partition.

                  /dev/sdc is also NTFS-formatted, but it has at least two partitions, and one of them is /dev/sdc3 which is formatted to be swap. So, /etc/fstab is looking for the swap partition on /dev/sdb5, but that has the wrong UUID number. There is a swap partition on /dev/sdc3, but that one is not the one listed in /etc/fstab to be automatically mounted when you boot linux.

                  So, you could make either /dev/sdb5 a swap partition (again), or else you could mount /dev/sdc3 as the swap partition. If /dev/sdc3 is a drive that you might remove from the computer, then it would be better to make /dev/sdb5 the swap partition again. Here are the steps to do that:

                  1. Using GParted just like your screen shot, right-click on /dev/sdc3 and choose "format > swap" (something like that) to make this a swap partition again.

                  2. Run
                  Code:
                  blkid
                  again, because it will have new UUID after formatting.

                  3. Leave the Konsole window open, and then do Alt-F2 "kdesu kate /etc/fstab" with no quote marks, so Kate is open with the fstab file showing. In the Konsole, copy the UUID for /dev/sdb5 and in Kate paste it in where there is the old UUID for the /dev/sdb5 partition ( 36cf2f85-c8b5-4050-b8ea-a9ca24795a23). Then click "save" in Kate, and close it.

                  4. In the Konsole,
                  Code:
                  sudo mount -a
                  will remount everything for you, including swap.

                  Then I think it will be fixed.

                  Comment


                    #10
                    Re: SWAP and hibernation problem

                    I done that.

                    This is new blkid:
                    dusan@kubuntu:~$ blkid
                    /dev/sda1: UUID="BC20449720445B12" TYPE="ntfs"
                    /dev/sdb1: UUID="db16e84e-6401-4f07-815c-9e555189a78e" SEC_TYPE="ext2" TYPE="ext3"
                    /dev/sdb5: UUID="ed340510-8374-4351-a1bf-d34964128724" TYPE="swsuspend"
                    /dev/sdc1: UUID="FE3C6A553C6A08CB" LABEL="Big Brother" TYPE="ntfs"
                    /dev/sdc3: TYPE="swap" UUID="0dd683f8-8055-4e05-a926-8bac2c3390bb"
                    dusan@kubuntu:~$

                    Comment


                      #11
                      Re: SWAP and hibernation problem

                      This looks like a problem:

                      Originally posted by helen1

                      /dev/sdb5: UUID="ed340510-8374-4351-a1bf-d34964128724" TYPE="swsuspend"
                      Does your GParted say what type of filestystem that /dev/sdb5 is? I don't think it is formatted as "Linux swap" -- that's what you need.

                      Comment


                        #12
                        Re: SWAP and hibernation problem

                        Linux-swap

                        Comment


                          #13
                          Re: SWAP and hibernation problem

                          I think I know what's going on here.

                          How much memory is in your computer? That's important, because you must have a larger swap space than you have memory installed, if you want to "hibernate" or suspend to disk.

                          I think you attempted to suspend to disk, and the system found not enough space on the original swap, and made a new swap. But the new swap is not mounted in /etc/fstab.

                          So, if you have 1GB of memory, then I think you must use GParted to enlarge the old swap on /dev/sdb5 to something like 1.3GB (1300MB).

                          Or, if you will never remove the hard drive /dev/sdc, then we can make a larger swap on that drive if you want to use it. But it needs to be 1.3GB - 1.5GB if you want to hibernate the computer.

                          OK?

                          Comment


                            #14
                            Re: SWAP and hibernation problem

                            I have 512MB of RAM memory.

                            And my swap is about 1GB.So that a lot of space.

                            Dont you think so?

                            Comment


                              #15
                              Re: SWAP and hibernation problem

                              Yep, that is enough space to suspend to disk.

                              Hmmmmmmmmmmmmm.

                              I'm not sure, but it seems that your attempt to hibernate has caused the system to make a new swap space at /dev/sdc3. I think you do not want that, right?

                              Maybe use GParted, and format that /dev/sdb5 to "ext3", and save it. Then I would open the /dev/sdc3 partition, with GParted, and change it to "unallocated" -- you might need to use "delete" on it to do that. Then I would open /dev/sdb again with GParted, and this time format the /dev/sdb5 partition to "Linux swap". Then maybe the "swsuspend" will be changed to "swap" like you want.

                              Finally, this will make a new UUID for /dev/sdb5, so you will need to put that UUID in the /etc/fstab file for /dev/sdb5 for the swap partition.

                              Then when you restart it should be mounted. I will cross my fingers.

                              Comment

                              Working...
                              X