From 44f201c96d37b5a5ce5162ec0129a3da8b68632c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 5 Aug 2022 23:29:24 +0200 Subject: [PATCH] Alpine disk installer: fix mount points for efi --- alpine-install-on-disk.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/alpine-install-on-disk.sh b/alpine-install-on-disk.sh index 4964bb5..f1867e9 100755 --- a/alpine-install-on-disk.sh +++ b/alpine-install-on-disk.sh @@ -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