Migration from sysvinit to systemd: reboot fails to complete

Felipe Sateler fsateler at debian.org
Fri Dec 30 21:16:02 GMT 2016


On 30 December 2016 at 15:01, Francesco Poli <invernomuto at paranoici.org> wrote:
> On Fri, 30 Dec 2016 14:15:17 -0300 Felipe Sateler wrote:
>
>> Hi Francesco,
>
> Hello Felipe,
> first off, thanks for your prompt reply!
>
>>
>> On 30 December 2016 at 13:08, Francesco Poli <invernomuto at paranoici.org> wrote:
> [...]
>> > 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
>
> Ouch! That probably explains everything!

Well, rebooting from sysvinit to systemd is supposed to work too, so
it doesn't explain everything. But, your experience appears to uncover
another bug: for some reason the sysvinit mount scripts will unmount
/usr! This is a bad idea, as the distinction between / and /usr is not
relevant anymore (because we now have initramfs), and will stop
existing after the /usr merge. The question is, why would sysvinit
unmount /usr, it probably shouldn't.


> I thought that booting with init=/bin/systemd was just for test
> purposes!
> As a consequence, I tested that the system was able to boot properly
> with init=/bin/systemd, took a look around, and then rebooted the usual
> way (that is to say, with sysvinit).
> The rationale behind this further reboot is that I wanted to also test
> the shutdown process, before being sure that the system was able to run
> with systemd as PID 1, without unforeseen issues. But I hadn't thought
> I should have booted with init=/bin/systemd a second time...  :-(
>
> After a while (running with sysvinit as PID 1), I installed
> systemd-sysv and attempted to reboot, experiencing the error I
> described...   :-(
>
> If this is indeed my mistake, I will issue the commands
>
>   # aptitude --purge-unused install systemd-sysv \
>     systemd-shim_ sysvinit-core_
>   # reboot
>
> in a boot running with init=/bin/systemd, next time I migrate a box
> from sysvinit to systemd.

This is still a good idea, I think. The less weird mixes one has, the
better. I have added a note there.


-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list