]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(squash): build ld cache for squash loader
authorHari Bathini <hbathini@linux.ibm.com>
Tue, 12 Jul 2022 08:25:47 +0000 (13:55 +0530)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 29 Sep 2022 04:57:14 +0000 (04:57 +0000)
commitbc1b23c29202023dd7852f4c3e3e97aaaf94da92
tree4af6bc659c395d4cf95a983b26eca348fdac0d2a
parent1157143d67b02ccf95602ae082f6fbfd1a20f342
fix(squash): build ld cache for squash loader

Commit dc21638c3f0a fixes kdump kernel crash, due to non-conventional
library path in powerpc, by copying /etc/ld.so.cache under initdir.
While that works in general, it is vulnerable to failure because of
missing links, when the CPU is reconfigured to run in compatibility
mode of older CPU version. Avoid this by running ldconfig for squash
loader to create the necessary links & ld cache for it. Doing this
also saves a few kilobyes of space as the copied ld cache is bigger
in size than the one needed for squash loader environment.

Fixes: dc21638c3f0a ("fix(squash): keep ld cache under initdir")
Cc: Pingfan Liu <piliu@redhat.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
dracut-init.sh
dracut.sh
modules.d/99squash/module-setup.sh