LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   WARNING: Bad format on line 10 of /etc/fstab (https://www.linuxquestions.org/questions/linux-newbie-8/warning-bad-format-on-line-10-of-etc-fstab-48164/)

thetwin 03-04-2003 01:35 AM

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

MasterC 03-04-2003 01:46 AM

Show us your /etc/fstab :)

Cool

thetwin 03-04-2003 02:10 AM

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

MasterC 03-04-2003 02:37 AM

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

thetwin 03-04-2003 02:44 AM

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

thetwin 03-04-2003 02:47 AM

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.

:newbie: :o

membrax 03-04-2003 02:54 AM

"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,

thetwin 03-04-2003 04:16 PM

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

:confused:

MasterC 03-04-2003 04:18 PM

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

Q*Bert 03-04-2003 04:21 PM

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!

membrax 03-04-2003 04:27 PM

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. :D

trickykid 03-04-2003 04:30 PM

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.

lynch 03-04-2003 04:35 PM

You can also run fsck by rebooting from the CLI:
shutdown -rF now
It will run fsck for you upon reboot.
lynch

trickykid 03-04-2003 04:35 PM

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!

acid_kewpie 03-04-2003 04:41 PM

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


All times are GMT -5. The time now is 11:18 PM.