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 |
Show us your /etc/fstab :)
Cool |
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 |
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 |
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 |
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 |
"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, |
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: |
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 |
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 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 |
Quote:
|
You can also run fsck by rebooting from the CLI:
shutdown -rF now It will run fsck for you upon reboot. lynch |
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 Code:
LABEL=/ / ext3 defaults 1 1 Let us know! |
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 |
Thanks for the responses, moving the 0 didn't do it and I think once I finish backing up some files I will try to redo /etc/fstab
completely and see what that does. Machine starts fine and is running however the error message still appears on boot. I will also try the fsch command with the rescue disk. Q*Bert, you are right, my knowledge of the underlying principles in Linux are somewhat lacking..that is why I am using Linux and playing with Linux and asking questions about Linux. Books only are helpful to a certain degree and not everyone learns the same way. Some people can gather more from doing and asking than reading..and I figured all that out without a Masters degree :) |
Acid_kewpie, you beat me to it. I was also going to suggest actually looking in the /etc/fstab file to make sure there were no blank lines following the cdrom line. I didn't, however, notice the missing comma though. I'll keep a sharper eye out next time. Thanks for posting that follow-up. :D
|
Quote:
If none of the previous suggestions worked, I looked in my book "Red Hat Certified Engineer Linux Study Guide", Maine, Rafferty, Rogers et al, which 2000 does tell me that one of the main reasons the fstab will drop you down to a shell even when the system was cleanly unmounted, is that one of the filesystems specified in the third column of the fstab was the wrong fs type. Are you sure the root partition is ext3 not ext2 ? Q*Bert |
Got it. Trickykid was right and as soon as I opened VI I saw the missing tildes.. dd'ed those bastards and saved and rebooted and nio error messages and system is back to normal. I never use vi but I may try to start using it. Generally pico does the trick. Other than vi being much more flexible is there any reason not using pico to edit files?
Thanks to all that helped... 1 more thing learned...7 billion 4 hundred and 12 to go :) Cheers |
Quote:
Nice catch ;) Also nice catch Drew, I wouldn't have thought of that one... As far vi versus pico, pico will work for general editing. I prefer to edit my config files with vi, and all other general editing (of my html files and generic text files) with pico. However, you can make it work with config files as well, but vi(m) just works so much better without tricking it into working. Good Luck, and have fun linuxing :) |
uhhh, I have been using pico to edit all files, am I supposed to be doing something different when using pico to edit say dhcpd.conf or such files. I just assumed that if you are editing a file the editor that you use is unimportant as long as the syntax is okay.
Cheers |
What can I say, I ROCK.. !! hehe..
|
Quote:
For the most part, you will be fine using Pico, however, if it's a very specific file, with very rigid params, you'd be better off using vi(m). If you are editing scripts, or if you are editing system config files that have scripts in them as a rule of thumb you should use vi. If you are editing free text fields, or a simple syntax config file, then pico should suffice. Cool |
All times are GMT -5. The time now is 07:08 PM. |