[PATCH] sysinst: create UEFI boot entry during install
Gautam Agrawal <[email protected]> Wed, 29 Apr 2026 19:35:58 +0530
| Newsgroups | gmane.os.netbsd.devel.installation |
|---|---|
| Message-ID | <CAG-ETXv5QihqW67j7vVDC8S_WtYVGuDgi47y2O5rhKundXycqg@mail.gmail.com> |
* Adds support for creating a UEFI Boot#### entry during sysinst installation, so that NetBSD appears with a proper label instead of the default "UEFI OS" or "MISC DEVICE" * This change invokes /sbin/efi to create an entry pointing to \EFI\boot\bootx64.efi with "NetBSD" label. Signed-off-by: Gautam Agrawal <[email protected]> --- usr.sbin/sysinst/arch/i386/md.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.sbin/sysinst/arch/i386/md.c b/usr.sbin/sysinst/arch/i386/md.c index 1078e76edaca..b72307506768 100644 --- a/usr.sbin/sysinst/arch/i386/md.c +++ b/usr.sbin/sysinst/arch/i386/md.c @@ -378,6 +378,18 @@ copy_uefi_boot(const struct part_usage_info *boot, bool target_is_populated) if (boot->mount[0] == 0) target_unmount("/mnt"); + /* create uefi boot entry */ + err = run_program(RUN_DISPLAY, + "/sbin/efi --quiet --create " + "--loader=\\EFI\\boot\\bootx64.efi " + "--label=NetBSD --disk=%s", + boot->parts->disk); + + if (err != 0) { + process_menu(MENU_ok, + __UNCONST("Unable to create NetBSD EFI boot entry")); + } + return 0; } -- 2.43.0