Systemd step by step howto for Lubuntu 12.04 (Precise Pangolin)

Posted: May 27, 2012 in Linux
Tags: , , ,

1. Add PPA;

sudo add-apt-repository ppa:pitti/systemd
sudo apt-get update

2. Refresh packages

sudo apt-get update

3. Install systemd

sudo apt-get install systemd

4. Create a text file /lib/systemd/system/hwclock.service containing;

[Unit]
Description=hwclock

[Service]
Type=oneshot
ExecStart=/sbin/hwclock –hctosys –localtime
ExecStop=/sbin/hwclock –systohc –localtime

[Install]
WantedBy=multi-user.target

N.B. There are two minus sign’s in front of hctosys, localtime and systohc above.

5. Symlink above file to /etc/systemd/system/multi-user.target.wants/hwclock.service

sudo ln -s /lib/systemd/system/hwclock.service /etc/systemd/system/multi-user.target.wants/hwclock.service

6. Edit your kernel command line to include init=/bin/systemd for e.g;

Before
kernel /boot/vmlinuz-linux root=/dev/sda2 loglevel=3 ro quiet resume=/dev/sda6 nomodeset

After
kernel /boot/vmlinuz-linux root=/dev/sda2 loglevel=3 ro quiet resume=/dev/sda6 nomodeset init=/bin/systemd

7. Reboot and select the new kernel entry (and hope everything works – otherwise just revert changes by editing grub during boot). Note above steps were tested using stock Precise kernel. You will need to enable certain kernel settings (search on Google) if compiling your own kernel.

8. (Optional step) – If you need to debug your stuck boot process, edit your kernel command line as follows to enable more verbose text during boot (this also includes systemd details to dmesg output);

kernel /boot/vmlinuz root=/dev/sda2 loglevel=3 resume=/dev/sda6 init=/bin/systemd systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M

Credits to Debian Wiki (Systemd section), Ubuntu Wiki and various online forums.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s