Scripts in /etc/rc2.d/ are not executed

Bug #453473 reported by Cyril Jaquier
56
This bug affects 15 people
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Karmic by Vivien GUEANT
Nominated for Lucid by Vivien GUEANT

Bug Description

Binary package hint: sysvinit

Since a few days/weeks, scripts in /etc/rc2.d/ (the default runlevel with upstart if no /etc/inittab is present) are not executed during the boot process.

I noticed this because cups does not start anymore (see bug #444597), the cpufreq governor is still "performance" (ondemand script not executed), the virtualbox kernel modules are not automatically loaded, etc. Starting all these scripts manually works.

I tried "startpar" and "makefile" for CONCURRENCY but no changes.

$ ll /etc/init/rc-sysinit.conf
-rw-r--r-- 1 root root 1453 2009-10-14 06:51 /etc/init/rc-sysinit.conf

$ cat /etc/default/rcS
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=yes
VERBOSE=no
FSCKFIX=no
CONCURRENCY=makefile

$ ll /etc/rc2.d/
total 4
-rw-r--r-- 1 root root 677 2009-10-14 06:26 README
lrwxrwxrwx 1 root root 24 2009-09-05 21:05 S01binfmt-support -> ../init.d/binfmt-support
lrwxrwxrwx 1 root root 28 2009-09-05 21:05 S01dkms_autoinstaller -> ../init.d/dkms_autoinstaller
lrwxrwxrwx 1 root root 17 2009-09-05 21:05 S01openvpn -> ../init.d/openvpn
lrwxrwxrwx 1 root root 27 2009-09-05 21:05 S01speech-dispatcher -> ../init.d/speech-dispatcher
lrwxrwxrwx 1 root root 24 2009-09-05 21:05 S01virtualbox-ose -> ../init.d/virtualbox-ose
lrwxrwxrwx 1 root root 22 2009-09-15 19:14 S03acpi-support -> ../init.d/acpi-support
lrwxrwxrwx 1 root root 14 2009-09-16 08:36 S03cups -> ../init.d/cups
lrwxrwxrwx 1 root root 13 2009-09-15 19:14 S03ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root 20 2009-09-15 19:14 S03pulseaudio -> ../init.d/pulseaudio
lrwxrwxrwx 1 root root 15 2009-09-15 19:14 S03rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root 19 2009-09-15 19:14 S04bluetooth -> ../init.d/bluetooth
lrwxrwxrwx 1 root root 20 2009-09-16 19:23 S04kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root 18 2009-09-16 08:37 S04pppd-dns -> ../init.d/pppd-dns
lrwxrwxrwx 1 root root 21 2009-10-11 23:33 S05grub-common -> ../init.d/grub-common
lrwxrwxrwx 1 root root 21 2009-10-11 23:14 S05laptop-mode -> ../init.d/laptop-mode
lrwxrwxrwx 1 root root 18 2009-10-11 23:14 S05ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root 18 2009-10-11 23:14 S05rc.local -> ../init.d/rc.local

ProblemType: Bug
Architecture: amd64
CheckboxSubmission: 0085e529b142d05db3fd806c5a9bed9b
CheckboxSystem: 2563af6e36b037fc362c650378170735
Date: Fri Oct 16 22:44:08 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: bridge stp bnep nls_utf8 isofs option usbserial usb_storage cryptd aes_x86_64 aes_generic snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event ecb snd_seq uinput pcmcia snd_timer iwlagn sbp2 iptable_filter snd_seq_device iwlcore yenta_socket ip_tables snd rsrc_nonstatic mac80211 x_tables soundcore joydev lp nvidia snd_page_alloc thinkpad_acpi pcmcia_core cfg80211 led_class btusb psmouse nvram serio_raw parport dm_raid45 xor usbhid ohci1394 ieee1394 e1000e intel_agp video output
Package: sysv-rc 2.87dsf-4ubuntu10
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-13.44lp446146apw1-generic
SourcePackage: sysvinit
Uname: Linux 2.6.31-13-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:1514): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:1718): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:1711): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:1683): Gdk-WARNING **: /build/buildd/gtk+2.0-2.18.2/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

