Bug 747102

Summary: Install fails on EFI machine
Product: Red Hat Enterprise Linux 6 Reporter: Andrew Cathrow <acathrow>
Component: ovirt-nodeAssignee: Mike Burns <mburns>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: acathrow, apevec, bsarathy, cshao, ddumas, gouyang, lagarcia, leiwang, mburns, moli, ovirt-maint, pjones, pvogel, rbalakri, tvvcox, ycui
Target Milestone: rc   
Target Release: 6.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-2.0.2-0.14.gitb764606.el6 Doc Type: Bug Fix
Doc Text:
Upgrades from beta to GA will result in an incorrect partitioning of the host. GA version must be installed clean. UEFI machines must be set to legacy boot options for RHEV-H to boot successfully after installation.
Story Points: ---
Clone Of:
: 749621 (view as bug list) Environment:
Last Closed: 2011-12-06 19:29:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 729698, 749621, 773069, 824928    
Attachments:
Description Flags
Patch 1
none
Patch 2
none
Screenshot of grub menu booted with grub.efi
none
followup patch
none
kernel panic
none
/tmp/ovirt.log
none
/var/log/ovirt.log-tmp none

Description Andrew Cathrow 2011-10-18 20:05:06 UTC
It appears that RHEV-H installation fails when booted in EFI mode.

Comment 2 Alan Pevec 2011-10-18 20:30:14 UTC
Frank, can you confirm if copying efi/EFI/redhat/grub.efi to the rhevh's Root partition is enough?

Comment 4 Pieter Vogel 2011-10-21 14:44:53 UTC
I tried it on a IBM x3650 M3
RHEL 6.1 installs correct with efi

RHEV-hypervisor (latest beta) Does install but doesn't setup EFI correct so the machine won't boot.

result:
It did make 2 boot partitions but both were formatted as ext3 and it did only put date on the boot-partition. 

expected result:
2 boot partitions: 1 for grub/kernels and 1 (formatted as vfat) for EFI.

