NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Regarding the boot process.



Hello again,

I have investigated this issue more. And read the boot and x86/boot
man pages. Also read the gpt man page and browsed the net to get more
information. Here is what I did today.

I started the system up from usb, and looked at the fstab and the gpt outputs.

The /etc/fstab contains the names of the swap and the root partition
using the NAME=GUID format. And the GUID's correspond to the GPT
partition labels. This is correct I think.

On the other hand, this is very interesting, when I run the "gpt show
-a sd0" (which is where the HDD is connected via USB) I see that the
NetBSD partition has the "biosboot" attribute, not the "bootme"
attribute. Would this cause the boot to fail? According to
the manual page for gpt, this partition should be booted by legacy
BIOS boot code. But this is not the case on my system. But in the
/EFI/boot directory of the EFI partition I have both the efi files
bootx64.efi and bootia32.efi.

The reason for the biosboot attribute being set might have been me,
when installing the system. I remember vaguely that I had a problem
with secure boot and might have switched to legacy mode and installed
the system like that using gpt instead of mbr, but switched the system
back to UEFI when I could not start windows.

Can I correct this problem with the gpt utility, by setting the flag
to bootme? Or do  I have to re-install the system again?

But still i can not explain why the usb can boot the system?

Regards,
Riza

On Fri, Sep 3, 2021 at 10:24 AM Michael van Elst <mlelstv%serpens.de@localhost> wrote:
>
> riza.dindir%gmail.com@localhost (Riza Dindir) writes:
>
> >This would have to be on the same drive (HDD). meaning the UEFI boot
> >loader and the OS root partition?
>
> The EFI bootloader checks the paths:
>
> esp:/EFI/NetBSD/boot.cfg
> boot.cfg
>
> the first is on the EFI sytem partition ("esp:").
>
> the second is relative to the boot partition, which in netbsd-9 is
> the EFI system partition but was changed in -current to the assumed
> root partition.
>
> Using this, you could make it load the kernel from any disk
> that EFI understands (using "bios" partition names like hd0a:)
> by adding a boot menu entry like 'menu=boot hd1a:netbsd').
>
> The EFI bootloader can also resolve wedge names ("NAME=xxxx:") and
> in -current also raidframe units ("raidNx:").
>


Home | Main Index | Thread Index | Old Index