LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-06-2006, 05:42 AM   #1
pzanis
LQ Newbie
 
Registered: Jul 2006
Posts: 7

Rep: Reputation: 0
fstab file is empty


Dear Linux users

I have the following problem:

An error occured during the file system check.
And I get the following warning
WARNING: Your /etc/fstab does not contain the fsck passno field. I will kludge around things for you, but you should fix your /etc/fstab file as soon as you can.

I edited the etc/fstab file but it is empty for an unknown reason. Do you know how can I recover the information for the fstab file.

Thanks for any help

Prodromos
 
Old 07-06-2006, 07:55 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Whenever you edit a file, the system will save the last version with "~" appended. Go to /etc and look for "fstab~"
 
Old 07-06-2006, 08:03 AM   #3
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
I know this may sound too obvious, but I'm going to ask anyway: Are you sure you have an empty fstab file? Did you try to examine it this way--?
Code:
less /etc/fstab
The reason I ask is that I've many times gone to edit something and found an "empty" or "new" file staring me in the face--because I didn't specify the full path to the file, OR I failed to be in the file's directory when I opened the editor. So I figure other people have made the same mistake...

Otherwise, if it really is empty I'd be concerned about why it is. It's easy enough to write an fstab file if you know what all your partitions are and where you normally mount them. You can get the names of the devices and their partitions and file types by issuing
Code:
sudo fdisk -l
but you're on your own when it comes to the rest of the information needed in the file.

The pass_no field is the last field in each entry of the fstab file. A typical entry looks like:
Code:
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
The "1" in this field is explained in the manual entry for fstab:

Code:
 The sixth field, (fs_passno), is used by the fsck(8) program to  deter-
       mine the order in which filesystem checks are done at reboot time.  The
       root filesystem should be specified with a fs_passno of  1,  and  other
       filesystems  should  have a fs_passno of 2.  Filesystems within a drive
       will be checked sequentially, but filesystems on different drives  will
       be  checked  at  the  same time to utilize parallelism available in the
       hardware.  If the sixth field is not present or zero, a value  of  zero
       is  returned  and fsck will assume that the filesystem does not need to
       be checked.

Last edited by jonr; 07-06-2006 at 08:05 AM.
 
Old 07-06-2006, 08:08 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
[QUOTE=jonr]I know this may sound too obvious, but I'm going to ask anyway: Are you sure you have an empty fstab file? Did you try to examine it this way--?
Code:
less /etc/fstab
AMEN!! Been there, done that!!

OP said that (s)he edited the file--as opposed to "attempted to edit", but your theory may still be correct.
 
Old 07-06-2006, 12:01 PM   #5
johndoe0028
Member
 
Registered: Jun 2005
Location: CA, USA
Distribution: Gentoo
Posts: 165

Rep: Reputation: 30
You might have to mount the partition that /etc/fstab is on. When I fail fschecks, it tells me to fix stuff, without anything mounted.

Point is: is the device where /etc/fstab is mounted?
 
Old 07-10-2006, 03:30 AM   #6
pzanis
LQ Newbie
 
Registered: Jul 2006
Posts: 7

Original Poster
Rep: Reputation: 0
fstab file

Thanks for the suggestions

Tha fstab file is indead empty. I checked that.
What I tried was to rbuiult and hence I modified the fstab file according to the partions I have in my maschine.

When I reboot though I get an error message like:

Sarting automount: Cannot create temp file /tmp/autofs.V4sVLm
could not make tmp file /etc/rc5.d/S90lmgrd:line 82
/usr/pgifortan/flexlm.log: Read-only file system
I also get for a number of other files the warning Read-only file system
In the end I got a message like:
INIT: Id "1" respawning too fast: disabled for 5 minutes
which is repeated again and again and I cannot enter a command line to
check and modify things.

Obvisously something is wrong with fstab file I wrote.
Do you have any suggestion so that I can enter again a command line to check and modify the fstab file again?

Please help!
 
Old 07-10-2006, 07:54 AM   #7
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
It sounds as though the problem's with the "read-only" files the system keeps finding, preventing successful booting. I suggest backing up your /etc directory if possible, then doing this as root:
Code:
chmod -R 755 /etc
and then see what error messages you get. I believe at least you'll get some result that will shed more light on the situation. I've had the respawning message before but it's been so long ago I don't remember how I fixed it. I believe it may be related to one of the files that the system cannot write to--preventing it from going to level two in the initialization process.

Wish I could be more helpful...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Scripting Empty file john8675309 Linux - Software 2 08-08-2007 04:05 PM
downloaded an empty? gif file blotch Linux - Newbie 1 02-07-2005 01:19 PM
[c shell] file empty? saiz66 Programming 1 09-28-2004 10:57 PM
bootsect.lnx - file empty sharkeye Linux - General 1 04-28-2002 04:54 AM
XF86Config file is empty rdaves@earthlink.net Linux - Newbie 2 06-30-2001 09:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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