/dev/mapper/cryptswap1 error[SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

/dev/mapper/cryptswap1 error[SOLVED]

Postby gatorade on Fri Apr 06, 2012 7:41 pm

I've been getting this error lately when I boot up

Image

I got a recommendation on another forum to add this

swapoff -a
swapon -a
to the /etc/rc.local file

but this has not resolved the problem , I'm still getting the message. anyone know what I can do to fix this?
I did find another guy with the same problem on the Ubuntu forum http://ubuntuforums.org/showthread.php?p=11780103, but I don't know how to do it for my computer.
Last edited by gatorade on Sat Apr 07, 2012 12:57 am, edited 1 time in total.
gatorade
Level 4
Level 4
 
Posts: 223
Joined: Sun Mar 14, 2010 11:28 pm

Linux Mint is funded by ads and donations.
 

Re: /dev/mapper/cryptswap1 error

Postby lmarmisa on Fri Apr 06, 2012 8:13 pm

I have found this reference in the forums:

viewtopic.php?f=46&t=78923

I suppose you selected to encrypt your home folder during the installation of Mint. But this warning is related to the swap partition.

Please, open a terminal, type this command and post the results:

Code: Select all
cat /etc/fstab
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: /dev/mapper/cryptswap1 error

Postby gatorade on Fri Apr 06, 2012 11:55 pm

no , my home folder is not encrypted. I am using cryptkeeper , though. I suspect that's what is causing it , but it was working fine for a while before this error message started showing up.
here's what came back when I entered cat /etc/fstab into terminal


cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' 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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=d689d262-2e00-4ad1-aa9c-f99ae98a99de / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
#UUID=c69c46d8-cff1-4d4f-8900-77c4d8da8ea1 none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
gatorade
Level 4
Level 4
 
Posts: 223
Joined: Sun Mar 14, 2010 11:28 pm

Re: /dev/mapper/cryptswap1 error

Postby lmarmisa on Sat Apr 07, 2012 12:01 am

The file /etc/fstab has been modified. Maybe cryptkeeper was responsible of this change.

Could you post the results of this other command?

Code: Select all
sudo blkid
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: /dev/mapper/cryptswap1 error

Postby gatorade on Sat Apr 07, 2012 12:10 am

/dev/sda1: LABEL="System Reserved" UUID="CA522EC8522EB8D9" TYPE="ntfs"
/dev/sda2: UUID="8AD23882D2387513" TYPE="ntfs"
/dev/sda5: UUID="d689d262-2e00-4ad1-aa9c-f99ae98a99de" TYPE="ext4"
/dev/mapper/cryptswap1: UUID="d7e9c67c-ed68-4e03-9a8a-97e95ac338b1" TYPE="swap"
gatorade
Level 4
Level 4
 
Posts: 223
Joined: Sun Mar 14, 2010 11:28 pm

Re: /dev/mapper/cryptswap1 error

Postby lmarmisa on Sat Apr 07, 2012 12:13 am

Hmmm. I am not able to see the original swap partition.

Please, try these other commands and post the results:

Code: Select all
sudo fdisk -l
mount
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: /dev/mapper/cryptswap1 error

Postby gatorade on Sat Apr 07, 2012 12:15 am

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1fe8a0b6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 10862 87143833+ 7 HPFS/NTFS
/dev/sda3 10862 60802 401137665 5 Extended
/dev/sda5 10862 60290 397027328 83 Linux
/dev/sda6 60290 60802 4109312 82 Linux swap / Solaris

Disk /dev/dm-0: 4207 MB, 4207935488 bytes
255 heads, 63 sectors/track, 511 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x905df8ca

Disk /dev/dm-0 doesn't contain a valid partition table
gatorade
Level 4
Level 4
 
Posts: 223
Joined: Sun Mar 14, 2010 11:28 pm

Re: /dev/mapper/cryptswap1 error

Postby lmarmisa on Sat Apr 07, 2012 12:24 am

Hmmm. I do not know why the swap partition /dev/sda6 was not shown by the command blkid.

Try to edit the file /etc/fstab with this command:

Code: Select all
gksudo gedit /etc/fstab


and change the contents in this way:

Code: Select all
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' 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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=d689d262-2e00-4ad1-aa9c-f99ae98a99de / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
#UUID=c69c46d8-cff1-4d4f-8900-77c4d8da8ea1 none swap sw 0 0
#/dev/mapper/cryptswap1 none swap sw 0 0
/dev/sda6 none swap sw 0 0


Save & Exit.

Reboot and type these commands:

Code: Select all
swapon -s
sudo blkid
mount
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: /dev/mapper/cryptswap1 error

Postby gatorade on Sat Apr 07, 2012 12:34 am

when I rebooted I didn't see the error msg , should I still run the code you suggested?
gatorade
Level 4
Level 4
 
Posts: 223
Joined: Sun Mar 14, 2010 11:28 pm

Re: /dev/mapper/cryptswap1 error

Postby lmarmisa on Sat Apr 07, 2012 12:35 am

Yes, please, but I have found an improved solution. I am writing the post.
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: /dev/mapper/cryptswap1 error

Postby lmarmisa on Sat Apr 07, 2012 12:42 am

I think that I have found an improved solution.

The warning is due because the device /dev/mapper/cryptswap1 is not ready when the files of /etc/fstab are mounted by the system.

Therefore you have to comment the line /dev/mapper/cryptswap1 none swap sw 0 0 on /etc/fstab:

Code: Select all
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' 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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=d689d262-2e00-4ad1-aa9c-f99ae98a99de / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
#UUID=c69c46d8-cff1-4d4f-8900-77c4d8da8ea1 none swap sw 0 0
#/dev/mapper/cryptswap1 none swap sw 0 0


The next step is to add a swapon command to the file /etc/rc.local. I suppose that the device will be ready when the file /etc/rc.local is processed.

Code: Select all
gksudo gedit /etc/rc.local


Add the command swapon /dev/mapper/cryptswap1

Code: Select all
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

swapon /dev/mapper/cryptswap1

exit 0


Save & Exit.

Reboot the computer.

Finally check the swap with this command:

Code: Select all
swapon -s


I hope that this procedure will fix the bug.
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: /dev/mapper/cryptswap1 error

Postby gatorade on Sat Apr 07, 2012 12:50 am

here's what it said.

swapon -s
Filename Type Size Used Priority
/dev/dm-0 partition 4109308 0 -1

I'm not getting the error anymore so I think that did the trick.
gatorade
Level 4
Level 4
 
Posts: 223
Joined: Sun Mar 14, 2010 11:28 pm

Re: /dev/mapper/cryptswap1 error

Postby lmarmisa on Sat Apr 07, 2012 12:54 am

Yes. I believe the problem is solved.

If you uninstall the package cryptkeeper, you will have to remove the command swapon on /etc/rc.local. Maybe you will have to edit the file /etc/fstab too.

Best regards,

Luis

P.S. Please, mark the thread as solved.
User avatar
lmarmisa
Level 2
Level 2
 
Posts: 90
Joined: Wed Feb 15, 2012 5:22 am
Location: Madrid - Spain

Re: /dev/mapper/cryptswap1 error

Postby gatorade on Sat Apr 07, 2012 12:56 am

thank you very much. :D
gatorade
Level 4
Level 4
 
Posts: 223
Joined: Sun Mar 14, 2010 11:28 pm

Re: /dev/mapper/cryptswap1 error[SOLVED]

Postby jronpaul on Wed Sep 19, 2012 9:05 pm

I installed a fresh install Linux Mint 13 Maya \n \l

Satellite-P205 3.2.0-23-generic #36-Ubuntu SMP

I encrypted my home DIR>.

this happen to me too... I did the following and it worked as well..

FYI

Satellite-P205 ~ # grep swap /etc/fstab
# swap was on /dev/sda5 during installation
#UUID=d567103b-3b8c-4eca-9743-a53e1b7c2b55 none swap sw 0 0
#/dev/mapper/cryptswap1 none swap sw 0 0

Satellite-P205 ~ # grep swap /etc/rc.local
swapon /dev/mapper/cryptswap1


Satellite-P205 ~ # grep swap /etc/rc.local
swapon /dev/mapper/cryptswap1

Satellite-P205 ~ # swapon -s
Filename Type Size Used Priority
/dev/mapper/cryptswap1 partition 2085884 0 -1
jronpaul
Level 1
Level 1
 
Posts: 1
Joined: Wed Sep 19, 2012 8:11 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Angeltoast, Google Adsense [Bot], xenopeek and 25 guests