System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

/etc/inittab is corrupt, not sure what to do

 
SOLVED
Go to solution
Highlighted
Eric Bakken
Regular Advisor

/etc/inittab is corrupt, not sure what to do

I cant boot into anything but single user mode because it says my /etc/inittab is corrupt. It wont let me vi it, more it or cat it... when i cat it, nothing comes up so maybe it got trashed?

is there a way i can get or create a new one without restoring and older backup?
8 REPLIES 8
Highlighted
Raj D.
Honored Contributor
Solution

Re: /etc/inittab is corrupt, not sure what to do

Hi Eric ,
Seems you have corrupted inittab .
You needs to boot in single user mode and copy it from backup place.

ISL> hpux -is
Activate vg00
fsck all lvols
mount the lvols.

check for your backup copy of inittab, if available replace.

Hope this will help.

Cheers,
Raj.
---
" If u think u can , If u think u cannot , - You are always Right . "
Highlighted
James R. Ferguson
Acclaimed Contributor

Re: /etc/inittab is corrupt, not sure what to do

Hi Eric:

I'd restore a backup copy. You can use an Ignite recovery tape and restore only the file in question, or you can restore if from another backup.

Some restoration methods will require you to mount '/usr' since things like 'mt' live there. Most other tools have '/sbin' binaries --- 'tar', 'fbackup', for instance.

If you use an Ignite tape, mount '/usr' for /usr/bin/mt, and do:

# mt -t /dev/rmt/0mn fsf 1
# tar -xvf /dev/rmt/0m /etc/inittab

This may take some time to extract, so be patient.

Regards!

...JRF...
Highlighted
James R. Ferguson
Acclaimed Contributor

Re: /etc/inittab is corrupt, not sure what to do

Hi (again) Eric:

Ah, I just remembered that there is another work-around. There should be a workable, "virgin" that may suit your needs for getting your system back up more quickly. You should find:

/usr/newconfig/etc/inittab

Copy it as '/etc/inittab', and fix it up for your needs.

Regards!

...JRF...
Highlighted
Raj D.
Honored Contributor

Re: /etc/inittab is corrupt, not sure what to do

Hi Eric ,

Here is a sample of /etc/inittab file of hpux 11i , but suggested to restore your original from backup , to keep your configuration unchanged.


$ cat /etc/inittab
init:4:initdefault:
ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1
pwr::sysinit:/sbin/emcpstartup /dev/console 2>&1 # PowerPath
tape::sysinit:/sbin/mtinit > /dev/console 2>&1
muxi::sysinit:/sbin/dasetup /dev/console 2>&1 # mux init
stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar vxen::bootwait:/sbin/fs/vxfs/vxenablef -a
vol1::sysinit:/sbin/init.d/vxvm-sysboot /dev/console 2>&1 ##vxvm
vol2::sysinit:/sbin/init.d/vxvm-startup start /dev/console 2>&1 ##vxvm
brc1::bootwait:/sbin/bcheckrc /dev/console 2>&1 # fsck, etc.
link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon; \
/sbin/ln /dev/systty /dev/syscon" >/dev/console 2>&1
cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon # legal req
sqnc::wait:/sbin/rc /dev/console 2>&1 # system init
#powf::powerwait:/sbin/powerfail >/dev/console 2>&1 # powerfail
cons:123456:respawn:/usr/sbin/getty console console # system console
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
#ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
krsd:123456:respawn:/sbin/krsd -i
sfd:123456:respawn:/sbin/sfd
#ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf
----------------

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Highlighted
Eric Bakken
Regular Advisor

Re: /etc/inittab is corrupt, not sure what to do

so far i've tried replacing the inittab file with the backup file that you told me about... it seemed to work but then the startup hangs on
dns subsytem. I'm trying to do the recovery right now and we'll see how that works.

thanks,

-eric
Highlighted
Eric Bakken
Regular Advisor

Re: /etc/inittab is corrupt, not sure what to do

The Frecover didn't seem to do anything... but I tried booting again and it took me like an hour for it to boot. which is a long time. it is up now but seems to be running very slow. thanks for helping me replace my inittab,

-Eric
Highlighted
Steven E. Protter
Exalted Contributor

Re: /etc/inittab is corrupt, not sure what to do

Shalom Eric,

What has probably happened is some customization that was done to your /etc/inititab is not there any more.

This has to do with the backup source.

If there is a recent ignite tape before the pro blem, you should be able to read this one file back.

An alternative is to pick an inittab from a similar system.

You might want to run cstm or mstm or xstm and check this systems hardware. What trashed the inittab file in the first place may be a symptom of something far worse that you want to catch before your system halts completely.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Highlighted
James R. Ferguson
Acclaimed Contributor

Re: /etc/inittab is corrupt, not sure what to do

Hi Eric:

I'm glad the 'frecover' worked for you. The process is silent unless you run it with the -v' and/or '-m' switches. Have a look at the 'frecover(1M)' man pages for more information, the next time you use it.

Regards!

...JRF...