Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

swap not auto mounting at boot- SOLVED

Post Reply
Message
Author
User avatar
entropyfoe
Forum Regular
Forum Regular
Posts: 800
Joined: Thu Apr 19, 2007 11:42 am

swap not auto mounting at boot- SOLVED

#1 Post by entropyfoe » Fri Aug 26, 2016 10:02 pm

Not the sig machine, but a replaced MB Asus A88XM-A. I installed MX-15 a while back on this machine, but did not use it as it is the "spare " machine. But I forgot that swap was not working, and I rediscovered this with the new MB.

I try and run swapon as root and get this
music@X2:~

Code: Select all

$ su root
Password: 
root@X2:/home/music# swapon -a
swapon: cannot find the device for UUID=84f9afea-dd97-4937-9930-36fdb39a1b7b
root@X2:/home/music# 
gparted sees the swap partition, but it is not activated. I right click the swap partition and do the swapon, and then it is activated (the little disk symbol is next to the partition). And top shows the swap. But that does not persist if I reboot. How do I make that stick?

cannot find the device for uuid=84.....
That is indeed the uuid of the swap partition

here is fstab

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sda1 :
UUID=bed91853-9ebf-4004-b634-4613b7e1d39b	/	auto	defaults,noatime	1	1
#Entry for /dev/sdb1 :
UUID=777651e2-a4af-494b-a218-055ca66a8246	/media/sdb1	ext3	defaults	0	2
#Entry for /dev/sdc1 :
UUID=B6147CA3147C67EF	/media/music/backup_disk	ntfs	defaults,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177,uhelper=udisks2	0	0
#Entry for /dev/sda3 :
UUID=9d41fa8e-ec70-4755-b828-9a8cdde5bd29	/home	auto	defaults,noatime	1	2
UUID=84f9afea-dd97-4937-9930-36fdb39a1b7b	swap	swap	defaults	0	0

Thanks !
Last edited by entropyfoe on Fri Aug 26, 2016 11:48 pm, edited 1 time in total.
Asus Prime 370X-Pro
AMD Ryzen 1600X (6 cores @ 3.6 GHz)
16 Gig DDR4 3200 (G Skill)
Nvidia -MSI GeForce GT 710 fanless
Samsung 960 NVMe SSD nvme0n1 P1,P2, and P3=MX-17.1, P4=antiX-17
1TB SSD sda1= Data, 2TB WD =backups
on-board ethernet & sound

User avatar
BitJam
Forum Guide
Forum Guide
Posts: 2472
Joined: Sat Aug 22, 2009 11:36 pm

Re: swap not auto mounting at boot

#2 Post by BitJam » Fri Aug 26, 2016 10:21 pm

Maybe you have the wrong UUID in the fstab. Check it with:

Code: Select all

sudo lsblk -o name,fstype,uuid
Will I cry when it's all over?
When I die will I see Heaven?

User avatar
entropyfoe
Forum Regular
Forum Regular
Posts: 800
Joined: Thu Apr 19, 2007 11:42 am

Re: swap not auto mounting at boot

#3 Post by entropyfoe » Fri Aug 26, 2016 11:31 pm

bitjam,

yup, I think that is it

I get the uuid of cc6ee24a-3794-42f3-9cb0-e1dc16e63bba
but fstab somehow had cannot find the device for UUID=84f9afea-dd97-4937-9930-36fdb39a1b7b

So I put in the number your command found.

I will reboot and see if it has swap on.

Let's see....
Asus Prime 370X-Pro
AMD Ryzen 1600X (6 cores @ 3.6 GHz)
16 Gig DDR4 3200 (G Skill)
Nvidia -MSI GeForce GT 710 fanless
Samsung 960 NVMe SSD nvme0n1 P1,P2, and P3=MX-17.1, P4=antiX-17
1TB SSD sda1= Data, 2TB WD =backups
on-board ethernet & sound

User avatar
entropyfoe
Forum Regular
Forum Regular
Posts: 800
Joined: Thu Apr 19, 2007 11:42 am

Re: swap not auto mounting at boot

#4 Post by entropyfoe » Fri Aug 26, 2016 11:46 pm

yup, that fixes it. I rerbooted and swap is there.

I still don't know how that uuid got in during the install. I certainly would not have typed in all those numbers !?!?!

Thanks for the quick insight on how to find the discrepancy.
That shows the power of this forum and the helpful people here.
Asus Prime 370X-Pro
AMD Ryzen 1600X (6 cores @ 3.6 GHz)
16 Gig DDR4 3200 (G Skill)
Nvidia -MSI GeForce GT 710 fanless
Samsung 960 NVMe SSD nvme0n1 P1,P2, and P3=MX-17.1, P4=antiX-17
1TB SSD sda1= Data, 2TB WD =backups
on-board ethernet & sound

User avatar
oops
Forum Regular
Forum Regular
Posts: 354
Joined: Tue Apr 10, 2018 5:07 pm

Re: swap not auto mounting at boot- SOLVED

#5 Post by oops » Wed May 30, 2018 2:55 pm

entropyfoe wrote:
Fri Aug 26, 2016 10:02 pm
I try and run swapon as root and get this
music@X2:~

Code: Select all

$ su root
Password: 
root@X2:/home/music# swapon -a
swapon: cannot find the device for UUID=84f9afea-dd97-4937-9930-36fdb39a1b7b
root@X2:/home/music# 
gparted sees the swap partition, but it is not activated. I right click the swap partition and do the swapon, and then it is activated (the little disk symbol is next to the partition). And top shows the swap. But that does not persist if I reboot. How do I make that stick?

cannot find the device for uuid=84.....
That is indeed the uuid of the swap partition

here is fstab

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sda1 :
UUID=bed91853-9ebf-4004-b634-4613b7e1d39b	/	auto	defaults,noatime	1	1
#Entry for /dev/sdb1 :
UUID=777651e2-a4af-494b-a218-055ca66a8246	/media/sdb1	ext3	defaults	0	2
#Entry for /dev/sdc1 :
UUID=B6147CA3147C67EF	/media/music/backup_disk	ntfs	defaults,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177,uhelper=udisks2	0	0
#Entry for /dev/sda3 :
UUID=9d41fa8e-ec70-4755-b828-9a8cdde5bd29	/home	auto	defaults,noatime	1	2
UUID=84f9afea-dd97-4937-9930-36fdb39a1b7b	swap	swap	defaults	0	0
Thanks !
Thanks too,
I had the same issue, and with EFI partition too.

Code: Select all

UUID=B4C01-87F4	/boot/efi	vfat	defaults,noatime,nodiratime	0	1

Code: Select all

mount -a # to reload the fstab

mount # to list
swapon -a
cat /proc/swaps # to list swap
$ inxi -S : System: Host:XEON Kernel: 4.16.0-xeon-01.efi x86_64 bits: 64 Desktop: Xfce 4.12.3 - Distro: MX-17.1_x64 Horizon


sunrat
Forum Regular
Forum Regular
Posts: 219
Joined: Mon Mar 28, 2016 9:54 pm

Re: swap not auto mounting at boot

#6 Post by sunrat » Wed May 30, 2018 9:34 pm

entropyfoe wrote:
Fri Aug 26, 2016 11:46 pm
yup, that fixes it. I rerbooted and swap is there.

I still don't know how that uuid got in during the install. I certainly would not have typed in all those numbers !?!?!
It happens easily in a multi-boot. Installing a new OS will often reformat the swap thus giving it a new UUID.
I recently did a Stretch netinstall and the only way to avoid it reformatting swap was to not designate a swap partition during install and add it later from the installed system.

Post Reply

Return to “Hardware /Configuration”