LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-09-2019, 11:42 PM   #1
Nemesissparadise
Member
 
Registered: Nov 2007
Location: North Pole Alaska
Distribution: Fedora
Posts: 177

Rep: Reputation: 16
Swap Partition


I just installed Fedora 29 on my laptop. I did a fresh install from a previous version. On the system Monitor resource tab it states swap unavailable. The File systems tab states I have 3.6 gb of swap available. Is the system just not using swap and that's why it's not available on the resource tab or is Fedora not finding swap to use? If it's the latter can I fix this without reinstalling? My Linux knowledge is probably beginner to Mid level, I have been running Linux since about the time Fedora 1 so I am fairly familiar with How Fedora works and I have never seen this, have I just been blissfully ignorant in the past? I set this install up like I always do. I am somewhat comfortable using the terminal if I have good instructions. A new install wouldn't be horrible other than the time spent as my home directory is its own partition.
 
Old 01-10-2019, 12:04 AM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,809
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Does the swap partition's UUID from blkid output match the UUID used by fstab's swap entry, and grub.cfg's linux lines? They need to, unless mounting is being done by LABEL, in which case the LABELs must match.
 
1 members found this post helpful.
Old 01-10-2019, 12:23 AM   #3
Nemesissparadise
Member
 
Registered: Nov 2007
Location: North Pole Alaska
Distribution: Fedora
Posts: 177

Original Poster
Rep: Reputation: 16
To sound stupid lol, IDK, How do I check?
 
Old 01-10-2019, 12:25 AM   #4
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Hi,

Do you have an entry for the swap in /etc/fstab?
mine looks like this,
Code:
...
# Entry for /dev/sdb3 :
UUID=f9853eb1-ff74-4bd1-b48e-f9f5995a05fd swap swap defaults 0 0
If it's not there you could add the entry yourself, if the uuid is a worry, just use the /dev/ address in it's place
Like this
Code:
...
# Entry for /dev/sdb3 :
/dev/sdb3 swap swap defaults 0 0
I could use a gui like GParted to check the swap partition, even to the point of deleting it and re-configuring it in the same place.

Like you I have a separate /home partitions so not too painful if I have to reinstall the OS

I hope this helps, Glenn
 
Old 01-10-2019, 12:35 AM   #5
Nemesissparadise
Member
 
Registered: Nov 2007
Location: North Pole Alaska
Distribution: Fedora
Posts: 177

Original Poster
Rep: Reputation: 16
I couldn't find that directory nor could I cd to it in the terminal. I am not sure how to add it via terminal since Fedora doesn't allow gui login to root. GParted also doesn't show a swap partition.
 
Old 01-10-2019, 01:07 AM   #6
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
If the swap partition was there and verified it would show in gparted.
The un-partitioned space should also show...

type
Code:
cat /etc/fstab
to edit use you favourite text editor, I use nano, some use vi, or kate in a gui.

Code:
nano /etc/fstab
 
Old 01-10-2019, 01:15 AM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,809
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Output from blkid will show which partition, if any, is swap, and its UUID.

You can login as root on Fedora's vttys, such as you get using Ctrl-Alt-F3.

In a terminal or a vtty, using mc to navigate filesystems, persuse files, edit text files, copy & rename files and much more is easy. If mc is not installed, install it, using sudo if necessary:
Code:
dnf install mc
 
1 members found this post helpful.
Old 01-10-2019, 02:48 AM   #8
Nemesissparadise
Member
 
Registered: Nov 2007
Location: North Pole Alaska
Distribution: Fedora
Posts: 177

Original Poster
Rep: Reputation: 16
I am not sure what this means I see it lists a swap but beyond that I can't glean much else

