LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2004, 07:32 AM   #1
zdenkod
LQ Newbie
 
Registered: Feb 2002
Location: Slovenia
Distribution: Slackware 8.0
Posts: 11

Rep: Reputation: 0
/etc/mtab unavailable


HI!

My config:
Slackware 9.1 & kernel 2.6.4 on reiserfs
All worked OK. All my hardware detected and worked.

One day I booted and I saw error:
"can not open /etc/mtab for writing"
The boot procedure continued and I was able to login as root (the only user on system).
The directories /proc /sys are EMPTY!
lsmod, modprobe mount ... are not working all complaining about mtab.
I even can not see the file (ls returned "permissin denied")!
So I found /etc/mtab permissions are ALL NONE for everybody including root.
I bootted Slackware CD and tried to correct permisions on mounted FS.
I got "permissin denied".

Can anybody help me to change permissions of /etc/mtab to correct state?

Regards!


Zdenko Dolar
 
Old 03-26-2004, 11:22 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Can anybody help me to change permissions of /etc/mtab to correct state?"

The permissions for /etc/mtab should be 644.

The most direct way to do this is to login as root and use this command:
chmod 644 /etc/mtab

From a rescue CD the commands to use are something like:

mkdir /gerbil
mount -t ext3 /dev/hda3 /gerbil
chmod 644 /gerbil/etc/mtab

If necessary change ext3 and /dev/hda3 to what your system has.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-28-2004, 02:05 AM   #3
zdenkod
LQ Newbie
 
Registered: Feb 2002
Location: Slovenia
Distribution: Slackware 8.0
Posts: 11

Original Poster
Rep: Reputation: 0
As I mentioned, chmod DO NOT WORK!
When I Issue "chmod 644 /gerbil/etc/mtab" I got:
"permission denied"
I can not chown or chmod! - "permission denied"
That is the problem! The system (mounted reiserfs FS) DO NOT ALLOW me to chmod or even see what the current permissions are.

Can you help me with that?

Linux user since 1996, so I am not the beginner.

Regards!


Zdenko
 
Old 03-28-2004, 01:14 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"When I Issue "chmod 644 /gerbil/etc/mtab" I got:
"permission denied"
I can not chown or chmod! - "permission denied""

I used one of my spare partitions to experiment with your problem. I issued the following commands:

/sbin/mkfs -t reiserfs /dev/hdg4
mount -t reiserfs /dev/hdg4 /spare3
mkdir /spare3/etc
touch /spare3/etc/mtb
ls -l /spare3/etc/mtb (permissions = 644)
chmod 000 /spare3/etc/mtb
ls -l /spare3/etc/mtb (permissions = 000)
chmod 644 /spare3/etc/mtb
ls -l /spare3/etc/mtb (permissions = 644)

I then went through the same commands again except that I formated and mounted /dev/hdg4 as ext2. I got exactly the same results as I got on reiserfs.

So I conclude that the permissions = 000 is not the problem which prevents you from changing the permissions. Perhaps the reiserfs inodes are bad. I suggest that you run fsck -t reiserfs against the partition and see what it tells you.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-29-2004, 12:44 AM   #5
zdenkod
LQ Newbie
 
Registered: Feb 2002
Location: Slovenia
Distribution: Slackware 8.0
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by jailbait
"When I Issue "chmod 644 /gerbil/etc/mtab" I got:

So I conclude that the permissions = 000 is not the problem which prevents you from changing the permissions. Perhaps the reiserfs inodes are bad. I suggest that you run fsck -t reiserfs against the partition and see what it tells you.


Thank you jailbait !

You were right!


In between I booted Knoppix, that have fsck.reiserfs, that Slackware install CD do not.
The FS check returned a few errors, among them "record 'number' (/etc/mtab) points to nowhere".
The cleaning of FS corrected the problem.

The source of all that was transition to kernel 2.6, when my nforce2 based mobo freezed a few times until two weeks back on nforcershq forum I got advice to disable APIC at boot time!

Thank you and regards!


Zdenko
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
mtab is stale, cannot umount robdigital Linux - Hardware 1 07-09-2005 09:43 AM
how to edit fstab/mtab? g-string 3 Linux - General 7 11-21-2004 08:17 AM
/etc/fstab or /etc/mtab praveenv Linux - Newbie 1 08-17-2004 04:03 AM
use mtab as fstab?hi rgiggs Mandriva 5 06-08-2004 12:47 PM
I deleted the /etc/mtab tolin Linux - Software 1 04-27-2004 02:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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