Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jul 2015 00:12:45 -0400
From:      Eric McCorkle <eric@metricspace.net>
To:        Andrey Fesenko <f0andrey@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: EFI ZFS loader successful load and boot
Message-ID:  <559F463D.8020402@metricspace.net>
In-Reply-To: <CA%2BK5SrN2ZJZRd4bcapz%2Bw%2B9hVOxhsf9KiK9-MsFEjKS-oOJ9Hw@mail.gmail.com>
References:  <5560F4FE.4030502@metricspace.net>	<5560F743.9000507@metricspace.net>	<7CD9D028-8BCE-4361-966B-140642BAE341@metricspace.net>	<98598C0A-D09A-4BC7-A15C-5422BBA2EE4C@gmail.com>	<55761E58.6040704@metricspace.net>	<CA%2BK5SrM4n8hCzGMpTwhuswjgEP2T6zmEBCGy00__8Ne9j7WoqQ@mail.gmail.com>	<5590025E.9030907@metricspace.net> <CA%2BK5SrN2ZJZRd4bcapz%2Bw%2B9hVOxhsf9KiK9-MsFEjKS-oOJ9Hw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--2eJ2LF3PeoHqJR9s36FdaA7tGri21mA5w
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 07/09/2015 11:48 PM, Andrey Fesenko wrote:
> On Sun, Jun 28, 2015 at 5:19 PM, Eric McCorkle <eric@metricspace.net> w=
rote:
>> On 06/28/2015 01:39 AM, Andrey Fesenko wrote:
>>
>>> Unable to load the kernel, i'm make simple gpart structure
>>>
>>> GPT
>>> efi part  <- write /boot/loader.efi as efi/boot/bootx64.efi
>>> ZFS root pool
>>
>> Just saw this part.  You want to write /boot/boot1.efi to
>> efi/boot/bootx64.efi, not loader.
>>
>=20
> I tried to try a new boot loader again, unfortunately, once again
> failed to load, but it turned out a few facts:
> loader start with clear environment (loader device efi, not zfs env),
> https://bsdnir.info/files/efi/ screenshot lszfs - efi-zfs-notenv.jpg,
> zfs_get.txt and zpool_get.txt contain zfs/zpool get all list's
>=20
> If possible, put the master image of the for recording to the flash
> that we could rely on him.
>=20

Definitely something weird going on.  The most obvious next step as far
as I can tell would be to actually look at the partition type GUID's.

Here's a theory as to what might be going on:

1) Trying to load a filesystem that isn't actually that FS type somehow
messes up the state of the fs loader code in ways that break future attem=
pts

2) Doing legacy first causes the BIOS to order the partitions
differently than it would if you do UEFI only

3) Because the current boot1 blindly tries to probe everything, it gums
up the FS code, but switch the order around and it works (because it
didn't probe a wrong partition first).

I'll try and get the partition type GUID check done this weekend.


As for loader, it reminds me of issues I had to fix to get loader
working in the first place (which suggests I missed an edge case).

Basically, loader has a device info struct (I forget the exact name) for
describing devices.  But ZFS devices need additional info, so I did a
quick fix of re-allocating the struct with the additional space if it's
a ZFS device.

A better solution would be to add padding space to the device info
struct, similar to what's done with struct sockaddr.  Then specific
subclasses could store their data in the padding (like struct
sockaddr_un and struct sockaddr_in), but you could still refer to it by
the more general type.

It seemed like a bit too progressive of a change, but in light of this,
it might be the way to go.


--2eJ2LF3PeoHqJR9s36FdaA7tGri21mA5w
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVn0ZBAAoJECuREQPg1IcESQsP/1wl8wUP8WbirB7/fDDE0mfU
2xSJFmSA3NN3vyx87MT/JlNrchQ1RD759FfFwNTxRg5NntZ5pWPOAgrW5C6xyo94
g9AxQ8fmDMAhXQbrP154psPvKSHjjK6ax81pTGQYHHNc7NryqF0jLfmyfWYAKGxW
G8tPUuDQNCNFzIshp5J5OeHNJ9ZpkiJUWgN0uzoJ0ee7Nj0RlcEtXJF5lOxSh0dJ
D4/uHEzQYClMg9jzYXWPlhZRNjcIl89b9OsT0mgm1KBg3+w4UdMbDZqWvtos9tSQ
FkLDpe13ZQGROrCFsgzyowqIHmDcC0T/32sAc01M7AYnpIePodboTBvCHnYWbpVA
LsoTmLViDkBpWiYLBYd8bMd+cRYLQ8ujvllOH6UP19eNJ2x3waSZRcbTJzOvuL8X
UUA8jycjWCni9aWI5zyASTPr8YI2V1cWMXgTg9/sPQFLBMpvuukpSsP5m2fqURIt
AxlLvn5d7F7ctl4Io/8txZUIQNo3B8O2l37yDGXLjAM12fVwmiIFUvHLj143Q3TR
534Uh1rAmHEvLwV5xnSx8DRh/wyfUmO5jU9bRbHqy5F/yr2UcKDHDjPLmEwjSOWn
6SEEBsA8rRTs1YxL6qSQ0iKGkKlKX0oVqqeAfWrJ92OWZFa3hP2zbc0A8VxDDfjS
1PFyLFuAhsn1lGzmuyfi
=Mym/
-----END PGP SIGNATURE-----

--2eJ2LF3PeoHqJR9s36FdaA7tGri21mA5w--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?559F463D.8020402>