NetBSD-Users archive

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

[Solved] Re: Cannot boot, was: Re: Can't install NetBSD to ffs2 partition, no errors



On Fri, 7 Oct 2022 at 12:05, Ottavio Caruso
<ottavio2006-usenet2012%yahoo.com@localhost> wrote:
>
> On Fri, 7 Oct 2022 at 10:36, Martin Husemann <martin%duskware.de@localhost> wrote:
> >
> > On Fri, Oct 07, 2022 at 10:32:04AM +0000, Ottavio Caruso wrote:
> > > On Fri, 7 Oct 2022 at 09:54, Martin Husemann <martin%duskware.de@localhost> wrote:
> > > >
> > > > On Fri, Oct 07, 2022 at 09:12:59AM +0000, Ottavio Caruso wrote:
> > > > > /mnt/EFI/Boot:
> > > > > BOOTX64.EFI
> > > > > bootia32.efi
> > > >
> > > > These two are the NetBSD ones (for 32bit and 64bit UEFI).
> > > >
> > > > Martin
> > >
> > > Yes, I thought so. These are the files that come standard with the EFI
> > > system partition. I didn't add anything. Or should I overwrite them
> > > with the ones from sysinst?
> >
> > No, all is fine (and sysinst updates them there when you update).
> >
> > You have to find a way to tell your UEFI to boot those files (most likely
> > the BOOTX64.EFI one) directly when you want to boot NetBSD.
>
> Ok then probably somewhere in the grub command line.
>

[x-posted back to netbsd-users for posterity]

I've managed to chainload the efi boot files from Grub2.

Recap: on my system (hd0,gpt2) is the second partition containing all
the EFI boot files (NetBSD, Linux and Windows); (hd0,gpt5) is the
NetBSD partition.

Steps on Linux:

- Become root;
- Add these lines to /etc/grub.d/40_custom

menuentry "NetBSD" {
        insmod part_gpt
        insmod chain
        set root=(hd0,gpt5)
        chainloader (hd0,gpt2)/EFI/boot/bootx64.efi
}

# update-grub2
# reboot

The chainloader will go and find the "bootx64.efi" file in the second
partition. No need to have an efi dedicated partition in the NetBSD
wedge.

A "NetBSD" entry will appear on the Grub splash screen.

Enjoy.

Feel free to put that somewhere in the wiki or I can add that to an
existing page as a comment.



-- 
Ottavio Caruso

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


Home | Main Index | Thread Index | Old Index