tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GPT attributes in dkwedgeq
Date: Tue, 12 Sep 2023 07:21:10 +0000
From: Emmanuel Dreyfus <manu%netbsd.org@localhost>
Message-ID: <ZQARZvLQu20seaPo%homeworld.netbsd.org@localhost>
| Context: if a RAIDframe set contains a GPT, it does not honour the
| bootme atrtribute when loking for the root partition. The current
| behavior hardcodes the use of the first partition.
Does it, really? I have been using a setup (since NetBSD 6 days)
with root in a GPT in a raid array, and for me, if the raid array is
raidN (for me, it happens to be raid7 for historical reasons, most of
raid0..6 no longer exist) then the raidframe code looked for a partition
labelled raidNa (in my case raid7a) to be the root.
Those names (the NAME= things in userland) are attached to wedges, and
can be located easily, and match what happens when a disklabel is
configured to generate wedges (though in that case it would be assuming
that the 'a' partition from the disklabel, inside the raid, is the one
you'd want to be root - but that matches what regular disklabel booting
assumes I think, it has been a long time since I booted that way).
If the raidNa hack has vanished sometime in the past decade or so, then
perhaps we should just restore it? If it hasn't, just document it
(which I think is one thing which was never done, I discovered it by
code reading).
If there is no GPT partition labelled raidNa in raidN (the raidframe to
hold the root) then some fallback is needed, and picking the first partition
is as good as anything else - you'd need a fallback if you ended up using
the bootme flag (please don't), in case none of the partitions has that set,
and again, the first partition seems reasonable.
kre
ps: it is possible to invent new GPT flags (system dependant ones - which
would only be interpreted when the GUID of the partition is generated by
a system which understands and defines that flag for the purpose - simply
ignoring the unknown flag bit on a partition from any unknown creator).
Home |
Main Index |
Thread Index |
Old Index