alpine: enhance uefi support
This commit is contained in:
parent
86535b43bc
commit
ebe45dc3df
1 changed files with 14 additions and 2 deletions
|
@ -138,10 +138,22 @@ EOF
|
|||
|
||||
# Setup bootloader
|
||||
|
||||
run_root apk add grub-bios
|
||||
run_root apk add grub-bios grub-efi
|
||||
echo 'GRUB_CMDLINE_LINUX_DEFAULT="quiet rootfstype=ext4"' >> ${rootfs_tmpdir}/etc/default/grub
|
||||
run_root grub-mkconfig -o /boot/grub/grub.cfg
|
||||
run_root grub-install --target=i386-pc ${DISK}
|
||||
|
||||
case "$BOOT_VIA" in
|
||||
bios)
|
||||
run_root grub-install --target=i386-pc ${DISK}
|
||||
;;
|
||||
efi)
|
||||
run_root grub-install --efi-directory=/boot --no-nvram
|
||||
run_root mkdir /boot/EFI/boot
|
||||
run_root cp /boot/EFI/alpine/grubx64.efi /boot/EFI/boot/bootx64.efi
|
||||
run_root cp /boot/grub/grub.cfg /boot/EFI/boot/
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# Cleanup
|
||||
run_root rm -f /etc/resolv.conf
|
||||
|
|
Loading…
Reference in a new issue