Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

efibootmgr -w is a no-op #101

Open
mgedmin opened this issue Oct 16, 2018 · 3 comments
Open

efibootmgr -w is a no-op #101

mgedmin opened this issue Oct 16, 2018 · 3 comments

Comments

@mgedmin
Copy link

mgedmin commented Oct 16, 2018

I was very curious about the --write-signature option and wanted to see what it actually does, so I looked at the source code.

What it's supposed to do: generate a random-ish number and write it into the 32-bit signature field in the MBR (at offset +440), when the current value of the signature in there is zero.

What it actually does: nothing, since commit ada1a1c. The command-line parser sets opt.write_signature = 1 but nothing checks if it's set or not. The code that should check is in make_linux_load_option() that calls efi_generate_file_device_path_from_esp() and ought to be setting the EFIBOOT_OPTIONS_WRITE_SIGNATURE bit in options when opts.write_signature is nonzero.

I could probably create a patch, but I don't think that I could test it properly. As I said, I discovered this by reading the source code rather than by having efibootmgr fail in practice.

@martinezjavier
Copy link

@mgedmin yes, I think you are correct. Do you feel like writing a patch for this ?

@mgedmin
Copy link
Author

mgedmin commented Jun 17, 2021

I have absolutely no memory of filing this issue, so it would be rather difficult.

@frozencemetery
Copy link
Member

The easiest patch to write would be to deprecate the option, I think - remove it from man page and --help etc.

@frozencemetery frozencemetery changed the title efibootmgr -w is ignored efibootmgr -w is a no-op Apr 1, 2022
aronowski added a commit to aronowski/rhboot-efibootmgr that referenced this issue May 9, 2023
According to rhboot#101, the
--write-signature option does nothing. This change removes the option.

Signed-off-by: Kamil Aronowski <[email protected]>
vathpela pushed a commit that referenced this issue Jan 23, 2024
According to #101, the
--write-signature option does nothing. This change removes the option.

Signed-off-by: Kamil Aronowski <[email protected]>
hmtheboy154 pushed a commit to android-generic/external_efibootmgr that referenced this issue Sep 8, 2024
According to rhboot#101, the
--write-signature option does nothing. This change removes the option.

Signed-off-by: Kamil Aronowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants