grub2 FTBFS on amd64 and i386 due to test failures

Bug #1775249 reported by Łukasz Zemczak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Critical
Łukasz Zemczak
seabios (Ubuntu)
Won't Fix
Critical
Unassigned

Bug Description

Something in the archive caused grub2 to start to FTBFS in cosmic as seen in the 2.02-2ubuntu9 version currently in cosmic-proposed:

https://launchpad.net/ubuntu/+source/grub2/2.02-2ubuntu9

A no-change rebuild of 2.02-2ubuntu8 also fails in the same way.

After some basic investigation, I have noticed that possibly something changed in qemu between bionic and cosmic, causing qemu-system-i386 to print out SeaBIOS output to the serial console. Some of the tests depend on reading output of qemu-system-i386 (through the serial console) and those are now failing as it is all prepended with bios output - while in bionic it was not. This might be only one part of the problem though.

Related branches

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

As an example, the pata_test test is failing since it expects "Hello World" at the output of grub-shell but instead it gets SeaBIOS loading output + Hello World.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Actually, the aforementioned qemu thing looks to be a regression (change?) in the seabios package. Reverting it to the seabios version (the one in bionic) seems to help with this particular issue.

Changed in seabios (Ubuntu):
importance: Undecided → Critical
Changed in seabios (Ubuntu):
status: New → Won't Fix
Changed in grub2 (Ubuntu):
status: New → In Progress
assignee: nobody → Łukasz Zemczak (sil2100)
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

So, what happened is that with seabios 1.11.1-1 a serial console has been implemented and enabled by default, redirecting all VGA output (SERCON is by default y). There was no such thing before and this is now causing issues. It would be unwise to try and change the default, as we would introduce a delta against Debian. There's a workaround we can use which solves the problem.

The grub2 test suite relies on serial output as this is how grub-shell communicates with the tests being run. Thankfully, seabios has support for runtime configuration, which is done through the fw_cfg interface in qemu. Passing "-fw_cfg name=etc/sercon-port,string=0" to the qemu-system-* calls in grub-shell forces seabios to use a different port for its own output, therefore not interfering with what is used by grub. There's an additional warning printed out, but it doesn't seem to interfere with the actual tests.

I am currently test-building that to make sure it's enough to make grub2 buildable again. If yes, I will release it to cosmic and then forward to Debian - as they're also affected by the same change.

Changed in grub2 (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02-2ubuntu10

---------------
grub2 (2.02-2ubuntu10) cosmic; urgency=medium

  * debian/patches/grub-shell-test-helper-disable-seabios-sercon.patch: In the
    grub-shell test helper, disable seabios's serial console through fw_cfg
    runtime configuration as its boot output interferes with testing.
    (LP: #1775249)

 -- Łukasz 'sil2100' Zemczak <email address hidden> Wed, 06 Jun 2018 01:03:26 +0200

Changed in grub2 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.