Re: How to control booting via BIOS vs booting via EFI?
Johan Stenstam <[email protected]> Mon, 13 Oct 2025 21:59:09 +0200
| Newsgroups | gmane.os.netbsd.ports.x86-64 |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_7B0AC698-2361-4ECE-B9C7-FFDACF4F9F9F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Martin, Many thanks for your response. > On 12 Oct 2025, at 18:36, Martin Husemann <[email protected]> wrote: >=20 > I would be suprised if NetBSD/xen could not boot via UEFI but actually = all > my xen machines still use BIOS boot (mostly for historical reasons). >=20 > We have multiboot2 support, so technically it is unclear to me why xen > would fail. While I would very much like that to be true, I simply do not understand = enough of the boot magic to have an opinion other that =E2=80=9Cit seems = not to work=E2=80=9D. > However, unrelated to that: you can force BIOS boot by installing from > the amd64-bios-install.img[1] USB image and removing all existing = partitions > starting from scratch. Tried that; didn=E2=80=99t work. That image is not considered as = bootable by the firmware (it is as expected a pure traditional = MBR-partitioned BIOS-boot image). It seems clear that the firmware does = not boot such things. > Or you can manually modify your exixting setup by something like: >=20 > - remove the EFI partition (details depend on whether you used MBR > or GPT partitionining) > - install the proper first stage booloader (either via "gpt biosboot" > or by "installboot" if using MBR) > - copy /usr/mdec/boot to / on the NetBSD root partition I had already done the two latter things (and then the system still does = an UEFI-boot). Now I also did the first (removing the EFI boot). I did = not remove the entire partition, I only moved the directory /efi/boot/ = to /efi/boot.no/ <http://boot.no/>. After this the system doesn=E2=80=99t = boot at all from this disk. The mystery remains: exactly what magic is on the disk that enables = either system to do a BIOS-boot? The disk uses GPT partitioning, it has = the EFI bootloader in the original place (/efi/boot/bootxx64.efi) and in = general seems to be identical to a disk that I install from the = netbsd-10 installer. As the pure MBR install image wasn=E2=80=99t recognized as bootable it = seems that GPT is clearly a requirement (which presumably is to be = expected by a UEFI-system). Question is what else is needed. Regards, Johan > 1) = https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-10/latest/images/NetBSD-1= 0.1_STABLE-amd64-bios-install.img.gz > or = https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-11/latest/images/NetBSD-1= 1.0_BETA-amd64-bios-install.img.gz --Apple-Mail=_7B0AC698-2361-4ECE-B9C7-FFDACF4F9F9F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" = content=3D"text/html; charset=3Dutf-8"></head><body = style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; = line-break: after-white-space;">Hi Martin,<div><br></div><div>Many = thanks for your response.<br = id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote = type=3D"cite"><div>On 12 Oct 2025, at 18:36, Martin Husemann = <[email protected]> wrote:</div><div><div><br>I would be suprised = if NetBSD/xen could not boot via UEFI but actually all<br>my xen = machines still use BIOS boot (mostly for historical reasons).<br><br>We = have multiboot2 support, so technically it is unclear to me why = xen<br>would fail.<br></div></div></blockquote><div><br></div>While I = would very much like that to be true, I simply do not understand enough = of the boot magic to have an opinion other that =E2=80=9Cit seems not to = work=E2=80=9D.</div><div><br><blockquote type=3D"cite"><div><div>However, = unrelated to that: you can force BIOS boot by installing from<br>the = amd64-bios-install.img[1] USB image and removing all existing = partitions<br>starting from = scratch.<br></div></div></blockquote><div><br></div><div>Tried that; = didn=E2=80=99t work. That image is not considered as bootable by the = firmware (it is as expected a pure traditional MBR-partitioned BIOS-boot = image). It seems clear that the firmware does not boot such = things.</div><br><blockquote type=3D"cite"><div><div>Or you can manually = modify your exixting setup by something like:<br><br> - remove the EFI = partition (details depend on whether you used MBR<br> or GPT = partitionining)<br> - install the proper first stage booloader (either = via "gpt biosboot"<br> or by "installboot" if using MBR)<br> = - copy /usr/mdec/boot to / on the NetBSD root = partition<br></div></div></blockquote><div><br></div><div>I had already = done the two latter things (and then the system still does an = UEFI-boot). Now I also did the first (removing the EFI boot). I did not = remove the entire partition, I only moved the directory /efi/boot/ to = /efi/<a href=3D"http://boot.no/">boot.no/</a>. After this the system = doesn=E2=80=99t boot at all from this disk.</div><div><br></div><div>The = mystery remains: exactly what magic is on the disk that enables either = system to do a BIOS-boot? The disk uses GPT partitioning, it has the EFI = bootloader in the original place (/efi/boot/bootxx64.efi) and in general = seems to be identical to a disk that I install from the netbsd-10 = installer.</div><div><br></div><div>As the pure MBR install image = wasn=E2=80=99t recognized as bootable it seems that GPT is clearly a = requirement (which presumably is to be expected by a UEFI-system). = Question is what else is = needed.</div><div><br></div><div>Regards,</div><div>Johan</div><br><blockq= uote type=3D"cite"><div><div>1) = https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-10/latest/images/NetBSD-1= 0.1_STABLE-amd64-bios-install.img.gz<br>or = https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-11/latest/images/NetBSD-1= 1.0_BETA-amd64-bios-install.img.gz<br></div></div></blockquote></div><br><= /div></body></html>= --Apple-Mail=_7B0AC698-2361-4ECE-B9C7-FFDACF4F9F9F--