Migration from sysvinit to systemd: reboot fails to complete
Felipe Sateler
fsateler at debian.org
Fri Dec 30 17:15:17 GMT 2016
Hi Francesco,
On 30 December 2016 at 13:08, Francesco Poli <invernomuto at paranoici.org> wrote:
> 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.
I am assuming you were running this in a boot running with init=/bin/systemd
>
> 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
So, it seems that for some reason systemd unmounted /usr ? I don't
think that is supposed to happen. Do you have more logs from that
failed reboot?
>
> 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?
I'm confused, were you running under systemd or sysvinit?
--
Saludos,
Felipe Sateler
More information about the Pkg-systemd-maintainers
mailing list