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 - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 09-01-2014, 11:45 AM   #1
OtagoHarbour
Member
 
Registered: Oct 2011
Posts: 332

Rep: Reputation: 3
lynis: "Possible incorrect mount options used for swap parition"


I am using CentOS 6.5 and have run lynis version 1.6.0. Lynis gives the following warning

Code:
Possible incorrect mount options used for swap parition (UUID=bdfe2d90-d3c5-44b7-926a-ee5bd1fb1858) [FILE-6336]
I looked in /var/log/lynis.log and did a search for [FILE-6336]. I saw the following.

Code:
Suggestion: Check your /etc/fstab file. Swap parition usually have 'sw' in the options field (4th). [FILE-6336]
/etc/fstab has the following

Code:
UUID=bdfe2d90-d3c5-44b7-926a-ee5bd1fb1858 swap swap defaults 0 0
Code:
sudo fdisk -l
gives (among other things)

Code:
Partition 1 does not end on cylinder boundary.
I have been using CentOS for a few months without any problems. I am not sure whether this message due to my having made a new partition for /tmp.

At any rate, is this a warning that can be ignored?
 
Old 09-01-2014, 12:29 PM   #2
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by OtagoHarbour View Post

At any rate, is this a warning that can be ignored?
Yes.. But only until something that can't be undone will break... :P

Anyway, it's weird this happened, but it couldn't really happen out of nowhere so any hint to what you have done involving partitions would be great..

In the meantime, could you show us the full output of the following two commands?
Code:
blkid
fdisk -l
The first is to make an id of what uuid is for what partition and the second... well you know what the secont is for..
 
1 members found this post helpful.
Old 09-01-2014, 01:29 PM   #3
OtagoHarbour
Member
 
Registered: Oct 2011
Posts: 332

Original Poster
Rep: Reputation: 3
Thank you for your reply.

Quote:
Originally Posted by Smokey_justme View Post
Yes.. But only until something that can't be undone will break... :P

Anyway, it's weird this happened, but it couldn't really happen out of nowhere so any hint to what you have done involving partitions would be great..
The disk is set up for dual booting. Initially, it had two partitions: one for Windows and one for Ubuntu 11.4. I overwrote the Win XP partition with Centos. The Ubuntu partition may have been corrupted by my using

Code:
sudo pvcreate /dev/sda5
before I fully understood the dangers of using pvcreate. I don't use Ubuntu anymore and have been thinking of overwriting that partition.

Quote:
Originally Posted by Smokey_justme View Post
In the meantime, could you show us the full output of the following two commands?
Code:
blkid
fdisk -l
Code:
sudo blkid
/dev/sda1: UUID="56bdf45b-a24e-4738-b050-1f76cb42a4a8" TYPE="ext4" 
/dev/sda3: UUID="37e4a58a-7dbc-4c84-b8db-e210a1e852b9" TYPE="ext4" 
/dev/sda5: UUID="bb3d8b8a-cdca-4398-8835-f26d928ed5de" TYPE="ext4" 
/dev/sda6: UUID="bdfe2d90-d3c5-44b7-926a-ee5bd1fb1858" TYPE="swap" 
/dev/sda2: UUID="ccc57a57-71bd-4dc7-9e03-2101d0c7250a" TYPE="ext4"
Code:
sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 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: 0x8b8e8b8e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        5571    44228608   83  Linux
/dev/sda3            5571        5953     3072000   83  Linux
/dev/sda4            5953        9730    30336001    5  Extended
/dev/sda5            5953        9600    29296640   83  Linux
/dev/sda6            9601        9730     1038336   82  Linux swap / Solaris
Also
Code:
sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        42G  4.7G   35G  12% /
tmpfs           500M  232K  499M   1% /dev/shm
/dev/sda3       2.9G   69M  2.7G   3% /tmp
 
Old 09-01-2014, 03:59 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by OtagoHarbour View Post
is this a warning that can be ignored?
Yes, completely. Note it says it's looking for mount options, not UUIDs, partition alignment, or whatever else. You run your swap partition with default mount options. If you want to aid development then give the author feedback so it can be fixed.
 
2 members found this post helpful.
Old 09-01-2014, 10:08 PM   #5
OtagoHarbour
Member
 
Registered: Oct 2011
Posts: 332

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by unSpawn View Post
Yes, completely. Note it says it's looking for mount options, not UUIDs, partition alignment, or whatever else. You run your swap partition with default mount options. If you want to aid development then give the author feedback so it can be fixed.
Thank you for your reply. I may have other things to mention to the lynis people after I have finished working with it.
 
Old 09-02-2014, 07:12 AM   #6
mboelen
LQ Newbie
 
Registered: Nov 2013
Location: The Netherlands
Distribution: Several ones for testing purposes
Posts: 15

Rep: Reputation: Disabled
The solution has already been provided. The issue has been resolved in the code as well and committed to GitHub: https://github.com/CISOfy/Lynis

And a +1 for unSpawn: see the GitHub readme text to contact us directly if you discover a (possible) bug.
 
  


Reply

Tags
centos6, lynis, mount, partition



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
"automount: test mount forbidden or incorrect kernel protocol version" in RHEL 5 jackofalltrades Linux - Networking 3 03-25-2019 12:52 AM
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
What are the options "Nosuid" "mode" "size" in /etc/fstab? tuxfiles.org does not help pstein Linux - Newbie 1 11-16-2012 12:58 AM
issue when connecting usb hdd: "unable to parse mount options" boast Linux - Software 0 05-24-2012 08:24 PM
"mount.nfs: an incorrect mount option was specified" (soft) catkin Linux - Networking 2 09-19-2009 05:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 11:31 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