From 7e30b06e931ff60513bea8a542438696cffc1217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Go=C5=82a=C5=9B?= Date: Fri, 25 Jul 2025 12:17:56 +0200 Subject: [PATCH] deploy-shell-efi.sh: Fix partition num breaking on nvme0n1p1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was just getting all digits from the disk name, so nvm0n1p1 resulted in part num `011` which was interpreted as partiion number 11 resulting in a broken boot entry in the UEFI boot manager. Now only the last sequence of digits is taken into account and returns `1` for both `sda1` and `nvme0n1p1` creating bootable UEFI Shell boot entries. Signed-off-by: Filip Gołaś --- uefi-shell/deploy-shell-efi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uefi-shell/deploy-shell-efi.sh b/uefi-shell/deploy-shell-efi.sh index 7dd22fc..c2beea0 100755 --- a/uefi-shell/deploy-shell-efi.sh +++ b/uefi-shell/deploy-shell-efi.sh @@ -36,7 +36,7 @@ cp "$SHELL_EFI_SRC" "$DEST_EFI" PART_DEV=$(findmnt -no SOURCE "$ESP") DISK=$(lsblk -no PKNAME "$PART_DEV" | head -n1) -PART_NUM=$(echo "$PART_DEV" | sed 's/[^0-9]*//g') +PART_NUM=$(echo "$PART_DEV" | sed -E 's/.*[^0-9]([0-9]+)$/\1/') DISK_DEV="/dev/$DISK" echo "Registering UEFI boot entry..."