Comment 5 Alan Pevec 2011-10-21 15:09:35 UTC
(In reply to comment #4)
> RHEV-hypervisor (latest beta) Does install but doesn't setup EFI correct so the
> machine won't boot.

Is there an option to choose Legacy boot or something like that?

Comment 6 Alan Pevec 2011-10-21 15:13:56 UTC
(In reply to comment #2)
> Frank, can you confirm if copying efi/EFI/redhat/grub.efi to the rhevh's Root
> partition is enough?

Replying to myself: no, it is not. Here's boot partition layout from RHEL 6.1 on an EFI box:

Boot disk:
p1      1049kB  211MB  210MB  fat16              boot
p2      211MB   735MB  524MB  ext4
p3      735MB   146GB  145GB                     lvm

p2 is mounted at /boot, p1 at /boot/efi
   /boot/efi/EFI/redhat/grub.conf
   /boot/efi/EFI/redhat/grub.efi
   /etc/grub.conf -> ../boot/efi/EFI/redhat/grub.conf
   /boot/grub/splash.xpm.gz
   /boot/grub/device.map

So we need to distinguish between EFI and Legacy machines, grub setup is quite different in each case.

Comment 7 Pieter Vogel 2011-10-24 07:25:41 UTC
(In reply to comment #5)

> 
> Is there an option to choose Legacy boot or something like that?

Yes I used it as workaround.

Comment 8 Mohua Li 2011-10-24 09:17:29 UTC
could reproduce on IBM x3550 machine, legacy boot is ok, boot with UEFI fail, as just  1 for grub/kernels and no boot partation (formatted as vfat) for EFI

Comment 12 Mike Burns 2011-10-26 16:30:48 UTC
Created attachment 530329 [details]
Patch 1

Small followup patch coming shortly

Comment 13 Mike Burns 2011-10-26 16:31:26 UTC
Created attachment 530330 [details]
Patch 2

Testing coming shortly

Comment 14 Mike Burns 2011-10-26 16:33:39 UTC
What the patch does:

Adds a new partition:  256MB (hard coded) with vfat filesystem that is flagged for boot
Also copies EFI contents to the new partition and automounts to /boot/efi in the running image

At this point, it has not been tested to boot EFI systems, but has been tested on non-EFI systems for no regressions.

Comment 15 Mike Burns 2011-10-26 23:06:28 UTC
Autoinstall fails due to inability to unmount liveos because of EFI mount


--- a/scripts/ovirt-config-boot
+++ b/scripts/ovirt-config-boot
@@ -183,6 +183,7 @@ ovirt_boot_setup() {
     mkdir -p $grub_dir/efi
     mount LABEL=EFI $grub_dir/efi
     cp -ra /boot/efi/* $grub_dir/efi
+    umount $grub_dir/efi
     cat > $grub_dir/grub.conf << EOF
 default saved
 timeout 5

Comment 21 Mike Burns 2011-10-27 12:23:13 UTC
Adding fstab entry was missed in TUI install

Comment 22 Alan Pevec 2011-10-27 14:36:11 UTC
Created attachment 530505 [details]
Screenshot of grub menu booted with grub.efi

grub.conf also needs to be in the same folder with grub.efi
When grub.efi is selected manually in UEFI setup menu, it shows grub menu but fails to find partition - need to investigate why.

Comment 23 Alan Pevec 2011-10-27 14:59:42 UTC
See bug 748725 comment 5 - if default is to try EFI and then legacy, fixing EFI boot shouldn't be a blocker. We only need to push the disk layout change since that affects future upgrades.

Comment 24 Mike Burns 2011-10-27 17:26:41 UTC
Cloned to bug 749621 for enabling EFI installs.

For this bug, we'll setup partitions only.

Comment 25 Mike Burns 2011-10-27 19:19:52 UTC
*** Bug 749477 has been marked as a duplicate of this bug. ***

Comment 26 Mike Burns 2011-10-27 19:26:58 UTC
Created attachment 530554 [details]
followup patch

fixes install on cciss
fixes missed umount in autoinstall
removes efi mount from fstab
doesn't set efi mount as "boot"

Comment 28 cshao 2011-10-28 03:28:59 UTC
Test version:
rhev-hypervisor6-6.2-20111019.5.el6

TUI install RHEVH to cciss, after reboot will cause kernel panic. 
No such problem when auto install to cciss.
Please see attachment for more details.
So change bug status to ASSIGNED.

Comment 29 cshao 2011-10-28 05:11:18 UTC
Created attachment 530610 [details]
kernel panic

Comment 31 cshao 2011-10-28 05:31:42 UTC
(In reply to comment #28)
> Test version:
> rhev-hypervisor6-6.2-20111019.5.el6
> 
> TUI install RHEVH to cciss, after reboot will cause kernel panic. 
> No such problem when auto install to cciss.
> Please see attachment for more details.
> So change bug status to ASSIGNED.

The same issue occurs in version rhev-hypervisor6-6.2-20111026.2.el6.

Comment 32 Mike Burns 2011-10-28 15:43:57 UTC
Can you please provide the ovirt.log from the installation?  (You can boot from media, and extract it that way).  Or provide a console log for the installation?

Comment 33 cshao 2011-10-31 06:21:31 UTC
(In reply to comment #32)
> Can you please provide the ovirt.log from the installation?  (You can boot from
> media, and extract it that way).  Or provide a console log for the
> installation?

About a few  seconds after boot to grub menu, the kernel panic will occur. So I can't obtain the ovirt.log file. 
There is no any output by serial console.

Comment 34 Mike Burns 2011-10-31 11:58:19 UTC
The ovirt log can be obtained by installing via TUI, then instead of choosing to reboot, drop to the shell, manually setup networking (use /usr/libexec/ovirt-config-networking) and root password/ssh password auth (use /usr/libexec/ovirt-config-password) then scp the log file off.

Comment 36 cshao 2011-11-01 02:15:14 UTC
Created attachment 531054 [details]
/tmp/ovirt.log

Comment 37 cshao 2011-11-01 02:15:55 UTC
Created attachment 531055 [details]
/var/log/ovirt.log-tmp

Comment 39 Mike Burns 2011-11-02 06:31:58 UTC
Thanks to jboggs and apevec


diff --git a/scripts/install.py b/scripts/install.py
index a80f049..d54c121 100755
--- a/scripts/install.py
+++ b/scripts/install.py
@@ -155,6 +155,8 @@ def ovirt_boot_setup():
         os.makedirs(grub_dir + "/efi")
         system("mount LABEL=EFI "+grub_dir+"/efi")
         system("cp -ra /boot/efi/* " + grub_dir + "/efi")
+        system("umount /liveos/grub/efi")
+
     if not system("cp -p /live/" + syslinux + "/vmlinuz0 " + initrd_dest):
         log("kernel image copy failed.")
         return False

Comment 48 Mike Burns 2011-11-04 14:44:59 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Upgrades from beta to GA will result in an incorrect partitioning of the host.  GA version must be installed clean.

Comment 50 Mike Burns 2011-12-02 13:43:17 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1,3 @@
-Upgrades from beta to GA will result in an incorrect partitioning of the host.  GA version must be installed clean.+Upgrades from beta to GA will result in an incorrect partitioning of the host.  GA version must be installed clean.
+
+UEFI machines must be set to legacy boot options for RHEV-H to boot successfully after installation.

Comment 51 Tomas Von Veschler 2011-12-04 12:52:54 UTC
Informational only, here are the steps to boot in legacy mode on IBM M3 servers with UEFI BIOS, needed to properly install and boot RHEV-H:

* To enter the UEFI\Basic Input/Output System (BIOS) menu, power on the server and press F1 during the IBM splash screen.

* Using the arrow keys to navigate, scroll down to highlight "Boot Manager" and press Enter.

* “Add Boot Option” is highlighted by default. Press Enter.

* Using the down arrow key, scroll down until "Legacy Only" is highlighted. Press Enter.

* Select “Change Boot Order” and press Enter.

* Press Enter to begin changing the boot order.

* Highlight Legacy Only and press Shift + to move it to the top. Press Enter.

* Press the down arrow once to highlight "Commit Changes" and press Enter.

Comment 52 errata-xmlrpc 2011-12-06 19:29:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1783.html