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.

This is a new installation of 12.04 and I can see that my machine is using both the old sysvinit method and the new upstart method to launch programs on start-up.

According to the man page for service, upstart should run its stuff if it's present, otherwise it falls back to sysvinit.

Now in /var/log/boot.log I have a bunch of errors where the daemons aren't starting, e.g. anacron:

initctl: Unknown job: S20anacron

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20anacron
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20dbus start
initctl: Unknown job: S20dbus

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20dbus
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20dmesg start
initctl: Unknown job: S20dmesg

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20dmesg
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20hostname start
initctl: Unknown job: S20hostname

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20hostname
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20hwclock start
 * Stopping save kernel messages                                                                                                                         [ OK ]
initctl: Unknown job: S20hwclock

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20hwclock
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20hwclock-save start
 * Starting LightDM Display Manager                                                                                                                      [ OK ]
initctl: Unknown job: S20hwclock-save

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20hwclock-save
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20network-interface start
initctl: Unknown job: S20network-interface

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20network-interface
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20network-interface-container start
 * Stopping anac(h)ronistic cron                                                                                                                         [ OK ]
initctl: Unknown job: S20network-interface-container

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20network-interface-container

I can see I've got both /etc/init/anacron.conf and /etc/init.d/anacron along with

/etc/rc2.d/S20anacron
/etc/rc1.d/K20anacron
/etc/rc3.d/S20anacron
/etc/rc6.d/K20anacron
/etc/rc5.d/S20anacron
/etc/rc0.d/K20anacron
/etc/rc4.d/S20anacron

So I'm confused here. Did anacron and dbus and the rest launch successfully? Should I do something to take care of this 'unknown jobs' problem?

It seems from my /var/log/syslog that I've got some activity from anacron and dbus and so on - but I can't tell whether it's enabled

I'd rather just see the logged message as for the other stuff: * Starting ISC DHCP IPv4 server [ OK ]

I have a few more daemons to install - e.g. iptables and dnsmasq - so I'd like to get this sorted in my mind before I continue.

Thanks

share|improve this question
    
Now what is really confusing is that i just discovered that most of the scripts in /etc/init.d which I thought were scripts controlling the sysvinit start-up process are in fact all just links pointing to /lib/init/upstart-job which according to the header comments is: # upstart-job # # Symlink target for initscripts that have been converted to Upstart. This isn't exactly easy transparent kind of stuff that I was expecting from ubuntu. My main question has got to be, how do I get rid of those error messages in the boot.log? –  Adam Jul 17 '12 at 19:52

1 Answer 1

up vote 0 down vote accepted

As I understand it, both mechanisms are still in place, with upstart starting the rc mechanism (see /etc/init/rc.conf), and start up items should use either mechanism but not both.

On my system, anacron is defined as a native upstart job in /etc/init/anacron.conf, therefore there should be no S20anacron or K20anacron, since the xnnName mechanism is for sysvinit only. There's no S20anacron on my system, eg. The run levels associated with particular upstart jobs are defined in the upstart job conf file where runlevels apply.

While the service command may look first for upstart jobs and run those in preference to /etc/init.d/ jobs, I understand upstart works directly rather than using the service command.

It's unclear to me why any of the above jobs, except dbus-daemon, should remain running. It appears that anacron is run by upstart at boot time, and then run regularly by cron (see /etc/crontab). It's man page says it is a cron supplement, rather than a replacement for cron.

Since I don't know the details of your changes to your system, here's the contents of my /etc/init/anacron.conf:

 # anacron - anac(h)ronistic cron
 #
 # anacron executes commands at specific periods, but does not assume that
 # the machine is running continuously

 description    "anac(h)ronistic cron"

 start on runlevel [2345]
 stop on runlevel [!2345]

 expect fork
 normal exit 0

 exec anacron -s
share|improve this answer
    
That's strange. Ubuntu put /etc/init.d/anacron there - I certainly didn't. It is a fresh install of Ubuntu 12.04 with a HD format so there's nothing from any earlier installs. My DSL modem blew up so I couldn't do anything constructive last night - but I did an "apt-get remove --purge anacron" and it didn't remove S20anacron and K20anacron. Forgot to check /etc/init/anacron.conf. But /etc/init.d/anacron is gone. Anyway, anacron isn't a regular daemon so I guess it's not a good example to use. More later when I get back home.... –  Adam Jul 17 '12 at 14:56
    
Can't vote up your answer because of my lowly reputation. But thanks anyway. –  Adam Jul 17 '12 at 15:27
    
just checked, my anacron.conf is the same as yours. the anacron package contains both /etc/init/anacron.conf and /etc/init.d/anacron - do you want to check yours for me? dpkg -L anacron –  Adam Jul 17 '12 at 19:33
    
It is installed on my system from the anacron package. It is a symbolic link to /lib/init/upstart-job, and that's the script putting out the 'Since the script you are attempting to invoke has been converted to an Upstart job,' messages above. I don't have the /etc/rc2.c/S20anacron, etc. to invoke it, however. You can tell what package installed those files with dpkg -S /etc/rc2.c/S20anacron –  John S Gruber Jul 18 '12 at 23:23
    
dpkg has no record of S20anacron so I guess it must have been configured when I set up the system for the first time. It's a while back when I set the system so I don't remember. –  Adam Jul 28 '12 at 16:41

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.