/!\ PLEASE READ: This howto is a work in progress. Use at your own risk!

Upstart on openSUSE Howto

This guide is based on openSUSE 10.3 alpha 2 and Upstart 0.3.8. If you run into problems consult the Debugging page for help. The trick of switching init to /bin/sh should be helpful if you run into booting problems.

  1. Download Upstart and the example jobs from the download page.

  2. Follow the initial instructions on the Getting Started page.

    1. Configure Upstart with the prefix=/opt/upstart command. This does not replace the existing init.

    2. Execute "make" and "make install"
    3. Untar the example jobs in the /etc/event.d directory. Upstart scans all files in /etc/event.d. Remember to remove the examples tar file from /etc/event.d.
    4. Add a new alternative kernel configuration line to /boot/grub/menu.lst. Copy the four lines that represent the default kernel configuration. Modify the kernel line to include:

init=/opt/upstart/sbin/init
  1. We have configured and compiled Upstart with the prefix=/opt/upstart command in this Howto. All Upstart commands are located in /opt/upstart/sbin. To reference the correct commands we have to add /opt/upstart/sbin to our path.

In the /etc/event.d directory execute the following command:
perl -pi -e 'undef $/; s/script\n/script\n        export PATH=\/opt\/upstart\/sbin:\$PATH\n/' rc*

OR

Add export PATH=/opt/upstart/sbin:$PATH to each rc file immediately after the beginning of the script block by hand

  1. openSUSE requires execution of /etc/init.d/boot early in the boot phase. Also, openSUSE does not have a /etc/init.d/rcS script, instead it uses the same /etc/init.d/rc script as other runlevels. For these reasons, modify /etc/event.d/rcS:

script
        export PATH=/opt/upstart/sbin:$PATH  # <-- ALREADY ADDED FROM PREVIOUS STEP
        exec /etc/init.d/boot                # <-- ADD THIS LINE
        runlevel --set S >/dev/null || true
        :
        :
        exec /etc/init.d/rc S"               # ADD A SPACE BETWEEN rc and S
  1. openSUSE uses /sbin/mingetty, not /sbin/getty as the example jobs do. We have to substitute each getty reference to the correct openSUSE mingetty. In the /etc/event.d directory execute the following command:

perl -pi -e 's/getty 38400/mingetty/' tty*
  1. The /etc/event.d/control-alt-delete job definition file references the default shutdown command. That is the incorrect command. Modify /etc/event.d/control-alt-delete:

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
  1. Modify the path to include "/opt/upstart/sbin" first. This will make sure that you execute the Upstart versions of system commands like reboot, telinit, etc.

-- CategoryDistributions

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