Migration from sysvinit to systemd: reboot fails to complete

Francesco Poli invernomuto at paranoici.org
Fri Dec 30 16:08:18 GMT 2016


Hello Debian systemd Maintainers!

I had to migrate one amd64 Debian GNU/Linux stretch box from sysvinit
to systemd.
I followed the procedure suggested on the Debian wiki [1].

[1] https://wiki.debian.org/systemd

Manually adding the "init=/bin/systemd" boot parameter to the Linux
kernel (from the GRUB editing screen) worked correctly.

Hence, I went on, by issuing the following command:

  # aptitude --purge-unused install systemd-sysv \
    systemd-shim_ sysvinit-core_

This resulted in the following installations/removals:

  [REMOVE, NOT USED] cgmanager:amd64 0.41-2
  [REMOVE, NOT USED] libcgmanager0:amd64 0.41-2
  [REMOVE, NOT USED] libnih-dbus1:amd64 1.0.3-8
  [REMOVE, NOT USED] libnih1:amd64 1.0.3-8
  [INSTALL] systemd-sysv:amd64 232-8
  [REMOVE (PURGE)] systemd-shim:amd64 10-2
  [REMOVE (PURGE)] sysvinit-core:amd64 2.88dsf-59.8

So far so good.

I then scheduled a reboot:

  # at 'now + 1 minute'
  warning: commands will be executed using /bin/sh
  at> reboot
  at> <EOT>

After about one minute, the system started a reboot, but failed
to complete it cleanly.

On the screen, I got the following error:

  reboot: error while loading shared libraries: liblz4.so.1: cannot open shared object file: No such file or directory

and I was asked to give root password for maintenance or press [Ctrl+d]
to continue.

Well, [Ctrl+d] resulted in seeing the above error again.
On the other hand, entering the root password left me in a console
with the root partition as the only mounted partition (/dev/md0).

No command (I am aware of) was helpful in rebooting or halting the box.

  # reboot
  reboot: error while loading shared libraries: liblz4.so.1: cannot open shared object file: No such file or directory
  # halt
  halt: error while loading shared libraries: liblz4.so.1: cannot open shared object file: No such file or directory
  # poweroff
  poweroff: error while loading shared libraries: liblz4.so.1: cannot open shared object file: No such file or directory
  # shutdown -h -t now
  shutdown: error while loading shared libraries: liblz4.so.1: cannot open shared object file: No such file or directory

Attempting to remount the root partition in read-only mode, as in

  # mount -o remount,ro /

resulted in a "/ busy" error.

I had to power-cycle (via the hardware button) the machine, while
hoping for the best.

The resulting boot completed correctly (with systemd as PID 1), but
it was found that the root partition had not been cleanly unmounted.
The journal was recovered and some orphaned inodes were fixed (thanks,
ext3 filesystem!) and no serious damage was apparently done.

Nonetheless, the procedure does not seem to work cleanly.

Is there a way to cleanly shutdown a box running sysvinit as PID 1,
immediately after the installation of package systemd-sysv, and
the mandatory simultaneous removal of systemd-shim and sysvinit-core?

How can I modify the procedure for the next time I have to migrate
a box from sysvinit to systemd?

Could you please update the Debian wiki page [1]?

Thanks for your time and for any help you may provide.
Bye.


P.S.: I am not subscribed to the mailing list. Please Cc me on replies,
      thanks for your understanding!


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20161230/8397be1d/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list