Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I deleted /etc/rc0.d and /etc/rc1.d and I don't know what I lost. I know this is where my auto-start script live. Is there anyway to get these directories back? Also, there seems to be 4 or so other etc/rc?.d directories that are remaining. Are any of these backups? Will my system survive?

update: I restarted my system, now it won't load past the purple Ubuntu screen. I'm using Ubuntu 12.04.

share|improve this question
    
Ok. I'm up and running again, but those directories are still gone. –  Guided33 Jun 11 '12 at 3:59
    
The files in those directories are all symbolic links to scripts in init.d (normally). It depends on what you have installed. If you want to make links (pretty easy), I can list the ones for a fairly plain 12.04 install I have in a virtual machine, but you may not get everything correct. –  Marty Fried Jun 11 '12 at 4:44
    
@MartyFried that would be great. If you cold do that for me. I figured they were all pretty much links. If you want to list them as an answer I'll accept it. –  Guided33 Jun 11 '12 at 4:57

1 Answer 1

up vote 0 down vote accepted

The number relate to levels, where it used to be that only levels over 3 were GUI, and the lower levels had less stuff loaded. Now, it seems that this has been mostly abandoned, at least with Ubuntu. So, some of them are duplicates. You can switch levels by using the "init" command, followed by the level, like init 3 runs the scripts in rc3.d. init 0 shuts down, and init 6 restarts.

If I have any links that don't have a script in your init.d directory, they can probably be safely omitted.

Here are all of my directories:

$ ll rc*.d
rc0.d:
total 20
drwxr-xr-x   2 root root  4096 May 16 09:15 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
lrwxrwxrwx   1 root root    29 May 16 08:46 K10unattended-upgrades -> ../init.d/unattended-upgrades*
lrwxrwxrwx   1 root root    27 May 16 08:46 K20speech-dispatcher -> ../init.d/speech-dispatcher*
lrwxrwxrwx   1 root root    32 May 16 09:15 K20virtualbox-guest-utils -> ../init.d/virtualbox-guest-utils*
lrwxrwxrwx   1 root root    25 May 16 09:12 K65vboxadd-service -> ../init.d/vboxadd-service*
lrwxrwxrwx   1 root root    17 May 16 09:09 K70vboxadd -> ../init.d/vboxadd*
lrwxrwxrwx   1 root root    21 May 16 09:12 K70vboxadd-x11 -> ../init.d/vboxadd-x11*
-rw-r--r--   1 root root   353 Apr 14 02:26 README
lrwxrwxrwx   1 root root    18 May 16 08:46 S20sendsigs -> ../init.d/sendsigs*
lrwxrwxrwx   1 root root    17 May 16 08:46 S30urandom -> ../init.d/urandom*
lrwxrwxrwx   1 root root    22 May 16 08:46 S31umountnfs.sh -> ../init.d/umountnfs.sh*
lrwxrwxrwx   1 root root    20 May 16 08:46 S35networking -> ../init.d/networking*
lrwxrwxrwx   1 root root    18 May 16 08:46 S40umountfs -> ../init.d/umountfs*
lrwxrwxrwx   1 root root    20 May 16 08:46 S60umountroot -> ../init.d/umountroot*
lrwxrwxrwx   1 root root    14 May 16 08:46 S90halt -> ../init.d/halt*

rc1.d:
total 20
drwxr-xr-x   2 root root  4096 May 16 09:15 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
lrwxrwxrwx   1 root root    20 May 16 08:46 K15pulseaudio -> ../init.d/pulseaudio*
lrwxrwxrwx   1 root root    22 May 16 08:46 K20acpi-support -> ../init.d/acpi-support*
lrwxrwxrwx   1 root root    20 May 16 08:46 K20kerneloops -> ../init.d/kerneloops*
lrwxrwxrwx   1 root root    15 May 16 08:46 K20saned -> ../init.d/saned*
lrwxrwxrwx   1 root root    27 May 16 08:46 K20speech-dispatcher -> ../init.d/speech-dispatcher*
lrwxrwxrwx   1 root root    32 May 16 09:15 K20virtualbox-guest-utils -> ../init.d/virtualbox-guest-utils*
lrwxrwxrwx   1 root root    25 May 16 09:12 K65vboxadd-service -> ../init.d/vboxadd-service*
lrwxrwxrwx   1 root root    17 May 16 09:09 K70vboxadd -> ../init.d/vboxadd*
lrwxrwxrwx   1 root root    21 May 16 09:12 K70vboxadd-x11 -> ../init.d/vboxadd-x11*
-rw-r--r--   1 root root   369 Apr 14 02:26 README
lrwxrwxrwx   1 root root    19 May 16 08:46 S30killprocs -> ../init.d/killprocs*
lrwxrwxrwx   1 root root    19 May 16 08:46 S70dns-clean -> ../init.d/dns-clean*
lrwxrwxrwx   1 root root    18 May 16 08:46 S70pppd-dns -> ../init.d/pppd-dns*
lrwxrwxrwx   1 root root    16 May 16 08:46 S90single -> ../init.d/single*

rc2.d:
total 20
drwxr-xr-x   2 root root  4096 May 22 14:27 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
-rw-r--r--   1 root root   677 Apr 14 02:26 README
lrwxrwxrwx   1 root root    20 May 16 08:46 S20kerneloops -> ../init.d/kerneloops*
lrwxrwxrwx   1 root root    27 May 16 08:46 S20speech-dispatcher -> ../init.d/speech-dispatcher*
lrwxrwxrwx   1 root root    32 May 16 09:15 S20virtualbox-guest-utils -> ../init.d/virtualbox-guest-utils*
lrwxrwxrwx   1 root root    17 May 16 09:09 S30vboxadd -> ../init.d/vboxadd*
lrwxrwxrwx   1 root root    21 May 16 09:12 S30vboxadd-x11 -> ../init.d/vboxadd-x11*
lrwxrwxrwx   1 root root    25 May 16 09:12 S35vboxadd-service -> ../init.d/vboxadd-service*
lrwxrwxrwx   1 root root    20 May 16 08:46 S50pulseaudio -> ../init.d/pulseaudio*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50rsync -> ../init.d/rsync*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50saned -> ../init.d/saned*
lrwxrwxrwx   1 root root    19 May 16 08:46 S70dns-clean -> ../init.d/dns-clean*
lrwxrwxrwx   1 root root    18 May 16 08:46 S70pppd-dns -> ../init.d/pppd-dns*
lrwxrwxrwx   1 root root    14 May 22 14:27 S75sudo -> ../init.d/sudo*
lrwxrwxrwx   1 root root    22 May 16 08:46 S99acpi-support -> ../init.d/acpi-support*
lrwxrwxrwx   1 root root    21 May 16 08:46 S99grub-common -> ../init.d/grub-common*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99ondemand -> ../init.d/ondemand*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99rc.local -> ../init.d/rc.local*

rc3.d:
total 20
drwxr-xr-x   2 root root  4096 May 22 14:27 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
-rw-r--r--   1 root root   677 Apr 14 02:26 README
lrwxrwxrwx   1 root root    20 May 16 08:46 S20kerneloops -> ../init.d/kerneloops*
lrwxrwxrwx   1 root root    27 May 16 08:46 S20speech-dispatcher -> ../init.d/speech-dispatcher*
lrwxrwxrwx   1 root root    32 May 16 09:15 S20virtualbox-guest-utils -> ../init.d/virtualbox-guest-utils*
lrwxrwxrwx   1 root root    17 May 16 09:09 S30vboxadd -> ../init.d/vboxadd*
lrwxrwxrwx   1 root root    21 May 16 09:12 S30vboxadd-x11 -> ../init.d/vboxadd-x11*
lrwxrwxrwx   1 root root    25 May 16 09:12 S35vboxadd-service -> ../init.d/vboxadd-service*
lrwxrwxrwx   1 root root    20 May 16 08:46 S50pulseaudio -> ../init.d/pulseaudio*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50rsync -> ../init.d/rsync*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50saned -> ../init.d/saned*
lrwxrwxrwx   1 root root    19 May 16 08:46 S70dns-clean -> ../init.d/dns-clean*
lrwxrwxrwx   1 root root    18 May 16 08:46 S70pppd-dns -> ../init.d/pppd-dns*
lrwxrwxrwx   1 root root    14 May 22 14:27 S75sudo -> ../init.d/sudo*
lrwxrwxrwx   1 root root    22 May 16 08:46 S99acpi-support -> ../init.d/acpi-support*
lrwxrwxrwx   1 root root    21 May 16 08:46 S99grub-common -> ../init.d/grub-common*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99ondemand -> ../init.d/ondemand*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99rc.local -> ../init.d/rc.local*

rc4.d:
total 20
drwxr-xr-x   2 root root  4096 May 22 14:27 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
-rw-r--r--   1 root root   677 Apr 14 02:26 README
lrwxrwxrwx   1 root root    20 May 16 08:46 S20kerneloops -> ../init.d/kerneloops*
lrwxrwxrwx   1 root root    27 May 16 08:46 S20speech-dispatcher -> ../init.d/speech-dispatcher*
lrwxrwxrwx   1 root root    32 May 16 09:15 S20virtualbox-guest-utils -> ../init.d/virtualbox-guest-utils*
lrwxrwxrwx   1 root root    17 May 16 09:09 S30vboxadd -> ../init.d/vboxadd*
lrwxrwxrwx   1 root root    21 May 16 09:12 S30vboxadd-x11 -> ../init.d/vboxadd-x11*
lrwxrwxrwx   1 root root    25 May 16 09:12 S35vboxadd-service -> ../init.d/vboxadd-service*
lrwxrwxrwx   1 root root    20 May 16 08:46 S50pulseaudio -> ../init.d/pulseaudio*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50rsync -> ../init.d/rsync*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50saned -> ../init.d/saned*
lrwxrwxrwx   1 root root    19 May 16 08:46 S70dns-clean -> ../init.d/dns-clean*
lrwxrwxrwx   1 root root    18 May 16 08:46 S70pppd-dns -> ../init.d/pppd-dns*
lrwxrwxrwx   1 root root    14 May 22 14:27 S75sudo -> ../init.d/sudo*
lrwxrwxrwx   1 root root    22 May 16 08:46 S99acpi-support -> ../init.d/acpi-support*
lrwxrwxrwx   1 root root    21 May 16 08:46 S99grub-common -> ../init.d/grub-common*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99ondemand -> ../init.d/ondemand*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99rc.local -> ../init.d/rc.local*

rc5.d:
total 20
drwxr-xr-x   2 root root  4096 May 22 14:27 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
-rw-r--r--   1 root root   677 Apr 14 02:26 README
lrwxrwxrwx   1 root root    20 May 16 08:46 S20kerneloops -> ../init.d/kerneloops*
lrwxrwxrwx   1 root root    27 May 16 08:46 S20speech-dispatcher -> ../init.d/speech-dispatcher*
lrwxrwxrwx   1 root root    32 May 16 09:15 S20virtualbox-guest-utils -> ../init.d/virtualbox-guest-utils*
lrwxrwxrwx   1 root root    17 May 16 09:09 S30vboxadd -> ../init.d/vboxadd*
lrwxrwxrwx   1 root root    21 May 16 09:12 S30vboxadd-x11 -> ../init.d/vboxadd-x11*
lrwxrwxrwx   1 root root    25 May 16 09:12 S35vboxadd-service -> ../init.d/vboxadd-service*
lrwxrwxrwx   1 root root    20 May 16 08:46 S50pulseaudio -> ../init.d/pulseaudio*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50rsync -> ../init.d/rsync*
lrwxrwxrwx   1 root root    15 May 16 08:46 S50saned -> ../init.d/saned*
lrwxrwxrwx   1 root root    19 May 16 08:46 S70dns-clean -> ../init.d/dns-clean*
lrwxrwxrwx   1 root root    18 May 16 08:46 S70pppd-dns -> ../init.d/pppd-dns*
lrwxrwxrwx   1 root root    14 May 22 14:27 S75sudo -> ../init.d/sudo*
lrwxrwxrwx   1 root root    22 May 16 08:46 S99acpi-support -> ../init.d/acpi-support*
lrwxrwxrwx   1 root root    21 May 16 08:46 S99grub-common -> ../init.d/grub-common*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99ondemand -> ../init.d/ondemand*
lrwxrwxrwx   1 root root    18 May 16 08:46 S99rc.local -> ../init.d/rc.local*

rc6.d:
total 20
drwxr-xr-x   2 root root  4096 May 16 09:15 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
lrwxrwxrwx   1 root root    29 May 16 08:46 K10unattended-upgrades -> ../init.d/unattended-upgrades*
lrwxrwxrwx   1 root root    27 May 16 08:46 K20speech-dispatcher -> ../init.d/speech-dispatcher*
lrwxrwxrwx   1 root root    32 May 16 09:15 K20virtualbox-guest-utils -> ../init.d/virtualbox-guest-utils*
lrwxrwxrwx   1 root root    25 May 16 09:12 K65vboxadd-service -> ../init.d/vboxadd-service*
lrwxrwxrwx   1 root root    17 May 16 09:09 K70vboxadd -> ../init.d/vboxadd*
lrwxrwxrwx   1 root root    21 May 16 09:12 K70vboxadd-x11 -> ../init.d/vboxadd-x11*
-rw-r--r--   1 root root   351 Apr 14 02:26 README
lrwxrwxrwx   1 root root    18 May 16 08:46 S20sendsigs -> ../init.d/sendsigs*
lrwxrwxrwx   1 root root    17 May 16 08:46 S30urandom -> ../init.d/urandom*
lrwxrwxrwx   1 root root    22 May 16 08:46 S31umountnfs.sh -> ../init.d/umountnfs.sh*
lrwxrwxrwx   1 root root    20 May 16 08:46 S35networking -> ../init.d/networking*
lrwxrwxrwx   1 root root    18 May 16 08:46 S40umountfs -> ../init.d/umountfs*
lrwxrwxrwx   1 root root    20 May 16 08:46 S60umountroot -> ../init.d/umountroot*
lrwxrwxrwx   1 root root    16 May 16 08:46 S90reboot -> ../init.d/reboot*

rcS.d:
total 20
drwxr-xr-x   2 root root  4096 Apr 23 04:38 ./
drwxr-xr-x 131 root root 12288 Jun 10 21:59 ../
-rw-r--r--   1 root root   447 Apr 14 02:26 README
lrwxrwxrwx   1 root root    16 May 16 08:46 S25brltty -> ../init.d/brltty*
lrwxrwxrwx   1 root root    18 May 16 08:46 S37apparmor -> ../init.d/apparmor*
lrwxrwxrwx   1 root root    17 May 16 08:46 S55urandom -> ../init.d/urandom*
lrwxrwxrwx   1 root root    20 May 16 08:46 S70x11-common -> ../init.d/x11-common*

The README for rc0.d says:

The scripts in this directory are executed once when entering 
runlevel 0.

The scripts are all symbolic links whose targets are located in
/etc/init.d/ .

Generally it is not necessary to alter the scripts in this directory.
Their purpose is to stop all services and to make the system ready
for shutdown.

For more information see /etc/init.d/README.

The README for rc1.d says:

The scripts in this directory are executed each time the system enters
this runlevel.

The scripts are all symbolic links whose targets are located in
/etc/init.d/ .

Generally it is not necessary to alter the scripts in this directory.
Their purpose is to stop all services and thus to put the system in
single-user mode.

For more information see /etc/init.d/README.

Hope this helps

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.