From fe66da19f826fa752097d011e022465252a40915 Mon Sep 17 00:00:00 2001
From: nl6720 <nl6720@gmail.com>
Date: Tue, 21 May 2024 13:23:03 +0300
Subject: [PATCH] install_arch: improve the ESP file system label

Use an uppercase LABEL to avoid a warning from mkfs.fat:

    mkfs.fat: Warning: lowercase labels might not work properly on some systems

Use something other than "efi" as the label since some firmware do not
like it. While this is not really an issue for Arch infrastructure, since
there is zero change that this will be run on any MSI hardware with its
broken firmware, it is best to simply folow the wiki anyway. See
https://wiki.archlinux.org/title/EFI_system_partition#Firmware_does_not_see_the_EFI_directory
---
 roles/install_arch/tasks/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/install_arch/tasks/main.yml b/roles/install_arch/tasks/main.yml
index e86ec1635..a0c7dd080 100644
--- a/roles/install_arch/tasks/main.yml
+++ b/roles/install_arch/tasks/main.yml
@@ -50,8 +50,8 @@
   register: sgdisk
   changed_when: "sgdisk.rc == 0"
 
-- name: Format the efi disk  # noqa no-changed-when
-  command: mkfs.fat -F 32 -S 4096 -n efi {{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }}
+- name: Format the EFI system partition  # noqa no-changed-when
+  command: mkfs.fat -F 32 -S 4096 -n ESP {{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }}
 
 - name: Partition and format the disks (btrfs RAID)  # noqa no-changed-when
   command: mkfs.btrfs -f -L root -d {{ raid_level | default('raid1') }} -m {{ raid_level | default('raid1') }} -O no-holes {{ system_disks | map('regex_replace', '^(.*)$', '\g<1>p3' if 'nvme' in system_disks[0] else '\g<1>3') | join(' ') }}
-- 
GitLab