Revision history for this message
Cyril Jaquier (cyril-jaquier) wrote :
Revision history for this message
Cyril Jaquier (cyril-jaquier) wrote :

I think this could be related to upstart but I don't know how to debug this.

# sudo start rc-sysinit
or
# sudo start rc

doesn't seem to help much here. Any suggestions about how to debug it?

Thank you.

Revision history for this message
cement_head (andorjkiss) wrote :

This is a bug (again) with the October 26th updates

Revision history for this message
Cyril Jaquier (cyril-jaquier) wrote :

Today I upgraded another machine and notice that this bug did not show up on this one. So I purged upstart, sysv-rc and insserv, reinstall them and it now works as expected.

Something went probably wrong during the alpha phases. So for me this bug can be closed.

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

I confirm that reinstalling the aforementioned packages solves the problem in kernel 2.6.31-14-generic (2.6.31-10-generic fails to find the root filesystem block device). With packages reinstalled and kernel 2.6.31-14-generic the boot process failed once when fsck reached 90%, progress and disk activity stopped and the system was locked in the splash screen. I couldn't reproduce this behavior afterwards.

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

By the way, seems more people is having problems pointing to upstart:

/etc/rc.local is not executed at startup
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/471266

After upgrade to karmic cups server do not start
https://bugs.launchpad.net/ubuntu/+bug/444597

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 453473] Re: Scripts in /etc/rc2.d/ are not executed

On Tue, 2009-12-15 at 12:19 +0000, Borja López Soilán (Pexego) wrote:

> By the way, seems more people is having problems pointing to upstart:
>
Upstart doesn't run rc scripts, sysv-rc does

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
nicobrainless (nicoseb) wrote :

I upgraded to Lucid last weekend. I am now hit by this bug.
Cups, ssh, virtual box services (at least) are not started during boot. Starting them by hand works...
I opened a talk on the forum, not sure for which program to file a bug...

http://swiss.ubuntuforums.org/showthread.php?p=8509631#post8509631

Any news on this... I've seen on bug #461725
https://bugs.launchpad.net/ubuntu/karmic/+source/upstart/+bug/461725
hat some fix was released for some problems but apparently not this one!

Revision history for this message
Brad Johnson (kkhww1902) wrote :
Revision history for this message
Richard Leger (richard-leger) wrote :

About rc.local not executed at startup...

Maybe your rc.local script is executed but terminates unexpectedly due to the -e option in the shabang declaration
(e.g #!/bin/sh -e)

With this option, any command in the script returning an error (exit code other than 0) will stop execution of the rc.local script.

Those post might be of some help... or not...

http://ubuntuforums.org/showpost.php?p=9430202&postcount=33
http://forum.ubuntu-fr.org/viewtopic.php?pid=3535050#p3535050

Also adding a :
/bin/sleep 10
at the begin of the script might help ensuring that other part of the system are fully initialised before running rc.local commands...

Cheers!

Revision history for this message
anyremote (anyremote) wrote :

I've also hit by this bug.

This issue looks like some race conditions inside upstart, because if i reboot machine several times it starts properly
at the end (it tooks me up to 3-5 time to reboot machine)

tags: added: karmic lucid
Revision history for this message
david_kt (d-kuntadi) wrote :

I experienced this bug as well, on lucid fresh install.
For temporary workaround, I did as follow:

sudo update-rc.d -f rc.local remove
sudo update-rc.d rc.local defaults

Putting it back to normal setting ( sudo update-rc.d rc.local start 99 2 3 4 5 . ) will make rc.local not being executed (again).

DK

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sysvinit (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

Per comment #4, I'm closing this as a transient error that was fixed before release. If anyone is experiencing this problem with current Ubuntu releases, please file a separate bug report.

Changed in sysvinit (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.