Current-Users archive

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

Re: How to BIOS-boot from NVMe device?



    Date:        Wed, 7 Sep 2022 20:37:43 -0700 (PDT)
    From:        Paul Goyette <paul%whooppee.com@localhost>
    Message-ID:  <Pine.NEB.4.64.2209072031420.2010%speedy.whooppee.com@localhost>

  | I tried to run gpt biosboot (and specified -i 1 for the partition)
  | and I also ran installboot.

You didn't show the GPT tables for this system, so "-i 1" means nothing
to anyone but you at the minute, but if we're talking about the same system
as the "nvme hangs" system, then the layout from that on all your nvme
devices had an ESP in the GPT partition with index 1.   (That's kind of
normal, but not required).

If that's what was used, then yes, it would fail spectacularly...

The ESP isn't used for anything at all related to biosboot - nothing,
doesn't need to exist.   Once the system is running, it is a (usually)
smallish FAT formatted partition you can use for anything you like,
though as lon as it retains the ESP GUID in its type field, the BIOS
will keep looking for boot code in there (when it is using UEFI booting).

The biosboot partition is (should be) your NetBSD root.   The thing that
has /boot and /boot.cfg in it.

That's also what you want to use for installboot.

  | On a positive front, the BIOS seems to now recognize the NVMe as
  | having a UEFI OS.

That means that you also did what Michael suggested and copied the EFI
boot program into a boot directory in the ESP.   That's good.

  | Trying to boot it takes me down some new path
  | having to do with SecureBoot, and I don't have time for that now.

I wouldn't even consider trying to make that work.   As Chavdar Ivanov
indicated, it should be possible to disable secure boot in the BIOS
setup.

  | Any suggestions on how to get my legacy boot stuff back?

Two options to proceed - take a step forward, work out how to disable
secure boot in the bios, and continue with the UEFI boot.   That boot
method might, or might not, use your boot.cfg from the root filesystem,
it is more likely to want ESP/NetBSD/boot.cfg (where "ESP" is wherever
you have the ESP mounted, probably /efi from your earlier configs).
Currently I'm unable to make efiboot read boot.cfg from anywhere, it
simply uses its compiled in defaults (boot menu with the NetBSD flag
logo in the banner, which doesn't normally appear in boot.cfg files) -
but my system setup is a bit of a mess.

Alternatively, go back to bios booting, set up the right partition on
the NVME for biosboot (make sure the biosboot attribute is not set on
any partition you don't want to bios boot - which means only have it
set on one, once /boot is loaded from that partition, you can have boot.cfg
(read from the same partition) load the kernel and make the root be anywhere
you like, independently).

kre



Home | Main Index | Thread Index | Old Index