LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-30-2011, 11:55 AM   #1
lifemustgoon
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
Question FC4 refuses to mount file systems - how to fix?


I have been running an FC4 server for a while, when I noticed the / (root) partition becoming full. I ssh-ed the server, deleted a few /var/log files, bringing it down to 98%. I then rebooted and since then the system will boot but will refuse to mount anything.

(cat /etc/fstab produces an error message notifying of not being able to run fstab-sync.)

During boot, the only error message I have been able to spot is this:

Quote:
audit(1322658994.360:2) avc: denied { read } for pid=363 comm="hotplug" name="mtab" dev=dm-0 ino=1146996 scontext=system_u:system_r:hotplug_t tcontext=system_u:object_r:file_t tclass=file

audit(1322658994.360:3) avc: denied { getattr } for pid=355 comm="hotplug" name="mtab" dev=dm-0 ino=1146996 scontext=system_u:system_r:hotplug_t tcontext=system_u:object_r:file_t tclass=file
Also, in "quiet" boot, I get at some point:
Quote:
Can't find /dev/pts in /etc/fstab or /etc/mtab
After which there are lots of failure to access all kind of system resource due to filesystem being read-only.

The bottom line is that, despite being able to boot the system, I am unable to fix anything because nothing is mounted and I cannot even check what went wrong, why this is happening, and what to write were in order to fix this.

Any help, tip, insight, idea, instructions would be greatly appreciated.

Thanks.

Last edited by lifemustgoon; 11-30-2011 at 11:56 AM.
 
Old 11-30-2011, 12:02 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
fedora? on a server?? why?? and an obsolete version at that.... why??? That distro is so old, just disable SELinux (edit /etc/selinux/config) and move on.
 
Old 11-30-2011, 12:23 PM   #3
lifemustgoon
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Arrow

Quote:
Originally Posted by acid_kewpie View Post
fedora? on a server?? why?? and an obsolete version at that.... why???
I am asking the same question, too. I inherited it. I intend to upgrade it to the latest CentOS, but until I have the resources to do so safely, I need to revive this system, for day-to-day operation.

Quote:
Originally Posted by acid_kewpie View Post
just disable SELinux (edit /etc/selinux/config) and move on.
Thank you for this tip. I will try this shortly and report back how it went.
 
Old 11-30-2011, 12:45 PM   #4
lifemustgoon
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Arrow

Quote:
Originally Posted by acid_kewpie View Post
just disable SELinux (edit /etc/selinux/config) and move on.
OK, I just tried to edit /etc/selinux/config (from "permissive" to "disabled") but the system is in such bad situation, it won't let me to write the file back because is everything (that managed to be mounted) is mounted as a read-only filesystem.

I could use a SysRescueCD to mount that /etc writable, but given that SELinux was set to "permissive" (i.e. warnings only), is that really the solution to the problem?
 
Old 11-30-2011, 12:54 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
hmm, ok I guess i wasn't thinking wide enough...

So you can't cat fstab? what about under the rescue CD?
 
Old 11-30-2011, 01:16 PM   #6
lifemustgoon
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Arrow

Quote:
Originally Posted by acid_kewpie View Post
So you can't cat fstab?
Correct. It is empty, except for a single comment line saying that "This file is edited by fstab-sync - see 'man fstab-sync' for details"

Quote:
Originally Posted by acid_kewpie View Post
what about under the rescue CD?
Under the rescue CD it comes up empty (and so does /etc/mtab).

I managed to use SysRescueCD to completely disable SELinux (via /etc/selinux/config) but the problem persists.

It seems that the core problem is being unable to mount the / filesystem writeable, and as a result /etc/fstab and/or /etc/mtab cannot be generated by the system, and then there is a chain-reaction in which everything is mounted read-only.

The question now is what causes this?

If I can fix the root cause, the system will proceed normally on itself.

But what is that root cause?

What makes a system decide to mount read-only?

How did that /etc/fstab (or /etc/mtab) disappear?

Last edited by lifemustgoon; 11-30-2011 at 01:30 PM.
 
Old 11-30-2011, 01:41 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well I'd look at having a stab at writing the fstab file again manually, shouldn't be too hard to get the system usable again. Not had much experience with fstab-sync, long gone now... I'd probably look to at least make a backup copy of your new fstab in case it does get pwned, maybe uninstall / delete the fstab-sync binary if that's too involved.
 
Old 11-30-2011, 03:56 PM   #8
lifemustgoon
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
well I'd look at having a stab at writing the fstab file again manually, shouldn't be too hard to get the system usable again.
That did the trick. (fortunately, I had a backup copy of the working fstab lying around and all I had to do is copy it over)

Now the big mystery is why, and how, this happened.

I will probably never know because this incident convinced me that I should perform the upgrade sooner rather than later. The problem is that the guy who passed this system on to me, installed zillion services that make that server tick (wordpress, sitebar, cups, backup and other daemons), it would take me forever to re-build that functionality on a newly installed server.
 
Old 11-30-2011, 03:58 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well unless someone managed to nuke it manually, a file system corruption could be to blame. anything in lost+found?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] directories, file systems, and mount points hbackus Linux - Newbie 2 04-30-2010 02:55 PM
[SOLVED] One of my file systems failed to auto-mount on boot taylorkh Linux - Newbie 5 12-29-2009 03:11 PM
mount : local file systems failed athreyavc Linux - Software 3 02-25-2009 06:54 AM
mount: too many mounted file systems ferdinand2 Linux - Hardware 0 01-23-2006 12:13 PM
Partitioning: File systems and Mount points Ice Dragon Linux - Newbie 3 03-11-2004 03:00 PM


All times are GMT -5. The time now is 09:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration