picodotdev / alis

Arch Linux Install Script (or alis, also known as the Arch Linux executable installation guide and wiki) installs an unattended, automated and customized Arch Linux system.
https://picodotdev.github.io/alis/
GNU General Public License v3.0
823 stars 319 forks source link

Minor tweaks to default parted commands for UEFI #98

Closed rstrube closed 4 years ago

rstrube commented 4 years ago

First off thank you for creating this very powerful tool! It's an excellent way to learn shell scripting and better understand the Arch installation process.

I've been executing core logic in your script manually in an KVM/Qemu VM (with UEFI) and I noticed that the default commands that are used setting up partitions for a UEFI machine for parted could be tweaked.

Looking at the Arch wiki (https://wiki.archlinux.org/index.php/Parted#Partition_schemes), it states that when using GPT and parted the mkpart command should be followed by the partition label (rather than primary or extended). The current script creates two partitions, both with a label of primary. I've chosen ESP and root as the labels to match some of the file labels that are applied later on (in the mkfs.xxx commands).

I've also changed the set 1 boot on to set 1 esp on as this is specifically for GPT disks and appears to set the correct Partition Type GUID type for the ESP partition.

The command sgdisk -t=$PARTITION_BOOT_NUMBER:ef00 $DEVICE did not appear necessary as the Partition Type GUID was already setup correctly for me.

I've also updated the PARTITION_CUSTOM_PARTED_UEFI variable in alis.conf to match the updated defaults in the primary script.

picodotdev commented 4 years ago

Thank you for the pull request and the explanation.