How to resolve error "INIT: Cannot stat /etc/inittab, errno: 2"

Hi All,

I am getting an error message when I execute command �zlogin -C sunsrv4z5� on my root server.
[Connected to zone 'sunsrv4z5' console]

INIT: Cannot stat /etc/inittab, errno: 2

INIT: Cannot stat /etc/inittab, errno: 2

As per my analysis it seems that some files inside /etc folder are deleted.
This server was running fine until yesterday. However, it seems that some files inside /etc or any other relevant files were deleted .

My root server details, (where I am trying to execute the login command) as given by "uname -a" command are as follows:
SunOS sunsrv4 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Fire-480R

Can you please help me how to restore the files back & to fix this issue ??

Thanks in advance.

Surbhit

If you got a copy of the files/backup of the zone/zfs snapshot, then you can just copy the files back when your inside the global zone.
Just do:
cp file /path/to/zone/sunsrv4z5/.....

Hi,

I have not explicitly created the backup of the zone.

I do have some other zones created on my root server.
Can I copy the files of other zones & modify the content inside it to map it to corresponding zone , so as to get back the missing files/data ??
Is it possible to do that. ??

You can try, look inside the file and compare it to the other zones, if the are any zone specific changes.

Thanks,

I have never worked as a UNIX administrator. Can you please help me which path\files I should look into....

Your help will be of gr8 help to me.

The most obvious in your case is /etc/inittab.
It should be identical to the one in your global zone.

Hi,

On my root server, at /etc, inittab is a file not a directory.
Am not able to make out the chnages I should do over there.

Have copied the contents of inittab file in the attachment "inittab_file.txt".

What makes you think it should be a directory ?

What changes did you attempt and how did they fail ?

Hi,
I thought it to be a directory wherein I could compare the contents between two zones; one which giving error & one which is working fine.

But, after realizing that its a file, I looked into its contents. However, i could not make out the changes I should do over there.
Theres just 4 uncommented lines, as attached in my previous thread.
For ur quick ref, they are:
ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -f /etc/sock2path
smf::sysinit:/lib/svc/bin/svc.startd >/dev/msglog 2<>/dev/msglog </dev/console
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog

I am not able to get any clue, what should I modify.:confused: Can you please help me with that.

Repeating myself:

  • What changes did you attempt and how did they fail ? (what command did you run, what error message did you get)
  • Both of these files should be identical.

Hi,

We tried to uninstall an application on the host(sunsrv4z5) by running a script which came along with the application. This was the first time, we ran that script. After running the script, the console hanged. When I again tried logging onto my zone, its not getting connected & an alert message prompts "Network error: Connection refused".

So, I tried to connect the zone with the help of root server.

However, I get following message, when I execute command �zlogin -C sunsrv4z5� on my root server.
[Connected to zone 'sunsrv4z5' console]

INIT: Cannot stat /etc/inittab, errno: 2

When u say,
Both of these files should be identical.

Which two files are you referring to ?? Am confused..
I am connected to the root server, and there is one file /etc/inittab

I'm referring to /etc/inittab in the global zone and that very same file in the faulty zone zonepath.

Can you log in to that zone without using the "-C" option ?

Hi,
I am not able to connect to my zone even without -C option. Connection to my zone closes in fraction of a second.
When I execute, "zlogin sunsrv4z5" command, I get following output.

[Connected to zone 'sunsrv4z5' pts/7]
[Connection to zone 'sunsrv4z5' pts/7 closed]

Is there any other way to connect to my zone.

You don't need to log in to your non global zone in order to fix its file system. It is already available from the global zone.

1 Like

Thats gr8.
I just figured out the path where all my zones are located. Its at
/export/home/zone/

All my zones are inside above directory, as individual directories.

I will try to copy the files of etc from any other working zone to the problematic one. I think, it should work then.

Thanks Guys 4 all ur help.