Pop os swap partition blues

Discussion in 'Linux' started by antiCMOS, Apr 24, 2021.

  1. antiCMOS

    antiCMOS MDL Junior Member

    Sep 7, 2020
    61
    44
    0
    #1 antiCMOS, Apr 24, 2021
    Last edited: Apr 24, 2021
  2. Nimbus2000

    Nimbus2000 MDL Senior Member

    May 5, 2010
    257
    179
    10
    I suspect that your /etc/fstab has the wrong uuid for the swap partition. When you re-created the partition, it got a new uuid. I would backup fstab then edit it (in superuser mode) to reflect the new uuid (which you can get from gparted). You could also use /dev/sda3 in fstab but using uuid is preferred.
     
  3. antiCMOS

    antiCMOS MDL Junior Member

    Sep 7, 2020
    61
    44
    0
    Thank you for taking time to respond. I ll take a look at what fstab says. I have a feeling you are right though.Cheers mate!
     
  4. Dude Guyman

    Dude Guyman MDL Senior Member

    Jun 20, 2017
    281
    282
    10
    #4 Dude Guyman, May 23, 2021
    Last edited: May 23, 2021
    Just in case it helps you, or someone else who lands here from a search:

    Identify drives uuid:
    sudo blkid

    View (edit) fstab:
    sudo -i yourtexteditor /etc/fstab

    How to create a 2GB swap file on the existing root partition if no swap partition is available (Ubuntu based, Arch is different):
    Code:
    Ubuntu:
    cd /
    sudo dd if=/dev/zero of=swapfile bs=1M count=2048
    
    Set permissions:
    sudo chmod 600 /swapfile
    
    Format to a swap:
    sudo mkswap /swapfile
    
    Turn on the swap file:
    sudo swapon /swapfile
    
    Ensure the swap file is turned on automatically at system startup:
    sudo -i yourtexteditor /etc/fstab
    
    Add the line below. Save and close:
    /swapfile  none  swap  sw  0  0
    
    Check if the system is using it:
    cat /proc/meminfo
    
     
  5. windsman

    windsman MDL Expert

    Jan 11, 2010
    1,491
    1,350
    60
    #5 windsman, May 24, 2021
    Last edited: May 24, 2021
    I don't know if you've ssd onboard, but if you don't need swap partition for any purpose, you could disable-it or all swap partiton on disk :
    Code:
    swapoff -a
    or edit fstab and put a # at the start of the UUID swap partition
    Code:
    vi /etc/fstab
    Check
    Code:
    free -h
    windsman.