Unix/Linux Go Back    

UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Init scripts missing . . .

UNIX for Dummies Questions & Answers

Closed Linux or Unix Question    
Thread Tools Search this Thread Display Modes
Old Unix and Linux 07-18-2013
jimbob01 jimbob01 is offline
Registered User
Join Date: Oct 2011
Last Activity: 14 November 2013, 3:46 PM EST
Posts: 32
Thanks: 10
Thanked 0 Times in 0 Posts
Init scripts missing . . .

One of our VM machines mysteriously went read-only overnight and as it wasn't being used, thought it would be a good idea to reboot the machine and run fsck on boot, well. . . .. things didn't quite work out that way lol Linux

Anyway, the machine booted up, but mysteriously had no hostname set, thought I would check why and the '/etc/host' file is missing, checked further and it turns out that the 'init.d' folder and ALL the init scripts are missing too, as is 'xinet.d', and probably a host of other files from '/etc'.

Although we have backups, I need to try and get the machine back onto the network so I can copy the files back over . . . . . . question is, is there any way that I can start the network back up without the init scripts ?

Tried the usuals, ifup etc all to no avail - any of you brilliant minds out there any ideas !?

Cheers, Jim
Sponsored Links
Old Unix and Linux 07-18-2013
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
Join Date: Aug 2005
Last Activity: 24 May 2016, 11:40 AM EDT
Location: Saskatchewan
Posts: 21,274
Thanks: 949
Thanked 3,848 Times in 3,588 Posts
You will have to be more specific about 'all the usuals', and especially specific about what you actually did with them, we're pretty much in the dark here. Especially since you didn't tell us what your OS actually is. ifup makes me suspect it's Linux, and if so, you can try giving your system a wholly manual configuration like this:

ifconfig eth0
route add default gw
echo nameserver >> /etc/resolv.conf

...assuming you want it to be on with a gateway of and a DNS server of If you know the IP addresses of everything DNS is optional.
Sponsored Links
Old Unix and Linux 07-19-2013
rbatte1 rbatte1 is offline Forum Staff  
Join Date: Jun 2007
Last Activity: 21 May 2016, 3:19 AM EDT
Location: Lancashire, UK
Posts: 2,496
Thanks: 892
Thanked 445 Times in 400 Posts
We've had a similar problem where an archiving job was failing in the batch with a permissions issue. We changed it to run as root forgetting that it meant a different home directory and therefore an input file was not found. The knock on effect meant that we managed to move /dev, /etc, /opt ...... into an archive area. Very difficult to recover because you could not start a new session (/etc/passwd was not there of course) but with luck someone had a session as root that we could manipulate enough to recover, putting back /etc & /dev first and we could get more people logged on to investigte and restore.

The upshot is that your incident won't have happened by bad luck, sunspots or whatever, there has been an action taken to remove things. It may have been a mis-typed command, or an ill designed batch job where a small change has had catastrophic consequences.

Depending how paranoid your auditing is, you may have logged something, maybe not. We were able to work out what it was based on the time batch jobs started failing to start and the jobs already running, so we got lucky. We also had a bootable image on DVD to restore from if necessary.

Whilst you may be able to recover (or go to your full restore/DR plan) you need to determine what happened to prevent a recurrence.

Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Init vs rc scripts, history, different UNIXes Clovis_Sangrail UNIX for Advanced & Expert Users 4 03-22-2013 08:08 AM
Init scripts for tty's under Fedora 13 druidmatrix Red Hat 1 08-25-2010 04:11 PM
How to I change init levels after typing init 1 z1dane Linux 8 01-06-2010 07:37 PM
Missing init files for zsh and bash maag Solaris 2 05-04-2006 04:37 PM
init scripts on AIX 98_1LE UNIX for Dummies Questions & Answers 2 01-31-2001 10:17 AM

All times are GMT -4. The time now is 11:43 AM.