efi / csm support

This commit is contained in:
2023-11-28 17:25:53 +01:00
parent 2aa184cec6
commit 10115432d9
2 changed files with 15 additions and 2 deletions

View File

@@ -6,6 +6,8 @@ cp /root/arch-dev-vm/locale.gen /etc/locale.gen
hwclock --systohc hwclock --systohc
driveName=cat /root/arch-dev-vm/drive
locale-gen locale-gen
echo "LANG=en_GB.UTF-8" > /etc/locale.conf echo "LANG=en_GB.UTF-8" > /etc/locale.conf
@@ -23,7 +25,16 @@ sleep 2
mkinitcpio -P mkinitcpio -P
plymouth-set-default-theme -R script plymouth-set-default-theme -R script
# Test boot mode (if efi or csm)
bootMode=cat /sys/firmware/efi/fw_platform_size
if ["$bootMode" == '64' ]; then
mkdir /boot/EFI
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH
else
grub-install --target=i386-pc "/dev/${driveName}"
fi
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
echo " echo "

View File

@@ -37,6 +37,9 @@ if [[ "$doProceed" != "y" ]]; then
exit 0 exit 0
fi fi
# Save drive name for future use
echo "${driveName}" > ~/arch-dev-vm/drive
echo " echo "
==> Please stand by as we install your OS. ==> Please stand by as we install your OS.
@@ -82,7 +85,6 @@ echo "y\n" | mkfs.ext4 "/dev/${driveName}3"
echo "y\n" | mkfs.fat -F 32 "/dev/${driveName}2" echo "y\n" | mkfs.fat -F 32 "/dev/${driveName}2"
mount "/dev/${driveName}3" /mnt mount "/dev/${driveName}3" /mnt
mkdir /mnt/boot mkdir /mnt/boot
mkdir /mnt/boot/EFI
mount "/dev/${driveName}2" /mnt/boot mount "/dev/${driveName}2" /mnt/boot
pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager efibootmgr grub man git xfce4 base-devel fish sudo gdm plymouth neovim --noconfirm pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager efibootmgr grub man git xfce4 base-devel fish sudo gdm plymouth neovim --noconfirm