Differences between revisions 14 and 15
Revision 14 as of 2011-03-15 03:07:19
Size: 3329
Editor: dpward
Comment: Fix wiki formatting
Revision 15 as of 2011-08-26 04:10:18
Size: 3333
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
Currently there are no rpms provided. Get the upstart and the example-jobs archives from the [[http://upstart.ubuntu.com/download.html|download page]]. Currently there are no rpms provided. Get the upstart and the example-jobs archives from the [[[http://upstart.ubuntu.com/download.html|download|page]]].
Line 10: Line 10:
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: 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:

Note that Upstart is now part of Fedora 9

/!\ PLEASE READ: This howto can damage your system. Use at your own risk!

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 download].

As described 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:

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:

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:

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.

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:

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:

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).

-- CategoryDistributions

UpstartOnFedora (last edited 2011-08-26 04:10:18 by localhost)