Server Unable to Boot bcz of /etc/inittab error
Hi,
I have old CentOS 4.6 server and its unable to boot now, I have access to it in Single user mode over KVM and I desperately need help to get it running so that I can take necessary backup, after that I will do OS upgrade and other upgrade such cent os 5.2 etc.. Error I am getting is : Code:
INIT: /etc/inittab["line_number"] : missing action field Prior to this problem, I had upgraded PERL using "CPAN" on my server and added MONIT, for Monit I had added following lines in /etc/inittab as per docs. And it is the only Modification I did to inittab. Code:
#For MONIT Also I had this error lately : Code:
INIT: "X" respawning too fast but now I am unable to boot. Below is my /etc/inittab Code:
# Thankyou! |
If the problem is indeed because of bad Windows line endings, you can quickly convert it to Unix format:
[root@server] dos2unix /etc/inittab If you get a "command not found" then you need to first install the dos2unix utility: [root@server] yum install dos2unix |
Thanx for your insight :)
I had edited it using "vi" and then saved it, isn't it supposed to be in now saved in linux friendly format as saved via linux ? |
No, vi will preserve the DOS/Windows line endings. There maybe a way of forcing vi to save with Unix line endings, I'm not sure. dos2unix is quick and easy :)
|
Unfortunately what I got is single user mode and I can't install dos2unix and most of the things are not available ! no dos2unix available !
|
I quick google turned up the vi answer.
Open the file in vi and: Code:
:set fileformat=unix |
ya, I was also doing googling and before doing anything, I decided to create a backup of inittab but when I did :
cp /etc/inittab /etc/inittab.bak I get error Code:
cannot create regular file : etc/inittab " Read only filesystem Does that means that in single user mode, its readonly mode ? |
Quote:
Are you sure your booting into 'single' mode and not 'emergency' mode? I think everything is mounted read-only in emergency mode. |
Here is the screenshot.. its seems RW
http://img7.imageshack.us/img7/137/consolemount.jpg But why its not working, I want to have a backup before doing anything, moreover if its readonly then can't do anything either ! PS: I tried updating using VI and got error that "Unable to open file for writing" hmm .. just solved the problem by : Code:
mount -o remount -w / |
Kudos..
Vi Trick did the job :) thnx Buddy. I really appreciate your time :) I give you Thank :) |
Glad to hear you got it fixed :)
|
All times are GMT -5. The time now is 12:09 PM. |