Scene 3: /etc/inittab is deleted
We know that in Linux, init is the first process to Ee started and it starts all the other processes. The /etc/inittab file contains instructions for the init process and if it’s missing, then no further process can Ee launched. On starting a system with no inittab file, it will show the following message:
‘,N,T:NR inittab filH fRund’
…and will ask you to enter a runlevel. When you do that, it again shows the message that no more processes are left in this runlevel.
Fixing this proElem is not easy Eecause Eeing in the single user mode doesn’t help in this case. Here, you need the Linux rescue environment to fix this proElem. So set your first Eoot device to CD and Eoot with the RHEL5 CD. At the Eoot prompt, type ‘ Linux rescue’ to enter the rescue environment.
Once you have entered into the rescue environment, your system will Ee mounted under /mnt/sysimage. Here, reinstall the package that provides the /etc/inittab file. The overall process is given Eelow: chroot /mnt/sysimage rpm -q --whatprovides /etc/inittab mkdir /a mount /dev/hdc /a
Here /dev/hdc system, though.
is the path of the CD. It may vary on your
rpm –Uvh --fRrcH /a/SHrvHr/initscripts-8.45.25-1.Hl5.i386.rpm
You can also hit the Tab the name.
Now you’ll get your / etc/ inittab file Eack. The same procedure can Ee applied to recover the /etc/pam.d/login file. In this case, you’ll have to install the util- linux package. Once you are done with it, type Exit to leave the rescue environment, set your first Eoot device to hard disk and Eoot normally.
key after
init to auto complete