Bug#930105: systemd: prerm fail breaks apt and renders system hard to recover

Adam Borowski kilobyte at angband.pl
Sat Jun 8 00:20:12 BST 2019


On Fri, Jun 07, 2019 at 01:07:56AM +0200, Michael Biebl wrote:
> Control: severity -1 normal
> 
> Am 07.06.19 um 00:55 schrieb Adam Borowski:
> > Severity: critical
> > Justification: breaks the whole system

> > When trying to switch to any other init system (and d-i offers no way to
> > start with anything but systemd), prerm refuses to uninstall _in the middle
> > of the apt run_.  This leaves the system in a broken state, with a good part
> > of tools refusing to start (including apt itself), and for obvious reasons
> > unbootable.  Anyone without a good knowledge of dpkg's internals would be
> > unable to recover the system at all.  To even attempt recovery, one has to
> > rm -rf /run/systemd or otherwise neuter the prerm script.

> The prerm check is there for a reason (to be able to cleanly shutdown)
> and switch over.
> Once that is done, you can opt to remove the systemd package if you so
> desire.

Could you please tell me how can I cleanly shutdown if most of the system is
broken?  The system won't boot again.  And even if it will, apt is among
packages that are no longer functional.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ .globl _start↵.data↵rc: .ascii "/etc/init.d/rcS\0"↵.text↵_start
⣾⠁⢰⠒⠀⣿⡁ mov $57,%rax↵syscall↵cmp $0,%rax↵jne child↵parent:↵mov $61,%rax
⢿⡄⠘⠷⠚⠋⠀ mov $-1,%rdi↵xor %rsi,%rsi↵xor %rdx,%rdx↵syscall↵jmp parent↵child:
⠈⠳⣄⠀⠀⠀⠀ mov $59,%rax↵mov $rc,%rdi↵xor %rsi,%rsi↵xor %rdx,%rdx↵syscall



More information about the Pkg-systemd-maintainers mailing list