Alpine disk installer: fix mount points for efi

This commit is contained in:
Nico Schottelius 2022-08-05 23:29:24 +02:00
parent 9672f5eb7c
commit 44f201c96d
1 changed files with 9 additions and 1 deletions

View File

@ -108,7 +108,8 @@ sudo cp "$RESOLVCONF" $rootfs_tmpdir/etc/resolv.conf
# nb2:~# blkid| grep ^${DISK}1 | awk '{ print $2 }'
# UUID="fecf4182-f6dd-4d2c-9af7-8f36444ee25c"
eval $(blkid | grep ^${DISK}1 | awk '{ print $2 }')
echo "UUID=$UUID / ext4 defaults 0 1" >> ${rootfs_tmpdir}/etc/fstab
UUID_1=$UUID
run_root apk update
run_root apk add linux-lts openrc udev openssh e2fsprogs
@ -145,8 +146,15 @@ run_root grub-mkconfig -o /boot/grub/grub.cfg
case "$BOOT_VIA" in
bios)
run_root grub-install --target=i386-pc ${DISK}
echo "UUID=$UUID_1 / ext4 defaults 0 1" >> ${rootfs_tmpdir}/etc/fstab
;;
efi)
eval $(blkid | grep ^${DISK}2 | awk '{ print $2 }')
UUID_2=$UUID
echo "UUID=$UUID_2 / ext4 defaults 0 1" >> ${rootfs_tmpdir}/etc/fstab
echo "UUID=$UUID_1 / 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