LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 03-04-2003, 02:35 AM   #1
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Rep: Reputation: 15
WARNING: Bad format on line 10 of /etc/fstab


Hello

after unsuccessfully trying to install a second hard drive, I am getting these errors even though I have removed the drive and all references to it in /etc/fstab. At first I could not even boot the system as it kept dropping me to a shell with

Repair filesystem 1 #

Now I am able to boot the machine but I am getting these errors

WARNING: Bad format on line 10 of /etc/fstab
WARNING: Bad format on line 11 of /etc/fstab

twice in the boot sequence, first after "checking root filesystem" and then same 2 messages after "checking filesystems"

I have double checked /etc/fstab and cannot see any errors

I am unsure of how to repair this and any help would be appreciated.

Cheers
 
Old 03-04-2003, 02:46 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Show us your /etc/fstab

Cool
 
Old 03-04-2003, 03:10 AM   #3
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Original Poster
Rep: Reputation: 15
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner kudzu 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner kudzu,ro 0
0

exactly like that

Cheers
 
Old 03-04-2003, 03:37 AM   #4
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Bring that last '0' up one row. Although that's nine, let's see what happens. Also, do you have a copy of what it looked like before?

Anyway, now it should look like this (after moving up the 0):
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner kudzu 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner kudzu,ro 0 0



Cool
 
Old 03-04-2003, 03:44 AM   #5
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks, I'll give that a try. I was worried I did something when it kept dropping me to the line.

Repair filesystem 1 #

Being kinda new I did not know what to type and am still unsure of how I got back in. I think by typing login. Very frustrating and most of the places I search refer to full RH installs and this one is a firewall so I tried not to install anything not needed..anywhoo onward and upward. Still a blast to play with.

Cheers
 
Old 03-04-2003, 03:47 AM   #6
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Original Poster
Rep: Reputation: 15
oops

Sorry forgot to answer the question, No I don't have a copy but after last night I will try to back up everything I can.

 
Old 03-04-2003, 03:54 AM   #7
membrax
Member
 
Registered: Nov 2002
Location: 50'48''N - 4'21''E
Distribution: SuSE7.1 - SuSE8.1 - SuSE8.2 - RH6.2 - RH7.1 - RH7.3 - RH8.0 - RH9.0 - Fedora Core 1
Posts: 281

Rep: Reputation: 30
"Repair filesystem 1 #"

Got the same message later, one or two days ago.

Type "fsck /dev/hda1" without the quotes of course
It'll then check the integrity of your files and some kind of stuff.

When finished, do the same for /dev/hda2
... and maybe any other partition :
/dev/hda3
/dev/hda4

... or any other drive :
/dev/hdb1
/dev/hdb2

Give it a try, will fix some defect 'inodes"

Have fun,
 
Old 03-04-2003, 05:16 PM   #8
thetwin
Member
 
Registered: Feb 2003
Distribution: Linux RedHat 7.2
Posts: 47

Original Poster
Rep: Reputation: 15
hmmm when I try to run fsck /dev/hda1 I get this kinda ominus warning

WARNING: Bad format on line 10 of /etc/fstab
WARNING: Bad format on line 11 of /etc/fstab

/dev/hda1 is mounted

WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage

Do you really want to continue y/n

 
Old 03-04-2003, 05:18 PM   #9
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
NO...

Do not run fsck on a mounted partition. Either boot up with a rescue disc or another distro, or knoppix and run it with that if you choose.

So moving the 0 didn't help then?

Cool
 
Old 03-04-2003, 05:21 PM   #10
Q*Bert
Member
 
Registered: Feb 2003
Location: Birmingham, UK
Distribution: Redhat 8.0, Immunix 7.0 a few others
Posts: 222

Rep: Reputation: 30
Sorry to butt in, but thetwin you really need to look at a book for this stuff, as there are some underlying concepts you need to know such as how the linux boots up etc.

You won't be dissappointed by investing in a good book - I still have all of my linux books and I use at least one of them at least once a day!
 
Old 03-04-2003, 05:27 PM   #11
membrax
Member
 
Registered: Nov 2002
Location: 50'48''N - 4'21''E
Distribution: SuSE7.1 - SuSE8.1 - SuSE8.2 - RH6.2 - RH7.1 - RH7.3 - RH8.0 - RH9.0 - Fedora Core 1
Posts: 281

Rep: Reputation: 30
I used the command fsck /dev/hda1 which was a mounted partition, and (hopefully it seems) it ran nicely.

But if MasterC tells not to do it, just one advice : DO NOT DO IT.

Everyone knows that the advices coming from MasterC are always more than worthy. So I suggest to follow his advice.
 
Old 03-04-2003, 05:30 PM   #12
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by Q*Bert
Sorry to butt in, but thetwin you really need to look at a book for this stuff, as there are some underlying concepts you need to know such as how the linux boots up etc.

You won't be dissappointed by investing in a good book - I still have all of my linux books and I use at least one of them at least once a day!
I don't know about you but this is a legitimate question and not that common. I would understand telling him to get a book or search if he was asking how to list files in a directory or copy files, something very basic. But we shouldn't tell members to just read a book to get their answer, that is not what this site is for, especially on a question like this.
 
Old 03-04-2003, 05:35 PM   #13
lynch
Member
 
Registered: Nov 2000
Location: A Mid-Atlantic state
Distribution: SuSE 8.1,Knoppix 3.2,Mandrake 9.1
Posts: 388

Rep: Reputation: 30
You can also run fsck by rebooting from the CLI:
shutdown -rF now
It will run fsck for you upon reboot.
lynch
 
Old 03-04-2003, 05:35 PM   #14
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
If your familiar with vi try bringing up the file by typing vi /etc/fstab, it should look something like this:
Code:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner kudzu 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner kudzu,ro 0 0
~
~
~
What you would be looking for is the ~ at the end. Are there any lines below the last /dev/cdrom.... that don't have a ~, which would look something like this:
Code:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner kudzu 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner kudzu,ro 0 0


~
~
If so, try placing your block cursor as far down as you can go where there aren't any ~ and press dd to delete the lines. This might be the cause of your system recognizing lines that aren't really there with possibly a character that is not visible in the plain text file. Not sure if this will work, but you can always try renaming your old fstab file and rebuilding it, copying the contents you have in the old one to a new one..

Let us know!
 
Old 03-04-2003, 05:41 PM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
either everyone else or I am missing somethign here:

/dev/cdrom /mnt/cdrom iso9660 noauto,owner kudzu,ro 0 0

should read

/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
 
  


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
[mtent] line 7 in /etc/fstab is bad (CD Drives wont Mount) shof515 Linux - Hardware 1 11-24-2005 09:57 AM
Bad line in fstab dubya Fedora 2 06-19-2005 03:49 PM
WARNING: /etc/fstab not working NTay5 Linux - Software 17 04-07-2005 06:36 PM
fstab warning demmylls Linux - General 1 09-22-2003 07:09 AM
fstab warning Gordon Slackware 5 04-15-2003 05:41 PM


All times are GMT -5. The time now is 07:07 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration