Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1914  / 3 Years ago, fri, august 20, 2021, 5:11:05

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.


More From » boot

 Answers
7

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


[#37716] Sunday, August 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
puccop

Total Points: 66
Total Questions: 99
Total Answers: 93

Location: Aruba
Member since Sun, Nov 27, 2022
1 Year ago
puccop questions
Thu, Feb 17, 22, 08:16, 2 Years ago
Fri, Jan 13, 23, 18:55, 1 Year ago
Fri, Jan 21, 22, 07:21, 2 Years ago
Thu, Jul 28, 22, 06:32, 2 Years ago
;