Note that Upstart is now part of Fedora 9
|
This page contains information about using Upstart on Fedora
Installing upstart
Currently there are no rpms provided. Get the upstart and the example-jobs archives from the [http://upstart.ubuntu.com/download.html download page].
As described [http://upstart.ubuntu.com/getting-started.html here] the configuration can be performed in two ways: here the secure way will be used. In this case Upstart will not totally replace init but will be installed in /opt/ where it has to be called explicitly with a boot kernel parameter. This is sufficient for testing. The configure line is: ./configure --prefix=/opt/upstart --sysconfdir=/etc --enable-compat=sysv The installation is the usual make && make install
Configuring Upstart
First of all the set of example jobs have to be extracted to /etc/event.d/. These examples make sure that upstart can boot your Fedora exactly like the old init does - this is called compat mode. However, the example jobs need some tweaking since they are written for Ubuntu.
- The PATH variable have to be modified so that the new init system calls the right executables:
- {{{Change PATH variable
perl -pi -e 'undef $/; s/script\n/script\n export PATH=\/opt\/upstart\/sbin:\$PATH\n/' /etc/event.d/rc*}}}
Fedora has a very important boot rc script which should be executed only once, directly after the start. Therefore, add it to the rcS script:
- {{{rcS start script modification
script
export PATH=/opt/upstart/sbin:$PATH # <= This was added in the last step exec /etc/rc.d/rc.sysinit # <= ADD THIS LINE runlevel --set S >/dev/null || true :
}}}
The tty* files contain the command /sbin/getty. Fedora uses /sbin/mingetty, change that for all tty* files:
- {{{Change getty to mingetty
perl -pi -e 's/getty 38400/mingetty/' tty*}}}
The rc* files call the executable /etc/init.d/rc - Fedora, however, has this at /etc/rc.d/rc. Change that for all rc* files.
- {{{Change rc path
perl -pi -e 's/\/etc\/init.d\/rc/\/etc\/rc.d\/rc/' rc*}}}
There is no runlevel rcS in Fedora - therefore, change /etc/event.d/rcS:
- {{{Modify call for runlevel S
exec /etc/init.d/rcS must be changed to exec /etc/init.d/rc S}}}
Also, the script /etc/event.d/control-alt-delete has to be modified like this:
- {{{start on control-alt-delete
script
export PATH=/opt/upstart/sbin:$PATH # <-- ADD THIS LINE exec shutdown -r now "Control-Alt-Delete pressed" # REMOVE /sbin/ FROM THIS LINE
end script}}}
Boot with Upstart
To boot with upstart you have to create a modified grub entry. Therefore, open /boot/grub/grub.conf and create a copy of your current entry. Afterwards, change the init parameter of the kernel line to: init=/opt/upstart/sbin/init
Benchmarking with bootstart
If there is the need to benchmark the new system with bootchart, the bootchart entry in grub.conf need an additional parameter: bootchart_init=/opt/upstart/sbin/init
State
This howto was successfully tested on a Fedora Core 6 system (without X and disabled SELinux).