fix(os): alpine v3.20 requires copying kernel config before grub-mkconfig (#180)

There is currently a bug in the Xen support for Alpine where /boot/config-lts
is expected to exist but in Alpine /boot/config-VERSION-lts is the only file
available. This change copies the config to /boot/config-lts to fix the build.
This commit is contained in:
Alex Zenla 2024-06-04 10:00:49 -07:00 committed by GitHub
parent 11235b6837
commit 7ba04f26a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,6 +25,8 @@ ROOT_UUID="$(cat /root-uuid)"
echo 'GRUB_SAVEDEFAULT="true"'
} >> /etc/default/grub
# fix bug in grub detection of xen support
cp /boot/config-*-lts /boot/config-lts
grub-mkconfig -o /boot/grub/grub.cfg
grub-set-default "$(grep ^menuentry /boot/grub/grub.cfg | grep Xen | cut -d \' -f 2 | head -1)"
rm -rf /var/cache/apk/*