Bug 39009 - Customer reported that booting via UEFI was not possible
Customer reported that booting via UEFI was not possible
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCS Installer - DVD
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.1-0-errata
Assigned To: Janek Walkenhorst
Sönke Schwardt-Krummrich
:
Depends on:
Blocks: 47330
  Show dependency treegraph
 
Reported: 2015-07-23 11:08 CEST by Sönke Schwardt-Krummrich
Modified: 2018-07-10 09:28 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2015-07-23 11:08:46 CEST
Ticket #2015061121001123
A customer reported that booting via UEFI was not possible:
The installation failed on a Lenovo Thinkserver TD200x with Serveraid BR10i SAS RAID-Hostadapter with LSI 1068i based chipset.
The deactivation of UEFI was not successful so the customer created a bootable USB stick from our installation ISO without /efi/boot, so the legacy boot process was chosen by the server.

UEFI problem reported by the customer:
> Meldung: eine Prefix-Variable ist nicht gesetzt und 4 devices sind nicht vorhanden.

The prefix error happens on (nearly) all systems and is usually no real problem.
We do not have further information.
Comment 1 Michael Grandjean univentionstaff 2015-11-05 20:39:19 CET
I experienced this again today with an IBM x3650 M2 7947-K1G.

Boot with UCS_4.0-3-amd64.iso (23-Sep-2015 09:16),
tried via DVD and USB pendrive, result was always:

> Booting in insecure mode
> error: variable 'prefix' isn't set.
> error: no device connected.
> error: no device connected.
> error: no device connected.
> error: no device connected.
> error: no device connected.
> error: no device connected.

Then the installer was stuck, no grub rescue shell. We had to reset the system.
A firmware update on the IBM server was successful, but did not resolve the problem. There was no possibility to deactivate the UEFI boot completely, only some additional legacy options that didn't help either.

We then tried the UCS_3.2-6-UEFI-amd64.iso (26-May-2015 05:39), because that was the last one with a dedicated UEFI ISO I could find. This one worked immediately. The boot was no problem and the installer came up just fine. 

I didn't try the workaround from comment #0 yet.

The bug status is NEEDMOREINFO - how can I provide additional information on this issue? I _might_ have some time with the IBM server tomorrow morning.

Philipp had the same errors in #35918, maybe that's also a hint?
Comment 2 Michael Grandjean univentionstaff 2015-11-09 10:58:58 CET
(In reply to Sönke Schwardt-Krummrich from comment #0)
> The deactivation of UEFI was not successful so the customer created a
> bootable USB stick from our installation ISO without /efi/boot, so the
> legacy boot process was chosen by the server.

That also helped with the server from comment #1:

> dd if=UCS_4.0-3-amd64.iso of=/dev/sdb bs=4M; sync
> mount /dev/sdb2 /mnt/usb_pendrive
> cd /mnt/usb_pendrive
> mv efi/boot efi/nothing_to_see_here
> cd && umount /dev/sdb2

Then the legacy boot process was chosen by the server.
I guess we should document this workaround somewhere more visible (SDB?).
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2015-12-15 10:38:41 CET
The problem is reproducible on our IBM xSeries 3650M3 and does not occur with the UCS 3.2-4 DVD but with UCS 4.1-0. IIRC the same grub version is used on both DVDs.
The initial grub boot step is unable to find the ISO image on any device.
So far I tried to create a custom tmp-grub.cfg (see https://hutten.knut.univention.de/mediawiki/index.php/UEFI#GRUB_signieren) with additional debug output and a different "search" command (the same as in Ubuntu):

cat > /root/tmp-grub.cfg <<EOF
echo Loading step 1
search --file --hint=\$bootdrive --set=root /.disk/info
echo "root=\${root}"
echo "prefix=\${prefix}"
set prefix=(\$root)/boot/grub
echo "root=\${root}"
echo "prefix=\${prefix}"
sleep 10
source \$prefix/x86_64-efi/grub.cfg
EOF
grub-mkimage -d. -o /root/gcdx64.efi -O x86_64-efi -c /root/tmp-grub.cfg -p \
             /efi/boot $(ls -1 *.mod | grep -v 'linux.mod' | sed -e 's/.mod$//g')


No luck so far. search always replies with "no device connected" and the boot process hangs. Some forum entries suggested that maybe some grub modules (e.g. pata) may cause trouble.
Comment 4 Janek Walkenhorst univentionstaff 2015-12-18 15:42:38 CET
On the test hardware GRUB hangs after printing those messages. Bisection leads to "ehci.mod" as one problem source. But there seem to be others as well, because it does not work with just ehci.mod removed. (It only works with a subset of modules until ehci.mod is added)

Jessie GRUB prints the same messages but does not hang. Therefore grub2 was imported from jessie.
The patches were migrated to the newer grub2 version. (r15652)

The build failed because "video_checksum"-tests failed. Those were removed (r15653)

There are still two failing tests:

1) iso9660_test
Reason:
  xorriso 1.2.2 : RockRidge filesystem manipulator, libburnia project.
  xorriso : FAILURE : Not a known option:  '--rockridge'
  xorriso : FAILURE : Not a known option:  'off'
  xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'

2) fddboot_test
Reason:
  Killed

