INIT: No inittab file found
Hi all, I am really very surprized but at booting my Linux says "INIT: No inittab file found" and suggests me to choose a runlevel. I choosed runlevel s, and after a checking there is really no inittab file in my /etc/ folder. I haven't done anything "illegal", just was playing with the initscripts and everything was fine, and for sure it is immpossible that I have removed it by mistake. Any suggestions? Regards, -- Sergey Mkrtchyan Scientific Researcher Department of Molecular Physics, Faculty of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89
Sergey Mkrtchyan wrote:
I am really very surprized but at booting my Linux says "INIT: No inittab file found" and suggests me to choose a runlevel. I choosed runlevel s, and after a checking there is really no inittab file in my /etc/ folder.
joe@jmorris:~> rpm -qf /etc/inittab aaa_base-10.1-41 Try reinstalling aaa_base -- Joe Morris Registered Linux user 231871
On Tuesday 23 May 2006 17:54, Sergey Mkrtchyan wrote:
I haven't done anything "illegal", just was playing with the initscripts and everything was fine, and for sure it is immpossible that I have removed it by mistake.
Any suggestions? Yes... pay attention and don't delete by mistake next time... ;-)
Honestly, ... oh never mind. ... wait, wait, I can't stand it... let's see... "I was just playing with the init scripts..." Look mom, no hands... I wasn't doing anything illegal... just playing with a stick of di-no-mite and I just can't figure it out... now I don't have any hands.... ... any suggestions? -- Kind regards, Mark H. Harris <>< harrismh777@earthlink.net
Mark H. Harris wrote:
Yes... pay attention and don't delete by mistake next time... ;-)
I wrote "for sure it is immpossible that I have removed it by mistake", means I really really didn't write something like bash# rm /etc/inittab
Honestly, ... oh never mind. ... wait, wait, I can't stand it... let's see... "I was just playing with the init scripts..."
Agreed...not correct formulation(and much about fun, ok), but I wasn't playing with it's default files. As in other thread you can see, Leendert helped me to execute a script each time at booting, which is written on the basis of skeleton, and it is nothing else, but script which simply writes some info in .log file each time at booting.
Look mom, no hands... I wasn't doing anything illegal... just playing with a stick of di-no-mite and I just can't figure it out... now I don't have any hands.... ... any suggestions?
Very funny... -- Sergey Mkrtchyan Scientific Researcher Department of Molecular Physics, Faculty of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89
On Wednesday 24 May 2006 21:32, Sergey Mkrtchyan wrote:
Mark H. Harris wrote:
Yes... pay attention and don't delete by mistake next time... ;-)
I wrote "for sure it is immpossible that I have removed it by mistake", means I really really didn't write something like
bash# rm /etc/inittab
Honestly, ... oh never mind. ... wait, wait, I can't stand it... let's see... "I was just playing with the init scripts..."
Agreed...not correct formulation(and much about fun, ok), but I wasn't playing with it's default files. As in other thread you can see, Leendert helped me to execute a script each time at booting, which is written on the basis of skeleton, and it is nothing else, but script which simply writes some info in .log file each time at booting.
Well, the 'stick of di-no-mite' is merely another name for 'being root'. I was playing with di-no-mite a few days ago, and trashed /etc and /bin on my dns/dhcp/fun server. Result: I could not even become root. Look, mam! No hands! Oh, well, I did have plans to upgrade to 10.1, so that was a nice time do do it. ;) Moral: everybody can make a mistake as root. Better avoid being root. :P Playing with initscripts: how much can you do without being root? 'FOO start' and 'FOO stop' probably work as a normal user (at least my example would). No need to do insserv to test the workings of that script. Need to be root? Use 'su FOO start', and type the password for root. That makes you think twice, hopefully. Or not. ;P (Can't remember putting '> /etc/inittab' or so in my example...) What does 'grep inittab /root/.bash_history' say? Cheers, Leen
Leendert Meyer wrote:
Moral: everybody can make a mistake as root. Better avoid being root. :P
Playing with initscripts: how much can you do without being root? 'FOO start' and 'FOO stop' probably work as a normal user (at least my example would). No need to do insserv to test the workings of that script. Need to be root? Use 'su FOO start', and type the password for root. That makes you think twice, hopefully. Or not. ;P I do agree with you, but there is some kind of thought that if I do something as a simple user, which requires root password, I will enter it(even after a second thought), otherwise you will never know that you shouldn't have done so...;)
(Can't remember putting '> /etc/inittab' or so in my example...)
there was no such a thing in your post, definetely, and neither I did something when was editing the one you post. By the way a little question about editing...I tried to write in FOO.log something like echo "$(date +%FT%T%z): FOO started by the user $USER" >> /tmp/FOO.log but it didn't get the value for $USER. and writes in file only "date: FOO started by user". Is it possible to get the user who starts FOO?
What does 'grep inittab /root/.bash_history' say?
I am also intrigued to check it, but unfortunately the problem got deeper, now I am not able to even login to Linux...at booting it says INIT: version 2.85 booting INIT: cannot execute "/etc/init.d/boot" INIT: Entering runlevel: 5 INIT: cannot execute "/etc/init.d/rc" (none) login: root(or any another user) login: PAM Failure, aborting: Critical error - immediate abort And booting at a Failsafe mode gives the same... It is already 03.30 night here and I still can't make it to work... -- Sergey Mkrtchyan Scientific Researcher Department of Molecular Physics, Faculty of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89
On Thursday 25 May 2006 00:19, Sergey Mkrtchyan wrote:
Leendert Meyer wrote:
I tried to write in FOO.log something like
echo "$(date +%FT%T%z): FOO started by the user $USER" >> /tmp/FOO.log
but it didn't get the value for $USER. and writes in file only "date: FOO started by user". Is it possible to get the user who starts FOO?
Normally USER should be set to the user's login id. If not, try: user=`id -nu`; echo "$user" I used lowercase becase 1) case matters, and 2) USER is already taken (in use by the system).
What does 'grep inittab /root/.bash_history' say?
I am also intrigued to check it, but unfortunately the problem got deeper, now I am not able to even login to Linux...at booting it says
INIT: version 2.85 booting INIT: cannot execute "/etc/init.d/boot" INIT: Entering runlevel: 5 INIT: cannot execute "/etc/init.d/rc"
Oops. Is /etc/init.d emptied?
(none) login: root(or any another user) login: PAM Failure, aborting: Critical error - immediate abort
And booting at a Failsafe mode gives the same... It is already 03.30 night here and I still can't make it to work...
Try 'init=/bin/bash' at the boot prompt. That gives you a shell to work in. Nothing fancy, no services are started, etc. Maybe the easiest would be to re-install, after you've saved your precious files (if any). Take care, don't rush. ;) I'm at 1:30 here, so I'm off to bed. Cheers, Leen
Leendert Meyer wrote:
Normally USER should be set to the user's login id. If not, try:
user=`id -nu`; echo "$user"
I used lowercase becase 1) case matters, and 2) USER is already taken (in use by the system). Thank you so much! I really liked bash scripting, collected a lot of documentation to dig in ;) What does 'grep inittab /root/.bash_history' say? file inittab cat inittab joe /etc/inittab & cat /etc/inittab cat /etc/inittab cat /etc/inittab | grep X11 cat /etc/inittab | grep fdm joe /etc/inittab
I was using joe, only to change the default runlevel. So seems nothing unusual which could harm the files.
INIT: version 2.85 booting INIT: cannot execute "/etc/init.d/boot" INIT: Entering runlevel: 5 INIT: cannot execute "/etc/init.d/rc"
Oops. Is /etc/init.d emptied? I checked...Yes :( One thing really dissapoints me, that it came "just from nowhere", I checked all the .bash_history and nothing (as far as I understand) which can be destructive. Maybe I have done something indirect which caused that. Try 'init=/bin/bash' at the boot prompt. That gives you a shell to work in. Nothing fancy, no services are started, etc.
Maybe the easiest would be to re-install, after you've saved your precious files (if any). Take care, don't rush. ;) Seems that I will have to spend this Sunday on that... Anyway, thank you very much Leendert, you helped me lot and inspired me to go deeper(or higher, if from point of view of learning curve;)) with bash scripting.
Regards, -- Sergey Mkrtchyan Scientific Researcher Department of Molecular Physics, Faculty of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2006-05-26 at 23:07 +0500, Sergey Mkrtchyan wrote:
What does 'grep inittab /root/.bash_history' say? file inittab cat inittab joe /etc/inittab & <====== cat /etc/inittab cat /etc/inittab cat /etc/inittab | grep X11 cat /etc/inittab | grep fdm joe /etc/inittab
I was using joe, only to change the default runlevel. So seems nothing unusual which could harm the files.
What would happen running an editor in background? Would it save an empty file somehow? :-? - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEd0XXtTMYHG2NR9URAgryAKCObDPAE9pbyXtTjt7JkwSdlU1pJACgi9w/ XyDe2v36T282csg+ivkXhVg= =7JK/ -----END PGP SIGNATURE-----
Carlos E. R. wrote:
What does 'grep inittab /root/.bash_history' say? file inittab cat inittab joe /etc/inittab & <====== cat /etc/inittab cat /etc/inittab cat /etc/inittab | grep X11 cat /etc/inittab | grep fdm joe /etc/inittab
I was using joe, only to change the default runlevel. So seems nothing unusual which could harm the files.
What would happen running an editor in background? Would it save an empty file somehow?
:-?
Hmmm...you are right, maybe, but after that I was using it for a long time...in the last "joe" one I just changed default runlevel from 5 to 3 and it was working perfectly for over a week. Besides now there is no /etc/init.d folder at all, after it's "INIT: No /etc/inittab file found" I did bash# fsck.reiserfs /dev/hda6 --rebuild-tree maybe this was the reason for the /etc/init.d to isappear? regards, -- Sergey Mkrtchyan Scientific Researcher Department of Molecular Physics, Faculty of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2006-05-27 at 02:28 +0500, Sergey Mkrtchyan wrote:
What would happen running an editor in background? Would it save an empty file somehow?
: -?
Hmmm...you are right, maybe, but after that I was using it for a long time...in the last "joe" one I just changed default runlevel from 5 to 3 and it was working perfectly for over a week.
You can edit the same file with two editor sesions. If you did not reboot the computer in that time, it could be... that sleeping joe would not quit till halting the computer. What would it do? Mmm, no. I have just simulated that process: joe somefile & joe somefile killall joe and the file didn't suffer damage. Maybe it happened some other way.
Besides now there is no /etc/init.d folder at all, after it's "INIT: No /etc/inittab file found" I did bash# fsck.reiserfs /dev/hda6 --rebuild-tree maybe this was the reason for the /etc/init.d to isappear?
Hum! perhaps the file was damaged before, dissapeared, and the rebuild finished it off. You will have to restore those files from the rpms... - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD4DBQFEd5EMtTMYHG2NR9URAvmtAJ94YltqA8dF6c88b4Ebwp+Vi5nMiQCYoaxy RY/5COnrKBqcNn9MakiEXQ== =XBgr -----END PGP SIGNATURE-----
On Friday 26 May 2006 23:28, Sergey Mkrtchyan wrote:
in the last "joe" one I just changed default runlevel from 5 to 3 and it was working perfectly for over a week.
Then joe is not to blame. ;)
Besides now there is no /etc/init.d folder at all, after it's "INIT: No /etc/inittab file found" I did bash# fsck.reiserfs /dev/hda6 --rebuild-tree maybe this was the reason for the /etc/init.d to isappear?
They (the names) both start with 'init'. A coincedent? I believe (no proof for that) that /etc/inittab and /etc/init.d/ were destroyed in the same process, what ever that may be. Restoreing all the missing files in /etc from rpms, as Carlos suggested, is quite a task. Perhaps it would be simpler and easier to do a fresh install? I don't know if that is an option, and if you need to save some files first? Cheers, Leen
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2006-05-29 at 16:08 +0200, Leendert Meyer wrote:
Restoreing all the missing files in /etc from rpms, as Carlos suggested, is quite a task.
Indeed it is. Recently a method was posted for such a case, but what he lost was /opt and his system was running: Date: Tue, 23 May 2006 16:59:03 -0400 From: Matt Standish Subject: Re: [SLE] Suse 10.1 /opt and yast2-ncurses ... #!/bin/bash for each in $(rpm -qa); do echo $each: rpm -ql $each |grep '/opt' done; Then copied the rpm names to a file and then did this: #!/bin/bash for each in $(cat filelist); do rpm -UFvh --force ftp://chuck.ucs.indiana.edu/linux/opensuse/distribution/SL-10.1/inst-source/suse/i586/$each.i586.rpm done; Another possibility would be via "rpm --verify". But the main problem is that the system is not running; thus, the OP would have to boot the rescue system, mount the old root, chroot, then operate.
Perhaps it would be simpler and easier to do a fresh install? I don't know if that is an option, and if you need to save some files first?
It would also be possible to install anew in another partition, then copy over all those files. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEe0LHtTMYHG2NR9URAtefAJ41siTGk4LjE7CXeHdMuidHKmLzvQCcCASz Wrh3eR3Bm89q3fjZ9FCMPNA= =BpJB -----END PGP SIGNATURE-----
Leendert Meyer wrote:
Perhaps it would be simpler and easier to do a fresh install? I don't know if that is an option, and if you need to save some files first?
Oh, horror just finished... You can't imagine what that "simpler and easier" became during the fresh install. I was able to get my hard drive to University, connected it to another Linux machine, and successfully copied my files to that one. But after getting it back home, none of my OS won't start at all, reinstalling Linux went well, but it was impossible to reinstall Windows(it was continuously restarting). I was nearly on the edge all the night(in the morning I had to present them) trying to get out my works from that machine, and finally managed to get them to Linux to work on them. What was the most funny (now...it was horrible at that time) that only an hour before presentation I was panicly making it in OpenOffice and it wasn't an easy thing to do, and I have to accept that from the "office point of view" it is very hard to switch from Windows to Linux. Fortunately diploma passed successfully. That was my first experience with making presentations in Linux...such an extreme! Best Wishes, Sergey -- Sergey Mkrtchyan Scientific Researcher Department of Molecular Physics, Faculty of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2006-05-31 at 02:35 -0700, Sergey Mkrtchyan wrote:
What was the most funny (now...it was horrible at that time) that only an hour before presentation I was panicly making it in OpenOffice and it wasn't an easy thing to do, and I have to accept that from the "office point of view" it is very hard to switch from Windows to Linux.
It is certainly difficult and not funny if you are in a hurry to get something done for your employer or similar. Not the best time to try new software as complex as OOo. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEfMS+tTMYHG2NR9URAiPnAJ499sZkD5Oyr9p9RXguA3k9CrkTPQCfZKJj 7yFg5rQOWShtIXS7hIYUang= =UI35 -----END PGP SIGNATURE-----
On Wednesday 31 May 2006 11:35, Sergey Mkrtchyan wrote:
Leendert Meyer wrote:
Perhaps it would be simpler and easier to do a fresh install? I don't know if that is an option, and if you need to save some files first?
Oh, horror just finished... [snipping horror story ;) ]
In hindsight, a USB Pen drive might be handy for backups of precious data... Save it on HD, and save it on USB-Pen. They're not that expensive.
Fortunately diploma passed successfully.
Congratulations!
That was my first experience with making presentations in Linux...such an extreme!
And memorable. ;) Cheers, Leen
Leendert Meyer wrote:
In hindsight, a USB Pen drive might be handy for backups of precious data...
Save it on HD, and save it on USB-Pen. They're not that expensive.
I didn't have it before diploma, but bought it just after diploma defending(and that was a "salary day", luckily). You hit the right point :D
Fortunately diploma passed successfully.
Congratulations!
Thank you so much! Now I am relatively free to dig in to Linux ;)
That was my first experience with making presentations in Linux...such an extreme!
And memorable. ;)
Yes! One thing only left: I didn't know where to put it, to 'good' or 'bad' shelf :D Thank you Regards, -- Sergey Mkrtchyan Scientific Researcher Department of Molecular Physics, Faculty of Physics, Yerevan State University Tel: (374-10) 55-43-41 Fax: (374-10) 57-76-89 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
participants (6)
-
Carl Hartung
-
Carlos E. R.
-
Joe Morris (NTM)
-
Leendert Meyer
-
Mark H. Harris
-
Sergey Mkrtchyan