LinuxQuestions.org
Review your favorite Linux distribution.
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 04-07-2005, 02:50 PM   #1
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Rep: Reputation: 0
Angry WARNING: /etc/fstab not working


I am running Fedora Core ver. 2.2.3 I load up and it says:
Code:
Welcome to Fedora Core 
Press 'I' to enter interactive startup.
Then, a flickering screen loads up (Due to color depth issues, I need that fixed too...) and after showing (somewhat) of the main screen it shuts down and it says:
Code:
System appears to have shutdown uncleanly
Press 'Y' within 3(2(1)) seconds to force a file system integrity check...
So then I press y and it says...
Code:
Checking root filesystem...
WARNING:  bad format on line 1 of /etc/fstab
WARNING:  Your /etc/fstab does not contain the fsck passno field. I will kludge around things for you, but you should try to fix your /etc/fstab file as soon as possible. 

fsck.ext2/:
The superblock can not be read or does not describe a correct ext2 filesystem

: is a directory while trying to open /
                                                                              [FAILED]
***An error occured during the file system check
***Dropping you to a shell; the system will now reboot
***When you leave the shell
Enter root password for maintenance
(or type Control-D to continue):

Can someone please tell me what I have to do?
I have no idea how to edit anything, so you're gonna have to be patient with me

Thanks!
-NT
 
Old 04-07-2005, 02:54 PM   #2
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
What does your /etc/fstab file look like ? Best paste it here.

Cheers,

mj
 
Old 04-07-2005, 03:02 PM   #3
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Original Poster
Rep: Reputation: 0
How do I look at it?

Plus, it's on another computer, although I don't mind hand-copying it...
 
Old 04-07-2005, 03:10 PM   #4
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
The easiest way would be to put in a copy of Knoppix (or Gnoppix, Slax, or any live distribution) and then copy the file to a USB memory stick.

Otherwise, when you reach the bit about "Dropping into a shell, enter the root password for maintenance" on booting, do just that - enter the root password. Now type
Code:
less /etc/fstab                  # press q when finished.

               - or, if that fails, then try:

mkdir /mnt/hda1
mount /dev/hda1 /mnt/hda1
less /mnt/hda1/etc/fstab                  # q to exit, once again.
Cheers,

mj

Last edited by mjrich; 04-07-2005 at 03:11 PM.
 
Old 04-07-2005, 03:14 PM   #5
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Original Poster
Rep: Reputation: 0
I tried this:
Code:
less /etc/fstab
And that just showed a bunch of messed up characters.

I tried this:
Code:
mkdir /mnt/hda1
And it says:
Code:
mkdir: cannot make new directory mnt/hda1: no such file or directory
 
Old 04-07-2005, 03:21 PM   #6
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
What were the messed up characters ? It could have just been a formatting issue.

What is the history of the system - has it ever run correctly, or did you just install something that happened to break it ?

Cheers,

mj
 
Old 04-07-2005, 03:25 PM   #7
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Original Poster
Rep: Reputation: 0
Well, more or less, I just installed it
I have been trying to fix this problem by myself for a couple of weeks, all that happened, was that I got to the messed up screen. And I just pressed the power button on my computer twice (to restart it) and it got all screwed up.

To give you a little info on my machine, I'm running a HP Pavilion (Slightly Custom, I took some stuff out and put new stuff in) with 64 MB of RAM. An Intel Celeron 500 Mhz processor.
I have no idea what kind of Graphics Card i have (Although I think I have an ATI Radeon or Geforce) and my monitor is older than the earth itself. I use a generic keyboard and mouse, and...I think that's it.

Hope that helps!

If you'd like to know what the characters look like, just ask.

Thanks!

-NT
 
Old 04-07-2005, 03:33 PM   #8
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
Yes, do post the characters of (at least the first line) of your /etc/fstab.

So you installed Fedora, but so far you haven't been able to boot into it ? And what is the output of (as root) fdisk -l /dev/hd*

Cheers,

mj
 
Old 04-07-2005, 03:52 PM   #9
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Original Poster
Rep: Reputation: 0
So many tough Questions

Okay, here we go!

Unforunately, due to some issues with fonts, I can't post the exact figures. There is a bunch of dashes on the top, a question mark, and a bunch of white boxes.

For the second thing you wanted, here you go:
Code:
Disk: /dev/hda: 2113 MB; 2113413120 bytes
64 heads, 63 sectors/tracks, 1023 cylinders
Units = cylinders of 4032 * 512 = 2064384