The import of the new version fixes Bug #40280 too.
Comment 5 Janek Walkenhorst univentionstaff 2016-01-25 12:02:55 CET
(In reply to Janek Walkenhorst from comment #4)
> There are still two failing tests:
> 1) iso9660_test
> 2) fddboot_test
These tests fail because of an older xorriso version, they were disabled.

Build still fails due to Bug #40491 when building grub-xen.
Comment 6 Janek Walkenhorst univentionstaff 2016-01-25 18:52:26 CET
(In reply to Janek Walkenhorst from comment #5)
> Build still fails due to Bug #40491 when building grub-xen.
Built with manual workaround in buildsystem.

Advisories: grub-efi-amd64-signed.yaml grub2.yaml

Test DVD booted successfully on the test hardware.
Comment 7 Janek Walkenhorst univentionstaff 2016-01-26 12:42:58 CET
(In reply to Janek Walkenhorst from comment #6)
> Test DVD booted successfully on the test hardware.
This was a wrong test.
Comment 8 Philipp Hahn univentionstaff 2016-01-27 14:01:59 CET
repo_admin.py --cherrypick -r 4.1 --releasedest 4.1 --dest errata4.1-0 -p debian-cd

r15769 | Bug #39009 debian-cd: Fix size calculation

Package: debian-cd
Version: 3.1.13.15.201601271300
Branch: ucs_4.1-0
Scope: errata4.1-0

build-cd-ucs4 -r 4.1-0 -s errata4.1-0 -i ucs_4.1-0-errata4.1-0 --keep-installer
 ucs_4.1-0-20160127-133054-dvd-amd64.iso
Comment 9 Janek Walkenhorst univentionstaff 2016-01-27 14:47:56 CET
(In reply to Philipp Hahn from comment #8)
>  ucs_4.1-0-20160127-133054-dvd-amd64.iso
KVM installation: OK
Test hardware UEFI: OK

Advisories: grub-efi-amd64-signed.yaml grub2.yaml
Comment 10 Florian Best univentionstaff 2016-02-01 12:44:07 CET
During the dist-upgrade there are syntax error messages shown:

grub-common (2.02~beta2-22+deb8u1.105.201601251600) wird eingerichtet ...
Neue Version der Konfigurationsdatei /etc/grub.d/08_linux_xen wird installiert ...
Neue Version der Konfigurationsdatei /etc/grub.d/30_uefi-firmware wird installiert ...
Neue Version der Konfigurationsdatei /etc/grub.d/00_header wird installiert ...
Neue Version der Konfigurationsdatei /etc/grub.d/30_os-prober wird installiert ...
Neue Version der Konfigurationsdatei /etc/grub.d/10_linux wird installiert ...
Neue Version der Konfigurationsdatei /etc/grub.d/05_debian_theme wird installiert ...
Neue Version der Konfigurationsdatei /etc/bash_completion.d/grub wird installiert ...
grub2-common (2.02~beta2-22+deb8u1.105.201601251600) wird eingerichtet ...
grub-pc-bin (2.02~beta2-22+deb8u1.105.201601251600) wird eingerichtet ...
grub-pc (2.02~beta2-22+deb8u1.105.201601251600) wird eingerichtet ...
Removing update-grub hooks from /etc/kernel-img.conf in favour of
/etc/kernel/ hooks.
Replacing config file /etc/default/grub with new version
Installing for i386-pc platform.
installation beendet. Keine Fehler aufgetreten.
Generating grub configuration file ...
Found background image: uniboot.png
Linux-Abbild gefunden: /boot/vmlinuz-4.1.0-ucs167-amd64
initrd-Abbild gefunden: /boot/initrd.img-4.1.0-ucs167-amd64
Linux-Abbild gefunden: /boot/vmlinuz-4.1.0-ucs163-amd64
initrd-Abbild gefunden: /boot/initrd.img-4.1.0-ucs163-amd64
Found memtest86+ image: /memtest86+.bin
Fehler: syntax error.
Fehler: Incorrect command.
Fehler: syntax error.
Syntaxfehler in Zeile 106
In der erzeugten GRUB-Konfigurationsdatei wurden
Syntaxfehler entdeckt. Stellen Sie sicher, das die Dateien
/etc/default/grub und /etc/grub.d/* fehlerfrei sind oder
erstellen Sie einen Fehlerbericht mit /boot/grub/grub.cfg.new als Anhang.
erledigt


/boot/grub/grub.cfg.new → doesn't exists but the problem is reproducible when upgrading from the old grub version.
Comment 11 Stefan Gohmann univentionstaff 2016-02-02 06:45:26 CET
I had problems to set grub/default to the title. This feature was added through Bug #26763 and should work with the new grub version as well.
Comment 12 Janek Walkenhorst univentionstaff 2016-02-02 17:30:56 CET
(In reply to Stefan Gohmann from comment #11)
> I had problems to set grub/default to the title. This feature was added
> through Bug #26763 and should work with the new grub version as well.
Could not reproduce:

ucr set grub/default='"Univention Corporate Server, mit Linux 4.1.0-ucs153-amd64"'

works as expected.

grub-common     2.02~beta2-22+deb8u1.105.201601251600
grub-pc 2.02~beta2-22+deb8u1.105.201601251600
grub-pc-bin     2.02~beta2-22+deb8u1.105.201601251600
grub2-common    2.02~beta2-22+deb8u1.105.201601251600
univention-grub 9.0.1-3.128.201602010915

(In reply to Florian Best from comment #10)
> During the dist-upgrade there are syntax error messages shown:
Could not reproduce, please send detailed instructions how to reproduce. I assume there is an artifact in "/etc/grub.d".

There is currently an error in 53-install_create_grub.efi_too.patch whereby the "grub.efi" file is not created in the EFI partition during installation.

Currently the menu entries are only half-translated:
# grep -oE "menuentry '[^']+'" /boot/grub/grub.cfg
menuentry 'Univention Corporate Server, mit Linux 4.1.0-ucs167-amd64'
menuentry 'Univention Corporate Server, with Linux 4.1.0-ucs167-amd64 (recovery mode)'
Comment 13 Janek Walkenhorst univentionstaff 2016-02-04 15:42:22 CET
(In reply to Janek Walkenhorst from comment #12)
> There is currently an error in 53-install_create_grub.efi_too.patch whereby
> the "grub.efi" file is not created in the EFI partition during installation.
r15843

> Currently the menu entries are only half-translated:
> # grep -oE "menuentry '[^']+'" /boot/grub/grub.cfg
> menuentry 'Univention Corporate Server, mit Linux 4.1.0-ucs167-amd64'
> menuentry 'Univention Corporate Server, with Linux 4.1.0-ucs167-amd64
> (recovery mode)'Bug #40586
Comment 14 Janek Walkenhorst univentionstaff 2016-02-05 18:44:18 CET
The new grub brought coreboot modules which halt the boot if added to the signed efi file, thus
<https://hutten.knut.univention.de/mediawiki/index.php?diff=next&oldid=45211>
Comment 15 Janek Walkenhorst univentionstaff 2016-02-05 18:45:09 CET
The config included in the efi image needs a workaround for booting:
<https://hutten.knut.univention.de/mediawiki/index.php?diff=next&oldid=45238>
Comment 16 Janek Walkenhorst univentionstaff 2016-02-05 18:46:57 CET
More debug output was added to the boot process:
<https://hutten.knut.univention.de/mediawiki/index.php?diff=next&oldid=45238>

58-install_show_loading_message.patch  r15867
Comment 17 Janek Walkenhorst univentionstaff 2016-02-09 15:27:07 CET
The amount of modules in the grubx64.efi file was reduced:
<https://hutten.knut.univention.de/mediawiki/index.php?diff=45618&oldid=45543>

Resulting versions: 
 grub2
   2.02~beta2-22+deb8u1.107.201602051734
 grub-efi-amd64-signed
   2.0-7.27.201602091353
 DVD
   ucs_4.1-0-20160209-135610-dvd-amd64.iso

Tests:
  UEFI SecureBoot
    Boot from USB: OK
    Boot after installation: OK
  UEFI on test hardware
    Boot from USB: OK
    Boot after installation: OK
  BIOS on KVM
    Boot from DVD: OK
    Boot after installation: OK
Comment 18 Sönke Schwardt-Krummrich univentionstaff 2016-02-10 15:06:56 CET
Patches seem to be ok.
No syntax errors observed during updates.
Tested the following setups:

Install via DVD and reboot
* OK: IBM x3650 (insecure - UEFI)
* OK: UEFI test hardware (secure - UEFI)
* (OK): Schulungsraum: booted DVD in UEFI mode - no complete install (insecure - UEFI)
* OK: KVM: legacy mode

Install via USB stick and reboot
* OK: IBM x3650 (insecure - UEFI)
* OK: UEFI test hardware (secure - UEFI)
* (OK): Schulungsraum: only booted DVD in UEFI mode - no reboot (insecure - UEFI)

Update 4.1 latest to testing errata
* OK: Schulungsraum: installed and updated in legacy mode
* OK: KVM: legacy mode: updated and rebootet

→ VERIFIED
Comment 19 Florian Best univentionstaff 2016-02-10 15:08:46 CET
(In reply to Sönke Schwardt-Krummrich from comment #18)
> No syntax errors observed during updates.
Well, that's not true. I see them always! Bug #40628. I use plain apt-get dist-upgrade.