You've already forked osfv-test-data
mirror of
https://github.com/Dasharo/osfv-test-data.git
synced 2026-06-13 19:16:20 -07:00
deploy-shell-efi.sh: Fix partition num breaking on nvme0n1p1
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ś <filip.golas@3mdeb.com>
This commit is contained in:
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user