System       Boot   Start       End       Blocks         Id   System
/dev/hda1      *        1           51      102784+     83    Linux
/dev/hda2                52       939      1790208     83    Linux
/dev/hda3               940     1023      169344      82    Linux swap
Wow! That was a lot of copying...

Um, just to tell you, if I take a while, that's due to the fact I have to run about 20 feet to the other computer, copy the info and run back here.

Thank you very much!
-NT

EDIT: The reason everything looks screwed up, I don't know why, so if you need anything clarified, tell me.

 
Old 04-07-2005, 04:12 PM   #10
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
Well it sounds like, for whatever reason, your /etc/fstab file is buggered. It may be that /dev/hda1 is not even mounted - but in that case you should receive an error, not strange characters. To check: what is the output of mount and ls -lh /

Assuming that /etc/fstab is corrupted, you can either re-install Fedora from scratch, and see what happens; or create a new /etc/fstab along the lines of what follows:
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>                       <dump>  <pass>
proc            /proc           proc    defaults                        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro      0       1
/dev/hda2       /home           ext3    defaults,errors=remount-ro      0       0
/dev/hda3       none            swap    sw                              0       0
/dev/hdc        /cdrom          iso9660 ro,user,noauto                  0       0
This is only how I would guess that your /etc/fstab would look - it is possible that /dev/hda2 is mounted somewhere other than /home (possibly /users) - perhaps you can remember from the initial install. To create the new file, login as root, and then type
Code:
rm /etc/fstab
nano /etc/fstab
Fill in the above details, and then press CTRL-O to write the file, and then CTRL-X to exit. If all is well, then on rebooting you should be ok. If not, then it may be worth just re-installing - there shouldn't be too many problems with Fedora, normally.

Good luck

mj
 
Old 04-07-2005, 04:19 PM   #11
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Original Poster
Rep: Reputation: 0
Okay, I tried:
Code:
rm /etc/fstab
And it brought back the following:
Code:
rm: Remove regular file /etc/fstab, are you sure?:y
rm: Cannot remove /etc/fstab: read-only filesystem
And about the time you read this I'm working on the output of mount...

Thanks,
-NT
 
Old 04-07-2005, 04:27 PM   #12
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Original Poster
Rep: Reputation: 0
Mount:
Code:
/dev/hda2 on / type ext2 (rw)
none on /proc type proc (rw)
none on /dev pts type devpts (rw, gid=5, mode=620)
usbdvfs on /proc/bus/usb type usbdvfs (rw)
/dev/hda1 on /boot type ext2 (rw)
none on /dev/shm type tmpfs (rw)
There you are...

Do you really need the
Code:
li -ls /
function?

Thanks,
-NT
 
Old 04-07-2005, 04:33 PM   #13
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
Odd - mount seems to think that everything is mounted read/write. Just in case, run
Code:
mount -n -o remount,rw/
The only other option is that you're not logged in as root. Try rm -vf /etc/fstab. No, now that we know that the filesystem exists, don't worry about ls -lh /.

Cheers,

mj
 
Old 04-07-2005, 04:45 PM   #14
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
Looking at the output of mount, your /etc/fstab should be more like
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>                       <dump>  <pass>
proc            /proc           proc    defaults                        0       0
/dev/hda1       /boot           auto    defaults,errors=remount-ro      0       1
/dev/hda2       /               auto    defaults,errors=remount-ro      0       0
/dev/hda3       none            swap    sw                              0       0
EDIT: I'll be busy for the next few hours, so won't be able to help too much for a bit. Good luck with it all though, and if all else fails, you can always reinstall if you have no data on the system.

Cheers,

mj

Last edited by mjrich; 04-07-2005 at 04:51 PM.
 
Old 04-07-2005, 05:21 PM   #15
NTay5
LQ Newbie
 
Registered: Apr 2005
Location: Columbia Heights, MN
Distribution: Fedora Core 2.2.3
Posts: 9

Original Poster
Rep: Reputation: 0
Okay, I tried both...

It said that rw/ was not located in etc/fstab or etc/mtab

I tried:
Code:
rm -vf /etc/fstab
That didn't work either...

Am I like screwed, or what?

Thanks,
-NT
 
  


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
warning: no final newline at the end of /etc/fstab Jeebizz Slackware 2 10-12-2004 02:19 PM
fstab warning demmylls Linux - General 1 09-22-2003 06:09 AM
fstab warning Gordon Slackware 5 04-15-2003 04:41 PM
WARNING: Bad format on line 10 of /etc/fstab thetwin Linux - Newbie 22 03-05-2003 12:55 AM
fstab warning on boot rogleale Linux - Newbie 3 07-20-2002 05:10 PM

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

All times are GMT -5. The time now is 04:25 PM.

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