version 1.0.0, 2014-07-04 : Initial version
How to simply recover a lost inittab file
How to recover a lost /etc/inittab file on Centos or RHEL?If you’ve lost your /etc/inittab
in a RHEL or Centos environement, recovering
it is quite easy:
-
Boot to single user mode (eg: add "single" at the end of your grub options)
-
Mount your cdrom or iso to /mnt (
mount -r /dev/cdrom /mnt
) -
Find which package provides inittab (
yum -q --whatprovides /etc/inittab
) -
Go to /mnt and find your rpm package which is actually "initscripts" (
find /mnt -name '*initscripts*'
) -
Reinstall your the corresponding package which, for centos 6.5 is located in the
Packages
subdirectory if the cd. (rpm -Uv --noscripts --force /mnt/Packages/initscripts-*.rpm
)