Announcement

Collapse
No announcement yet.

Swap disabled after upgrade.

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

    Swap disabled after upgrade.

    Hi!

    I just realized that after upgrading 12.10 -> 13.04, swap is not working any more.

    Code:
    Τετ Μάι 15 . 09:58 πμ ~>sudo fdisk -l
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x435324ec
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1              63   853180019   426589978+   7  HPFS/NTFS/exFAT
    /dev/sda2   *   853180020   894129704    20474842+  83  Linux
    /dev/sda3       894129705   972671489    39270892+   7  HPFS/NTFS/exFAT
    /dev/sda4       972671551   976768064     2048257    f  W95 Ext'd (LBA)
    /dev/sda5       972671553   976768064     2048256   82  Linux swap / Solaris
    Τετ Μάι 15 . 10:08 πμ ~>
    I followed the "Enabling a swap partition" entry of the community doc https://help.ubuntu.com/community/Sw..._being_used.3F,
    but this didn't changed something.

    I'm still getting the error:
    Code:
    Τετ Μάι 15 . 10:08 πμ ~>sudo swapon -a -v
    swapon: cannot find the device for UUID=2886a5f4-0f61-4e45-9e31-6262dc50826a
    Τετ Μάι 15 . 10:14 πμ ~>

    TIA!
    Kubuntu 13.10 saucy 3.11.0-12-generic 64bit (el_GR.UTF-8, kde-plasma), Windows 7
    AMD Athlon 64 X2 Dual Core Processor 5600+ ‖ RAM 1750 MiB ‖ ALiveNF6P-VSTA
    nVidia C61 [GeForce 6150SE nForce 430] [10de:03d0] {nvidia}
    eth0: nVidia MCP61 Ethernet [10de:03ef] (rev a2)

    #2
    What is the swaps UUID ?

    Code:
    sudo blkid
    man blkid
    NAME
    blkid - locate/print block device attributes
    Ubuntu Community UsingUUID: https://help.ubuntu.com/community/UsingUUID

    What is the swap UUID in the fstab ?

    Ubuntu Community fstab: https://help.ubuntu.com/community/Fstab
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Yeah, what Rog said.

      I would just edit /etc/fstab (as root), find the line for the swap, remove the UUID= part and use /dev/sda5 instead.

      Please Read Me

      Comment


        #4
        THANK YOU VERY MUCH guys!!!


        Indeed, fstab had a wrong UUID.
        I tried all methods (UUID, LABEL and /dev/sda5 (at my system)) and all worked properly.
        I was also able to mount it from konsole (without reboot).

        Here's the current fstab version:

        Code:
        # /etc/fstab: static file system information.
        #
        # Use 'blkid' 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>
        # / was on /dev/sda2 during installation
        UUID=0b6c0bcf-a267-4a2b-ba29-b4429ea26ea5 /               ext4    errors=remount-ro 0       1
        # swap was on /dev/sda5 during installation
        UUID=77e0b248-cc25-4872-8e4c-0a8a246f99b4 none            swap    sw              0       0


        Note: If someone reads this post and prefer a GUI for reading-writing UUIDs and LABELs, GParted will do the trick. Available from repositories. Newer version from Getdeb.
        Warning (for Linux learners): If someone decide to go the GParted way, although recent gparted versions don't allow to mess your system with editing locked (in use) partitions, prefer to use gparted live cd (or usb), for crtitical operations.
        Better safe, than sorry! Unless of course you know exactly what are you doing.
        Improper use, will destroy your system.
        You have been warned.

        I pasted this warning, that I got from gparted forum moderator, some years ago.
        Just in case, who someone who learning Linux, read the post.
        Kubuntu 13.10 saucy 3.11.0-12-generic 64bit (el_GR.UTF-8, kde-plasma), Windows 7
        AMD Athlon 64 X2 Dual Core Processor 5600+ ‖ RAM 1750 MiB ‖ ALiveNF6P-VSTA
        nVidia C61 [GeForce 6150SE nForce 430] [10de:03d0] {nvidia}
        eth0: nVidia MCP61 Ethernet [10de:03ef] (rev a2)

        Comment


          #5
          You know if you think about it, as a procedure one could make an argument that mounting swap during boot is unnecessary in most cases. You could just as effectively mount swap in rc.local or someplace similar and the UUID and device numbers would be irrelevant.

          I have, in the past, used multiple swap partitions for performance reasons with equal priority, so a more complex swap set up like that might need the fstab entry, but a single swap using defaults would be cake.

          Please Read Me

          Comment


            #6
            Correct!
            I didn't even think about it before, but now you are mentioning it, seems to me the right way to do it.



            EDIT:

            After reactivating the swap, I had some complaints from Chromium for not having enough memory.
            I changed the swapiness from 60 -> 70 and everything seems to be OK now.

            Code:
            kdesudo kate /etc/sysctl.conf
            and I added the line (at the end of the file):
            Code:
            vm.swappiness=70
            .
            Last edited by Achaean; May 16, 2013, 03:46 AM.
            Kubuntu 13.10 saucy 3.11.0-12-generic 64bit (el_GR.UTF-8, kde-plasma), Windows 7
            AMD Athlon 64 X2 Dual Core Processor 5600+ ‖ RAM 1750 MiB ‖ ALiveNF6P-VSTA
            nVidia C61 [GeForce 6150SE nForce 430] [10de:03d0] {nvidia}
            eth0: nVidia MCP61 Ethernet [10de:03ef] (rev a2)

            Comment

            Working...
            X