tech-kern archive

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

Re: GPT attributes in dkwedge [PATCH]



    Date:        Mon, 25 Sep 2023 05:57:49 +0000
    From:        Emmanuel Dreyfus <manu%netbsd.org@localhost>
    Message-ID:  <ZREhXTJxV3GwmbOO%homeworld.netbsd.org@localhost>

  | bootme.cfg is searched in EFI paririon /EFI/NetBSD/boot.cfg

Which EFI partition?   I think I have about 5 or 6, sprinkled around
various bootable devices (more than one on some).   None of them (boot.cfg
files) are used.   But in most of them I have (with a different banner)
boot.cfg files in their root directory, EFI directory, EFI/NetBSD
directory - and I think in a "boot" directory when one of those happens
to exist - maybe created by either wintrash (builders used) or linsux
(which I installed briefly in the very early days to test the system more
thoroughly - all removed now, except some vestigal boot nonsense that
sometimes gets in the way until I tell the firmware (again) to not use it,
as it has nothing to boot any more).

  | and root partition /boot.cfg. 

That's impossible - boot.cfg says where the root partition is to be
found, so boot.cfg has to be found first.   (But see just below for an
interpretation; and it is of much less consequence to me what is chosen
as root if boot.cfg doesn't say, one way or another, which filesystem that
should be, fallback defaults are of far less interest to me.)

I have several candidate roots, for NetBSD 10, current, whatever I
am testing this week, an experimental one (perhaps not working), ...
There's no sane way to load /boot.cfg from "it" (though I have one in at
least the root partition I use most of the time, which is my testing one,
which unsurprisingly, isn't used either).

However, if what you meant by:

  | Bootme tels bootstrap where to look root partition

is that it tells the bootstrap code where to locate boot.cfg,  whether
or not that also later happens to become the NetBSD root, via specification,
or as a default if there is no spec, then I think we are more or less in
agreement.

Of course I'd like it more if it worked, and I'll admit that updating
boot code is the thing I like to do least, as it is the most likely thing
I can do which will wedge the system and need real assistance (as in booting
from optical or USB, or something) to recover - so the efiboot that I am
currently using must be 16 months old now (late May 2022) - I have been
meaning to work out a safe way to update and try the current version - and
I actually have a fairly easy way now, when my system was repaired, I had a
new SSD added, a clone of the one which holds all of my potential roots,
and which has 2 EFI partitions, one of which boots NetBSD - ie: has the
NetBSD efiboot that actually gets used - but that one is connected to an
add in SATA controller, from which the firmware can't boot (it probably
could given an add on EFI driver to use, but that's above my pay grade).
All I need to do is swap the SATA cables to those two SSDs (after populating
the new one, of course) and I'll be able to boot from the new one - if that
fails, I can just swap back to get to the original one.

I know a lot of work has been done on efiboot since the one I am using, so,
before resorting to attempt to work out why it is unable to find any boot.cfg
for me (I don't really care which it finds, I can work with any of them) I
want to make sure the current version is still failing for me, and if so,
work out why (if not already fixed, it is probably something trivial).

kre



Home | Main Index | Thread Index | Old Index