# blkid
/dev/sda1: SEC_TYPE="msdos" UUID="323D-CA50" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="a97b288f-c566-4212-885b-a7de10da8d36"
/dev/sda2: UUID="3daa894b-f062-4b7f-b4da-5ddfcfed539e" TYPE="ext4" PARTUUID="6ec2fd65-0a6f-45de-bad0-56b255089e37"
/dev/sda3: UUID="2mfuYK-c2gG-sQEf-YdwW-lFU8-m23E-Yct0Lz" TYPE="LVM2_member" PARTUUID="1ad004bf-2e3c-42b9-8813-e73bca06acb0"
/dev/mapper/fedora-root: UUID="220c3af6-8748-488c-822a-fb4453971d34" TYPE="ext4"
/dev/mapper/fedora-home: UUID="f9c6e6bb-14ec-49f4-a32f-56a5995b9fc8" TYPE="crypto_LUKS"
/dev/mapper/fedora-swap: UUID="a20aec96-9358-430a-994d-53f2409e6794" TYPE="ext4"
/dev/mapper/luks-f9c6e6bb-14ec-49f4-a32f-56a5995b9fc8: UUID="98395f21-7ef7-43d3-9aaf-8a9117eddb7b" TYPE="ext4"
 
Old 01-10-2019, 03:19 AM   #9
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,809
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by Nemesissparadise View Post
I am not sure what this means I see it lists a swap but beyond that I can't glean much else
Code:
...
/dev/mapper/fedora-swap: UUID="a20aec96-9358-430a-994d-53f2409e6794" TYPE="ext4"
...
The UUID you see there needs to match exactly the UUID in the swap line in /etc/fstab. Does it?
 
Old 01-10-2019, 06:42 AM   #10
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by mrmazda View Post
The UUID you see there needs to match exactly the UUID in the swap line in /etc/fstab. Does it?
And the "type=ext4" sounds wrong to me, a swap partition (or logical volume, in this case) should not have a file system on it. The OP may have reformmated the partition to a fs so that swap cannot find the swap header anymore.
 
Old 01-10-2019, 10:43 AM   #11
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,809
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by ehartman View Post
And the "type=ext4" sounds wrong to me, a swap partition (or logical volume, in this case) should not have a file system on it. The OP may have reformmated the partition to a fs so that swap cannot find the swap header anymore.
I missed that. We need to see his /etc/fstab if he wants help determining the optimal way to repair. In the mean time, he can avoid the problem by commenting the swap line in /etc/fstab.
 
Old 01-10-2019, 06:47 PM   #12
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by Nemesissparadise View Post
I am not sure what this means I see it lists a swap but beyond that I can't glean much else

# blkid
/dev/sda1: SEC_TYPE="msdos" UUID="323D-CA50" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="a97b288f-c566-4212-885b-a7de10da8d36"
/dev/sda2: UUID="3daa894b-f062-4b7f-b4da-5ddfcfed539e" TYPE="ext4" PARTUUID="6ec2fd65-0a6f-45de-bad0-56b255089e37"
/dev/sda3: UUID="2mfuYK-c2gG-sQEf-YdwW-lFU8-m23E-Yct0Lz" TYPE="LVM2_member" PARTUUID="1ad004bf-2e3c-42b9-8813-e73bca06acb0"
/dev/mapper/fedora-root: UUID="220c3af6-8748-488c-822a-fb4453971d34" TYPE="ext4"
/dev/mapper/fedora-home: UUID="f9c6e6bb-14ec-49f4-a32f-56a5995b9fc8" TYPE="crypto_LUKS"
/dev/mapper/fedora-swap: UUID="a20aec96-9358-430a-994d-53f2409e6794" TYPE="ext4"
/dev/mapper/luks-f9c6e6bb-14ec-49f4-a32f-56a5995b9fc8: UUID="98395f21-7ef7-43d3-9aaf-8a9117eddb7b" TYPE="ext4"
Looks like something is amiss on your system. I just performed a fresh install, manual setup for partitions as i did not want to use LVM scheme:

