Closed guoh27 closed 2 years ago
For example: I run dd if=/dev/sda of=./file_disk.img
, file_disk.img is a raw disk file, and I want modify its efi entry and dd it to a SD card, and I can see the modified entry when boot from this SD card.
Hi @guoh27 , I derive from you comment that you have a specific data volume that may be copied/cloned to SD cards, and you would like to have an UEFI entry for booting from such SD data volumes. Please correct me if I got you wrong.
My first question is whether your computer/device allows booting from SD in general. That means whether it has an UEFI boot option for booting "just from SD" in addition to booting "just from HDD" or "just from SSD". By "just from ..." I mean a boot option entry for booting from just a specific device type without any knowledge of a specific data volume identifier.
If that is the case, you can try booting first "just from SD", and hopefully you may get a new more specific UEFI boot entry after that, linked to your specific volume. And you could probably use the rename-efi-entry.bash
script for renaming this new boot entry afterwards.
If that is not the case, then I am not very optimistic about your task, but you still could try doing everything manually, something like that:
efibootmgr
commands instead.efibootmgr
command manually with necessary amendments.May that do the job for you?
Thank you for your reply, maybe I misunderstood where the EFI entry is kept, I thought before that the EFI entry information can be kept on disk, I am very sorry
Hi @guoh27 , and please let me ask you to clarify what you mean by "modify file disk". Could you describe your use case in more detail? What kind of situation do you have, and what is the desired result?