alpine: fix efinvram installation
This commit is contained in:
parent
5d5e94d05f
commit
6910bd8931
1 changed files with 16 additions and 12 deletions
|
@ -162,22 +162,26 @@ case "$BOOT_VIA" in
|
|||
echo "UUID=$UUID_2 / ext4 defaults 0 1" >> ${rootfs_tmpdir}/etc/fstab
|
||||
echo "UUID=$UUID_1 /boot vfat defaults 0 2" >> ${rootfs_tmpdir}/etc/fstab
|
||||
|
||||
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/
|
||||
|
||||
# Actually do add us to the bios
|
||||
if [ $BOOT_VIA = "efinvram" ]; then
|
||||
dir=/sys/firmware/efi/efivars/
|
||||
sudo mount --bind ${dir} ${rootfs_tmpdir}${dir}
|
||||
run_root apk add efibootmgr
|
||||
run_root grub-install --efi-directory=/boot
|
||||
else
|
||||
run_root grub-install --efi-directory=/boot --no-nvram
|
||||
|
||||
# FIX for some machines (?)
|
||||
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/
|
||||
fi
|
||||
|
||||
sudo umount ${rootfs_tmpdir}/boot
|
||||
;;
|
||||
esac
|
||||
|
||||
# Actually do add us to the bios
|
||||
if [ $BOOT_VIA = "efinvram" ]; then
|
||||
dir=/sys/firmware/efi/efivars/
|
||||
sudo mount --bind ${dir} ${rootfs_tmpdir}${dir}
|
||||
run_root apk add efibootmgr
|
||||
run_root grub-install --efi-directory=/boot
|
||||
fi
|
||||
|
||||
|
||||
# Debug
|
||||
run_root cat /etc/fstab
|
||||
|
|
Loading…
Reference in a new issue