Commit c325ff3
committed
rootfs: fix grub.cfg generation when using pkg-linux-qcom kernel package
The /etc/kernel/postinst.d/zz-update-grub hook (grub-common) guards its
update-grub call with a systemd check:
if [ -d /run/systemd/system ]; then update-grub || true; fi
In a chroot environment systemd is not running, so /run/systemd/system
does not exist and update-grub is silently skipped. This left
/boot/grub/grub.cfg absent, causing the subsequent sed-based GRUB
cleanup to fail with:
sed: can't read /boot/grub/grub.cfg: No such file or directory
The build-kernel-deb.sh-generated package calls update-grub directly in
its postinst (unconditionally), so it was unaffected. The pkg-linux-qcom
package follows the Debian standard of delegating to postinst.d hooks,
which exposed this chroot-specific gap.
Fix: call update-grub explicitly in the chroot immediately after kernel
installation, bypassing the systemd guard. No changes to the kernel
package postinst — grub.cfg generation is the build script's
responsibility in a chroot context.
Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>1 parent 13e1e2d commit c325ff3
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
554 | 558 | | |
555 | 559 | | |
556 | 560 | | |
| |||
0 commit comments