• Bug#1056151: fai-client: Diversion makes /usr/sbin/init vanish in /usr-

    From Lucas Nussbaum@21:1/5 to Chris Hofstaedtler on Wed Feb 28 22:50:01 2024
    Hi,

    On 17/11/23 at 20:54 +0100, Chris Hofstaedtler wrote:
    Package: fai-client
    Version: 5.11
    Severity: important
    X-Debbugs-Cc: mika@grml.org

    Hello Thomas,

    you will have noticed that systemd 255 moves its files from / to /usr.
    This includes /sbin/init.

    Now a problem arises, when:
    - I use a basefile tar.gz, made with an old systemd (say, it uses
    testing as of today)
    - During baseupdate, systemd gets updated and moves its file (say, I'm
    actually installing unstable)

    What happens is this:
    - base image gets unpacked, /sbin is a symlink to /usr/sbin,
    /sbin/init is actually /usr/sbin/init
    - baseupdate diverts /sbin/init to /sbin/init.distrib (and using
    symlinks, /usr/sbin/init became /usr/sbin/init.distrib)
    - baseupdate updates systemd, dpkg 'moves' /sbin/init to /usr/sbin/init,
    but the divert stays in place for /sbin/init.
    At this time, dpkg will have overwritten /usr/sbin/init with the new
    file(!)
    - fai-divert -R runs, removes /sbin/init, and removes the divert of
    /sbin/init.
    But: at this point /sbin/init was already the new /usr/sbin/init,
    which is now lost.

    As a result /usr/sbin/init is missing, and the system does not boot.

    I would suggest dropping all the fai-divert calls in baseupdate.

    This bug also broke the generation of Vagrant images for the testing distribution. (Those images are based on a fork of https://salsa.debian.org/cloud-team/debian-cloud-images)

    I removed the divert locally as a workaround.

    Lucas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)