Code:
user@workstation Downloads]$ cat /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Wed Jan  9 18:21:47 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=17535026-1669-46fe-9cac-f3d39b89ca5b /                       ext4    defaults        1 1
UUID=b8c25ce1-6a04-4873-8824-93bbc68b5e51 /boot                   ext4    defaults        1 2
UUID=1717-8D5C          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
UUID=edfbf070-902a-4371-8943-7ddee3b48e8a /home                   ext4    defaults        1 2
UUID=d9cf277d-4175-4f16-8c2a-049cc70425bb /stuff                  ext4    defaults        1 2
UUID=1a1a2bef-b944-4e4e-98b4-132c1f6ae6e3 swap                    swap    defaults        0 0
[user@workstation Downloads]$ su -
Password: 
[root@workstation ~]# blkid
/dev/sda1: UUID="edfbf070-902a-4371-8943-7ddee3b48e8a" TYPE="ext4" PARTUUID="4a131f65-a87d-4e0b-87b6-a89510733a20"
/dev/sdb1: UUID="5C8C-D428" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="704ce167-3b69-44ed-aa81-e2b4bcfcd663"
/dev/sdb2: SEC_TYPE="msdos" UUID="1717-8D5C" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="f20372ed-d7d0-4053-84d4-1174b6588ee8"
/dev/sdb3: UUID="17535026-1669-46fe-9cac-f3d39b89ca5b" TYPE="ext4" PARTUUID="ce0756e4-6c3a-4883-be8d-e3313a2d6758"
/dev/sdb4: UUID="1a1a2bef-b944-4e4e-98b4-132c1f6ae6e3" TYPE="swap" PARTUUID="f2c78b43-05c3-487d-8e34-60fe7c214dc8"
/dev/sdb5: UUID="b8c25ce1-6a04-4873-8824-93bbc68b5e51" TYPE="ext4" PARTUUID="3570667b-28b0-499c-9859-0e2b2138a84c"
/dev/sdb6: UUID="d9cf277d-4175-4f16-8c2a-049cc70425bb" TYPE="ext4" PARTUUID="9f26ed46-fbbf-400c-a7d6-d528c41b894f"
/dev/sdc1: LABEL="WD Passport" UUID="FEFAE9F0FAE9A55D" TYPE="ntfs" PTTYPE="atari" PARTLABEL="Basic data partition" PARTUUID="6f8ff4c7-6d0f-4974-9916-1b341e5b27ee"
Note the 2 bold font lines. Both have type=swap, not ext4.
 
Old 01-11-2019, 01:19 AM   #13
Nemesissparadise
Member
 
Registered: Nov 2007
Location: North Pole Alaska
Distribution: Fedora
Posts: 177

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by ehartman View Post
And the "type=ext4" sounds wrong to me, a swap partition (or logical volume, in this case) should not have a file system on it. The OP may have reformmated the partition to a fs so that swap cannot find the swap header anymore.
When I try an open that directory it tells me it does not exist. If I did that my bad, didn't mean to.
 
Old 01-11-2019, 01:23 AM   #14
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,809
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by Nemesissparadise View Post
When I try an open that directory it tells me it does not exist.
Is "that directory" a reference to /etc/fstab? That's an important file, not a directory. If not, what is the "directory" to which you refer?
 
Old 01-11-2019, 01:50 AM   #15
Nemesissparadise
Member
 
Registered: Nov 2007
Location: North Pole Alaska
Distribution: Fedora
Posts: 177

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by mrmazda View Post
Is "that directory" a reference to /etc/fstab? That's an important file, not a directory. If not, what is the "directory" to which you refer?
I stand corrected I should have been more clear and also used file. I cannot find the file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions on Swap Partition, How did Anyone Pass This Along? Next Ubuntu No Swap Partition happydog500 Linux - Software 18 12-25-2016 12:37 PM
Would a Linux swap partition work as a FreeBSD swap partition? Froggy192 *BSD 11 07-27-2013 02:06 PM
swap file vs. swap partition verndog Ubuntu 16 07-09-2012 08:49 PM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration