* Chris Hofstaedtler [Fri Nov 17, 2023 at 08:54:29PM +0100]:
>
> 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.

Thanks for the great analysis, Chris.

It seems that
https://github.com/faiproject/fai/commit/7294b415ab2982f84b293900a9610eab49184201
works around the issue, at least for my use case (though the commit
message sadly isn't really verbose and doesn't say what the
underlying reason for the change was).

The change didn't make it into any fai release yet, though.

regards
-mika-

Attachment: signature.asc
Description: PGP signature

Reply via email to