Open emk2203 opened 6 months ago
This response is machine translation, please understand
Hi,I also encountered this problem.
I found that the output of my computer's efibootmgr --verbose
command was different from the project examples:
efibootmgr --verbose
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0003,2001,0000,2002,2003
Boot0000* ubuntu HD(1,GPT,525b6ddd-b38e-44ed-920e-51818dc5b505,0x800,0x82000)/\EFI\ubuntu\shimx64.efiRC
dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 08 00 00 00 00 00 dd 6d 5b 52 8e b3 ed 44 92 0e 51 81 8d c5 b5 05 02 02 / 04 04 34 00 5c 00 45 00 46 00 49 00 5c 00 75 00 62 00 75 00 6e 00 74 00 75 00 5c 00 73 00 68 00 69 00 6d 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
data: 52 43
Boot0001* ...
Boot0003* Windows Boot Manager HD(2,GPT,690619cf-276a-4c66-b186-3830a1741b4b,0x8000,0x32000)/\EFI\Microsoft\Boot\bootmgfw.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d0000002d000100000010000000040000007fff0400
dp: 04 01 2a 00 02 00 00 00 00 80 00 00 00 00 00 00 00 20 03 00 00 00 00 00 cf 19 06 69 6a 27 66 4c b1 86 38 30 a1 74 1b 4b 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 69 00 63 00 72 00 6f 00 73 00 6f 00 66 00 74 00 5c 00 42 00 6f 00 6f 00 74 00 5c 00 62 00 6f 00 6f 00 74 00 6d 00 67 00 66 00 77 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 2d 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0004* ...
$ efibootmgr --verbose
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0002,0001,0017,001B,0000,0016,0019,001A,0018
Boot0000 Windows Boot Manager HD(1,MBR,0x5092863d,0x3cde8c,0x1340)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS...
Boot0001* ubuntu HD(1,GPT,2ffcc127-f6ce-40f0-9932-d1dfd14e9462,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0002* ubuntu HD(1,GPT,cba13b09-d754-4d31-9719-369fa60928d1,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0010 ...
Their output formats are different:
HD(...)/\EFI\...
HD(...)/File(\EFI\...)
So I solved this problem by changing the regular expression on line 129 of the script file from
if [[ $efi_data_line =~ ^Boot([[:xdigit:]]{4})\*?[[:blank:]]+(.+)[[:blank:]]+HD\(([[:digit:]]+),[^,]+,([^,]+)[^\)]+\)/File\(([^\)]+)\) ]] ; then
to
if [[ $efi_data_line =~ ^Boot([[:xdigit:]]{4})\*?[[:blank:]]+(.+)[[:blank:]]+HD\(([[:digit:]]+),[^,]+,([^,]+)[^\)]+\)/([^\)]+) ]] ; then
Hi @lrzl and thank you for you input.
Are you in a position to verify if a combined test statement works on your system? Something like this:
if [[ $efi_data_line =~ ^Boot([[:xdigit:]]{4})\*?[[:blank:]]+(.+)[[:blank:]]+HD\(([[:digit:]]+),[^,]+,([^,]+)[^\)]+\)/File\(([^\)]+)\) ]] \
|| [[ $efi_data_line =~ ^Boot([[:xdigit:]]{4})\*?[[:blank:]]+(.+)[[:blank:]]+HD\(([[:digit:]]+),[^,]+,([^,]+)[^\)]+\)/([^\)]+) ]] ; then
And if yes, do you mind submitting a pull request and becoming an official contributor? :)
Hi @lrzl and thank you for you input.
Are you in a position to verify if a combined test statement works on your system? Something like this:
if [[ $efi_data_line =~ ^Boot([[:xdigit:]]{4})\*?[[:blank:]]+(.+)[[:blank:]]+HD\(([[:digit:]]+),[^,]+,([^,]+)[^\)]+\)/File\(([^\)]+)\) ]] \ || [[ $efi_data_line =~ ^Boot([[:xdigit:]]{4})\*?[[:blank:]]+(.+)[[:blank:]]+HD\(([[:digit:]]+),[^,]+,([^,]+)[^\)]+\)/([^\)]+) ]] ; then
And if yes, do you mind submitting a pull request and becoming an official contributor? :)
This is a good suggestion, I will consider contributing compatible code
I am trying to rename an EFI entry from 'endeavouros' to 'EndeavourOS', but I only get an error message:
/home/emk2203/bin/rename-efi-entry.bash : ERROR : no EFI data found for any label matching 'endeavouros'.
The command I used was:
sudo ~/bin/rename-efi-entry.bash endeavouros EndeavourOS 0002
. Running without the0002
at the end gives the same result.This is the output of
rename-efi-entry
withoutsudo
(efibootmgr --verbose
doesn't show all entries):How can I fix this? The device is a Dell Latitude E6530 laptop from 2012, so it has one of the earlier UEFI implementations.