s-n-ushakov / rename-efi-entry

A Bash script to rename EFI boot entries
BSD 2-Clause "Simplified" License
84 stars 15 forks source link

Difficult to rename entry with empty label #4

Closed davidmegginson closed 3 years ago

davidmegginson commented 3 years ago

For some reason, Grub created an EFI entry with an empty label, and I found it challenging to rename. After hacking on the script for a while, I realised that I needed to use "Unknown Device: " (with the trailing space) to match the regex output.

Suggestion: if let the user include the empty string for the first argument if there's an entry level provided as a third argument, and skip the string matching.

Great tool, BTW -- thanks!

s-n-ushakov commented 3 years ago

Hi David, and thank you for the feedback with an interesting case :)

I have implemented your suggestion with a minor amendment, so that the missing / wildlcard label placeholder is '*' rather than empty string as first command line argument. Are you in a position to test the release candidate script version that is attached here?

Also: are you in a position to share your OS or other bootstrap item name, just for the records? :)

rename-efi-entry.bash.20210803-rc1.zip

davidmegginson commented 3 years ago

Thanks! Unfortunately, while your script worked as advertised (once I figured out the name issue), it turns out my laptop (Acer Nitro 5 running Ubuntu 21.04) doesn't preserve the UEFI changes on reboot, so I can't do an end-to-end test, but I could still confirm that it temporarily changes the UEFI records if that's helpful.

s-n-ushakov commented 3 years ago

Hi David again, and thank you for all the clarifications.

I have issued a new release that hopefully addresses and fixes your issue.

You are most welcome to mark the issue as closed if everything looks good to you now... :)

s-n-ushakov commented 3 years ago

Closed, as a fix was supplied, and no further comments followed.