0

I know this is really bad, but I have accidentally deleted the init.d folder from my system. I am using VMWare player to load Ubuntu 14.04 LTS. Now my system is not starting properly. I don't have CD to boot from.

Can anyone tell me how to get this folder back by any means?

Jens Erat
  • 5,051
  • 7
  • 31
  • 37
mojo
  • 1

1 Answers1

3

Boot into single user mode, set up networking (use dhclient, or ip commands, depending on whether you use DHCP or static addresses) and run this command:

dpkg -S /etc/init.d

It will list all the packages which own files in that directory. Reinstall them all using apt-get install --reinstall either manually copying the names, or using this command:

dpkg -S /etc/init.d | sed -e 's/,//g' -e 's;: /etc/init.d$;;' | xargs apt-get install --reinstall
muru
  • 197,895
  • 55
  • 485
  • 740