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

Thread: swap partition not on when booting up

  1. #1
    Join Date
    Jan 2014
    Beans
    11

    swap partition not on when booting up

    whenever i start up ubuntu 13.10, my swapfile is loading but the swap partition must be turned on manually. whenever i open GParted Partition Editor, i right click the linux-swap partition and have to manually set the swapon. is there a way to set this to automatically be on when i boot up? i am a total noob, not even sure if i am posting this in the right forum! decades of windows experience and almost no linux experience.

    after i ran sudo blkid
    Code:
    /dev/sda1: LABEL="WINRE_DRV" UUID="508A648C8A647080" TYPE="ntfs"
    /dev/sda2: LABEL="SYSTEM_DRV" UUID="BC66-F3F6" TYPE="vfat"
    /dev/sda3: LABEL="LRS_ESP" UUID="4A67-405D" TYPE="vfat"
    /dev/sda5: LABEL="Windows8_OS" UUID="01CF0CED3C1008E0" TYPE="ntfs"
    /dev/sda6: LABEL="recovery" UUID="01CF0CF75A89F600" TYPE="ntfs"
    /dev/sda7: UUID="0d86cd58-407d-4761-8079-0d8660957150" TYPE="ext4"
    /dev/sda8: UUID="e0f8f78c-1953-4189-9ab1-8481656e297b" TYPE="ext4"
    /dev/sda9: UUID="a1189ec1-8022-4430-858c-1d64fd39e24b" TYPE="swap"
    /dev/sda10: LABEL="LENOVO" UUID="12F67230F6721467" TYPE="ntfs"
    /dev/sda11: LABEL="PBR_DRV" UUID="BA046DA0046D607D" TYPE="ntfs"
    after i ran cat /etc/fstab
    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/sda6 during installation
    UUID=0d86cd58-407d-4761-8079-0d8660957150 / ext4 errors=remount-ro 0 1
    # /boot/efi was on /dev/sda2 during installation
    UUID=BC66-F3F6 /boot/efi vfat defaults 0 1
    # /home was on /dev/sda10 during installation
    UUID=e0f8f78c-1953-4189-9ab1-8481656e297b /home ext4 defaults 0 2
    # swap was on /dev/sda11 during installation
    #UUID=a6c5376d-6e93-4b16-931e-8b66e26e1af5 none swap sw 0 0
    /dev/mapper/cryptswap1 none swap sw 0 0
    /swapfile none swap sw 0 0
    Last edited by Elfy; January 9th, 2014 at 09:57 AM.

  2. #2
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,317
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: swap partition not on when booting up

    Add these lines to your /etc/fstab:
    Code:
    #swap originally on /dev/sda9
    UUID=a1189ec1-8022-4430-858c-1d64fd39e24b   none   swap   sw   0   0

  3. #3
    Join Date
    Aug 2013
    Beans
    11

    Re: swap partition not on when booting up

    hi
    ups but take your own UUID ! )
    ciao

  4. #4
    Join Date
    Jan 2014
    Beans
    11

    Re: swap partition not on when booting up

    Quote Originally Posted by Impavidus View Post
    Add these lines to your /etc/fstab:
    Code:
    #swap originally on /dev/sda9
    UUID=a1189ec1-8022-4430-858c-1d64fd39e24b   none   swap   sw   0   0
    can you walk me through this? like i said, pretty much totally new, don't know how to do this particular thing. thanks for the reply and i hope it works!

  5. #5
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: swap partition not on when booting up

    Open a terminal and get root rights.

    Code:
    sudo -i
    then we'll back up the file and then open the file for editing, be careful while you've got root rights

    Code:
    cp /etc/fstab /etc/fstab.0901
    now open the file to edit it

    Code:
    gedit /etc/fstab
    copy the lines from post #2 to the bottom of the file

    Code:
    #swap originally on /dev/sda9
    UUID=a1189ec1-8022-4430-858c-1d64fd39e24b   none   swap   sw   0   0
    then close gedit and save it when prompted, then close the root terminal

    Code:
    exit
    All done.

  6. #6
    Join Date
    Jan 2014
    Beans
    11

    Re: swap partition not on when booting up

    thank you very much! that appears to have worked. now in gparted when i boot up the linux-swap is already on. the only other question i have might be a stupid question, but why does it say -- under the used and unused columns on the linux-swap in gparted?

  7. #7
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: swap partition not on when booting up

    but why does it say -- under the used and unused columns on the linux-swap in gparted
    it isn't here at the moment.

    Mine shows 4.00KiB being used.

  8. #8
    Join Date
    Jan 2014
    Beans
    11

    Re: swap partition not on when booting up

    i had to format and start over, having messed up my desktop beyond usability in my first installation of ubuntu. this wasn't a big deal because i wanted to start fresh and actually just rid my system of windows, and started from scratch with ubuntu. this made ubuntu run much better and a few issues have mostly disappeared, but now my swap is messed up yet again. i don't know what i did, i even made sure to set up the swap in the partition table when i ran installation and it looked like it was all working at first. after installing a bunch of software like chrome and codecs, java and the likes when you first install ubuntu, i opened gparted and my swap appears messed up again.


    i have the following partition table in gparted (much easier to type out now)


    /dev/sda1 fat32 /boot/efi 487mb 4.27mb used (boot)
    /dev/sda2 ext4 / 37.25gb 7.38gb used
    /dev/sda3 ext4 /home 875.16gb 24.41gb used
    unallocated unallocated 18.63gb


    i definitely had that last partition set up correctly (or so i thought) in the installation process, and also booted to a live usb drive and made sure to set it up properly in gparted. i rebooted, ejected the usb drive, booted back into my new installation of ubuntu, and the swap was STILL unallocated and not in use obviously.


    what do i need to do? here are the results of the previous things people asked me to do in this thread to solve this problem previously


    sudo blkid


    /dev/sda1: UUID="2152-B1BC" TYPE="vfat"
    /dev/sda2: UUID="593f856a-b25e-4f25-ac48-3c5b00dcf7d9" TYPE="ext4"
    /dev/sda3: UUID="78b1b1a0-b721-4f52-8b17-b577bd573225" TYPE="ext4"
    /dev/mapper/cryptswap1: UUID="7c51619a-5ead-4e78-af2d-2900f3b4046c" TYPE="swap"

    cat /etc/fstab

    # /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=593f856a-b25e-4f25-ac48-3c5b00dcf7d9 / ext4 errors=remount-ro 0 1
    # /boot/efi was on /dev/sda1 during installation
    UUID=2152-B1BC /boot/efi vfat defaults 0 1
    # /home was on /dev/sda3 during installation
    UUID=78b1b1a0-b721-4f52-8b17-b577bd573225 /home ext4 defaults 0 2
    # swap was on /dev/sda4 during installation
    #UUID=7c51619a-5ead-4e78-af2d-2900f3b4046c none swap sw 0 0
    /dev/mapper/cryptswap1 none swap sw 0 0

  9. #9
    Join Date
    Jan 2014
    Beans
    11

    Re: swap partition not on when booting up

    well this is weird. i booted to live usb device and formatted the unallocated area as linux-swap again. i exited and rebooted, and now it does show up as linux-swap in gparted, but i get this when i do sudo blkid

    /dev/sda1: UUID="2152-B1BC" TYPE="vfat"
    /dev/sda2: UUID="593f856a-b25e-4f25-ac48-3c5b00dcf7d9" TYPE="ext4"
    /dev/sda3: UUID="78b1b1a0-b721-4f52-8b17-b577bd573225" TYPE="ext4"
    /dev/sda4: LABEL="linuxswap" UUID="6493f3b9-d908-4644-bc79-7807db9f8a53" TYPE="swap"
    /dev/mapper/cryptswap1: UUID="9b33ee92-f21f-4e07-b080-95ef59a62d1d" TYPE="swap"

    am i supposed to have two swaps? i don't recall seeing this in my old swap issue.

    any suggestions??? it wasn't on when i booted up either, but it's now showing as linux-swap in gparted like i said, instead of unallocated.

  10. #10
    Join Date
    Jan 2014
    Beans
    11

    Re: swap partition not on when booting up

    fwiw everything appears to be working ok. this is what i got when i ran free -h

    total used free shared buffers cached
    Mem: 5.0G 4.9G 121M 0B 7.5M 3.6G
    -/+ buffers/cache: 1.3G 3.7G
    Swap: 18G 346M 18G

Page 1 of 2 12 LastLast

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
  •