Compiling CoreOS's GRUB under Ubuntu

50 views
Skip to first unread message

Artem Leshchev

unread,
Jun 20, 2018, 7:20:18 AM6/20/18
to CoreOS Dev
Hello everybody. Can someone help me with compiling CoreOS's GRUB under Ubuntu? We are trying to set trusted boot and TPM support in CoreOS project seems very convenient for us.

Almost everything works fine except of gptprio_test, which always FAILs for me in its current state. I've tried to revert its last change from Aug 23, 2016, and it worked fine.
I have started discussion at https://github.com/coreos/grub/commit/d457364d1d811ad262519cf6dde3d098caf7c778#commitcomment-29414984 , thinking that it is permanent problem, but David Michael replied that he has no problems with this test.

Thats how I trying to build everything. I'm taking clean Ubuntu 18.04, enabling source repositories and running next commands:
sudo apt-get build-dep grub2
sudo apt install git ovmf
git clone https
://github.com/coreos/grub.git
cd grub
./linguas.sh
./autogen.sh
CFLAGS
="-Wno-error=unused-value" ./configure --with-platform=efi --target=x86_64
make
make gptprio_test
.log # or make check

Tried also installing 
libfreetype6-dev, xorriso, and qemu-kvm from David's reply (only qemu-kvm was absent) and starting from scratch, but it doesn't change anything.

Looking forward for any help.

Artem Leshchev

unread,
Jun 20, 2018, 7:48:47 AM6/20/18
to CoreOS Dev
I have added hexdump after each step in gptprio_test and looks liks gptprio.next really repairs backup GPT, while test states that it should not.

David Michael

unread,
Jun 20, 2018, 10:20:26 AM6/20/18
to coreo...@googlegroups.com
On Wed, Jun 20, 2018 at 7:20 AM, Artem Leshchev <mat...@gmail.com> wrote:
> Hello everybody. Can someone help me with compiling CoreOS's GRUB under
> Ubuntu? We are trying to set trusted boot and TPM support in CoreOS project
> seems very convenient for us.
>
> Almost everything works fine except of gptprio_test, which always FAILs for
> me in its current state. I've tried to revert its last change from Aug 23,
> 2016, and it worked fine.
> I have started discussion at
> https://github.com/coreos/grub/commit/d457364d1d811ad262519cf6dde3d098caf7c778#commitcomment-29414984
> , thinking that it is permanent problem, but David Michael replied that he
> has no problems with this test.
>
> Thats how I trying to build everything. I'm taking clean Ubuntu 18.04,
> enabling source repositories and running next commands:
> sudo apt-get build-dep grub2
> sudo apt install git ovmf
> git clone https://github.com/coreos/grub.git
> cd grub
> ./linguas.sh
> ./autogen.sh
> CFLAGS="-Wno-error=unused-value" ./configure --with-platform=efi --target=x86_64

Okay, thanks for sending the configure line. I ran the test with the
pc platform, which passes reliably, but I do see the failure with efi.
I will look into this further.

Thanks.

David

Artem Leshchev

unread,
Jun 20, 2018, 10:29:34 AM6/20/18
to CoreOS Dev
среда, 20 июня 2018 г., 17:20:26 UTC+3 пользователь David Michael написал:
Okay, thanks for sending the configure line.  I ran the test with the
pc platform, which passes reliably, but I do see the failure with efi.
I will look into this further.

Looking forward for the solution. Thanks for your feedback.

David Michael

unread,
Oct 4, 2018, 11:28:58 AM10/4/18
to coreo...@googlegroups.com
Sorry for the lack of response; this has not gotten priority in any
recent sprints. The CoreOS GRUB customizations will not be carried
forward into the new Fedora CoreOS and Red Hat CoreOS distros, so it
is unlikely to receive further development effort. This test failure
appears to have been present for a long time without affecting actual
usage, but if you or another external contributor wants to submit a
fix, we can apply it. Note that the gptprio command is specific to
the CoreOS A/B partitioning, so it should not affect your Ubuntu TPM
use case anyway. (Maybe you can just drop that part.)

For the future, you might want to consider getting involved with the
upstream GRUB TPM implementation for a more actively maintained
solution. A new patch set for the verifiers framework (which TPM will
use) was sent yesterday:

https://lists.gnu.org/archive/html/grub-devel/2018-10/msg00001.html

Thanks.

David
Reply all
Reply to author
Forward
0 new messages