Link to home
Start Free TrialLog in
Avatar of nocinfospan
nocinfospan

asked on

inittab not found Centos

Hi Experts

I am having the error on centos while booting i.e. "inittab not found" . The server was up and running and suddenly blank screen came but i was able to ping the server but couldnt logged into to it so i shut it down and restart but after restarting i got the above error.

So i try some different steps like

1- try to get into the different run levels but every time i got the error no more " "processes left in this runlevel " .
2- try to boot from knoppix live cd.  i used "fdisk -l " and "df -h" commands to check the actual mounted and logical drives, and was able to see them. the solution is to find inintab file into /etc directory or create a new one with required parameters But i coudlnt find /etc directory the whole folder was missing. I tried "fsck " on the drives too but of no avail.

Actually asterisk was installed on that server and all the config files were stored in /etc directory and ofcourse all the other system files too (like fstab , inintab etc ).

any help in this regard would be highly appreciated.

Thanks
Avatar of Mike Patton
Mike Patton
Flag of Australia image

Hi there,

It would seem as though you have suffered some catastrophic failure?  How was you system set up, in terms of volumes?  Was /etc located on the root volume?  Or elsewhere?

Were you logged in and performing any operations at the time of the initial problem?  Were you logged in as root?  Is it possible you did something like erase /etc?

If your entire /etc folder is missing, you are going to have problems.  Do you have backups?  If so, it is time to restore from your most recent backup.  If not...  You might be in for a re-install from scratch (and this time, set up some backups).

Regards,

M.
Avatar of nocinfospan
nocinfospan

ASKER

How was you system set up, in terms of volumes?  
there are two drives /dev/sda1 & /dev/sda2
Was /etc located on the root volume?
its on a root volume

Were you logged in and performing any operations at the time of the initial problem?

no

 Were you logged in as root?  Is it possible you did something like erase /etc?

no
Okay.  Doesn't sound good...

I was going to request a copy of your fstab, but of course that it usually located under /etc...

Can you post the results of a: df -a

And

cat /proc/mounts

Both as root, please.
You can restore inittab from centos or scientificlinux live CD
I'm not sure inittab itself is the problem, as the question reported that the entire /etc structure is missing.
Which means that disk is !@#$%^^
Boot from cd, try fsck while searching for recent backup
@Mike Patton

root@Microknoppix:/home/knoppix# df -a

Dateisystem      1K-Blöcke   Benutzt Verfügbar Verw% Eingehängt auf

rootfs                   0         0         0     - /

proc                     0         0         0     - /proc

sysfs                    0         0         0     - /sys

/dev/sr0           4011486   4011486         0  100% /mnt-system

tmpfs              1650688      1944   1648744    1% /ramdisk

/dev/cloop         9742394   9742394         0  100% /KNOPPIX

unionfs            1650688      1944   1648744    1% /UNIONFS

unionfs            1650688      1944   1648744    1% /usr

unionfs            1650688      1944   1648744    1% /home

tmpfs                10240        60     10180    1% /UNIONFS/var/run

tmpfs                20480      2740     17740   14% /run

tmpfs                10240         0     10240    0% /UNIONFS/var/lock

tmpfs               102400        68    102332    1% /UNIONFS/var/log

tmpfs              2097152         8   2097144    1% /tmp

udev                 20480         4     20476    1% /dev

tmpfs              2097152         0   2097152    0% /dev/shm

devpts                   0         0         0     - /dev/pts

gvfs-fuse-daemon         0         0         0     - /home/knoppix/.gvfs

/dev/sda1        302382384 176082312 110939928   62% /media/sda1

/dev/sda3        211219668    161104 200329156    1% /media/sda3


root@Microknoppix:/home/knoppix# cat /proc/mounts

rootfs / rootfs rw,relatime 0 0

proc /proc proc rw,relatime 0 0

sysfs /sys sysfs rw,relatime 0 0

/dev/sr0 /mnt-system iso9660 ro,relatime 0 0

tmpfs /ramdisk tmpfs rw,relatime,size=1650688k 0 0

/dev/cloop /KNOPPIX iso9660 ro,relatime 0 0

unionfs /UNIONFS aufs rw,relatime,si=51df28d8,noplink 0 0

unionfs /usr aufs rw,relatime,si=51df28d8,noplink 0 0

unionfs /home aufs rw,relatime,si=51df28d8,noplink 0 0

tmpfs /UNIONFS/var/run tmpfs rw,relatime,size=10240k 0 0

tmpfs /run tmpfs rw,relatime,size=20480k 0 0

tmpfs /UNIONFS/var/lock tmpfs rw,relatime,size=10240k 0 0

tmpfs /UNIONFS/var/log tmpfs rw,relatime,size=102400k 0 0

tmpfs /tmp tmpfs rw,relatime,size=2097152k 0 0

udev /dev tmpfs rw,relatime,size=20480k 0 0

tmpfs /dev/shm tmpfs rw,relatime,size=2097152k 0 0

devpts /dev/pts devpts rw,relatime,mode=1777 0 0

gvfs-fuse-daemon /home/knoppix/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0

/dev/sda1 /media/sda1 ext3 rw,nosuid,nodev,relatime,errors=continue,barrier=1,data=writeback 0 0

/dev/sda3 /media/sda3 ext3 rw,nosuid,nodev,relatime,errors=continue,barrier=1,data=writeback 0 0
Okay thanks for that. One last request (I hope).

Can you please give me a dump of:

fdisk -l /dev/sda
Please do
#export LANG=C LC_ALL=C
before running any commands or get English version of knoppix.
FYI :The mount changed to sdb from sda.

root@Microknoppix:# fdisk -l /dev/sdb

Disk /dev/sdb: 584.7 GB, 584652423168 bytes
255 heads, 63 sectors/track, 71079 cylinders, total 1141899264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dfeab

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63   614405924   307202931   83  Linux
/dev/sdb2       614405925   712707659    49150867+  82  Linux swap / Solaris
/dev/sdb3       712707660  1141884134   214588237+  83  Linux
run fsck against the Linux type filesystems...
mount them and see if the biggest one has /etc/inittab...
ASKER CERTIFIED SOLUTION
Avatar of Mike Patton
Mike Patton
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
While in knoppix - check
smartctl -a /dev/sdb
If you get any other system health estimate than:
SMART overall-health self-assessment test result: PASSED
Disk is dead. You may or may not be able to copy data to new disk.

To restore inittab that is missing:
If you manage to boot centos 5 dvd you get into recovery mode (subject to /etc/fstab on same filesystem) with network...
After chroot do:
yum reinstall initscripts