CentOS Bug Tracker
spacer
Anonymous | Login | Signup for a new account2013-03-08 03:14 UTCProject: spacer
Main | My View | View Issues | Roadmap  

View Issue Details [ Jump to Notes ] [ Issue History ] [ Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005387CentOS-6efibootmgrpublic2012-01-04 10:002012-09-25 18:43
Reporterchanghai jiang 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformLinuxOSCentOS 6.2OS VersionCentOS 6.2
Product Version6.2 
Target VersionFixed in Version6.3 
Summary0005387: Failed to install 64bit CentOS 6.2 with EFI firmware.
DescriptionProblem Description
================

Configure VM to install 64 bit CentOS with virtual hardware version 8; Set firmware to EFI.
EFI Boot manager could detect the hardware disk; but failed to boot 64bit CentOS installation.




Steps To Reproducesee Description.
Additional InformationFrom installation CD, there is EFI/BOOT related configuration files and images.
EFI installation works for 64bit RHEL 6.2
TagsNo tags attached.
Attached Files

spacer  Relationships
has duplicate 0005953resolvedkbsingh@karan.org CentOS does not install EFI, but RHEL does 
related to 0005131resolvedIssue Tracker Minimal CD/ISO misses some files for UEFI boot 
spacer  Relationships

spacer   Notes
(0014112)
changhai jiang (reporter)
2012-01-06 02:21

any udpates?
(0014157)
dariusd (reporter)
2012-01-12 09:08

I've checked each of the x86_64 CentOS images available for download, and it seems that none of them contain any El Torito boot entries usable by EFI. To be bootable by a general EFI system, it must contain either an El Torito entry for an emulated FDD/HDD image with a FAT filesystem containing \EFI\BOOT\BOOTX64.EFI and any necessary support files, or a "no emulation" El Torito entry referencing a disk image containing those files (preferably with platform id 0xEF, it seems).

The presently-available images will be bootable on EFI systems implementing an ISO9660 filesystem driver, but the presence of such a driver is not mandated by the UEFI specification -- the spec mandates only the presence of a FAT filesystem driver, MBR/GPT partition and El Torito support (see the UEFI Specification's description of EFI_DISK_IO_PROTOCOL).

A VMware virtual machine's virtual EFI firmware does not implement an ISO9660 filesystem driver, hence the media is not bootable in that environment.

If it is intended that CentOS be installable in a generic EFI environment, additional steps will need to be added to the disc image build process: a FAT filesystem will need to be constructed and populated with \EFI\BOOT\* from the ISO9660 filesystem, and EFI El Torito support added to the mkisofs command used to produce the images.

Let me know if you would like my help implementing this.

Cheers,
--
Darius Davis - Virtual Devices and Firmware - VMware, Inc.
(0014159)
tru (administrator)
2012-01-12 09:48

thanks David for the analysis.
changhai jiang: replacing the RHEL6.2 iso by the CentOS-6.2 iso yields an unbootable system? (nothing else changed)?
(0014160)
changhai jiang (reporter)
2012-01-12 10:07

>>replacing the RHEL6.2 iso by the CentOS-6.2 iso yields an unbootable system? (nothing else changed)?

nothing is changed. attached CentOS 6.2 iso with EFI firmware enabled, can not see loading kernel/booting process. using the same ISO with BIOS firware configured, installation success.

Best Regards,
changhai
(0014161)
kbsingh@karan.org (administrator)
2012-01-12 10:58

Fairly sure that EFI was tested on dell hardware before release ( we dont actually have any EFI capable machines / resources within the QA framework to test against ).

Darius, thanks for your offer to help. We would love to take you up on that. What needs doing and how can we test it ?
(0014162)
arrfab (developer)
2012-01-12 11:11

We tested 6.2 EFI boot from the DVD under VirtualBox (EFI enabled) and it worked ..
(0014163)
dariusd (reporter)
2012-01-12 12:19

Just to elaborate on Changhai's feedback, in a VMware VM:
* RHEL6.2 x86_64 on legacy BIOS works;
* RHEL6.2 x86_64 on EFI firmware works;
* CentOS 6.2 x86_64 on legacy BIOS works;
* CentOS 6.2 x86_64 on EFI firmware fails.

To illustrate the guts of the problem, here are the El Torito boot catalogs for the media I used to test the above (reference: "El Torito" Bootable CD-ROM Format Specification 1.0, January 25, 1995):

rhel-client-6.2-x86_64-dvd.iso:
0000000: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 aa 55 55 aa .............................UU. <= 80x86 validation entry
0000020: 88 00 00 00 00 00 04 00 8b 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ <= 4 sector no-emulation initial/default entry for Legacy BIOS
0000040: 91 ef 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ <= EFI (0xEF) section header.
0000060: 88 00 00 00 00 00 e0 02 d3 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ <= 736 block disk image containing \EFI\BOOT etc.
0000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ <= no more boot entries.
*
00007e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................

The EFI disk image contains a FAT12 filesystem:
0000000: eb 3c 90 6d 6b 64 6f 73 66 73 00 00 02 04 01 00 02 00 02 e0 02 f8 01 00 20 00 40 00 00 00 00 00 .<.mkdosfs.............. .@.....
0000020: 00 00 00 00 00 00 29 ac d1 a3 d7 41 4e 41 43 4f 4e 44 41 20 20 20 46 41 54 31 32 20 20 20 0e 1f ......)....ANACONDA FAT12 ..
0000040: be 5b 7c ac 22 c0 74 0b 56 b4 0e bb 07 00 cd 10 5e eb f0 32 e4 cd 16 cd 19 eb fe 54 68 69 73 20 .[|.".t.V.......^..2.......This
0000060: 69 73 20 6e 6f 74 20 61 20 62 6f 6f 74 61 62 6c 65 20 64 69 73 6b 2e 20 20 50 6c 65 61 73 65 20 is not a bootable disk. Please
0000080: 69 6e 73 65 72 74 20 61 20 62 6f 6f 74 61 62 6c 65 20 66 6c 6f 70 70 79 20 61 6e 64 0d 0a 70 72 insert a bootable floppy and..pr
00000a0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 74 72 79 20 61 67 61 69 6e 20 2e 2e 2e 20 0d 0a 00 ess any key to try again ... ...
00000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
*
00001e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa ..............................U.
0000200: f8 ff ff 00 f0 ff ff ff ff 07 80 00 09 a0 00 0b c0 00 0d e0 00 0f 00 01 11 20 01 13 40 01 15 60 ......................... ..@..`
0000220: 01 17 80 01 19 a0 01 1b c0 01 1d e0 01 1f 00 02 21 20 02 23 40 02 25 60 02 27 80 02 29 a0 02 2b ................! .#@.%`.'..)..+
0000240: c0 02 2d e0 02 2f 00 03 31 20 03 33 40 03 35 60 03 37 80 03 39 a0 03 3b c0 03 3d e0 03 3f 00 04 ..-../..1 .3@.5`.7..9..;..=..?..
[... etc ...]

CentOS-6.2-x86_64-bin-DVD1.iso:
0000000: 01 00 00 00 43 65 6e 74 4f 53 20 50 72 6f 6a 65 63 74 00 00 00 00 00 00 00 00 00 00 4b 8f 55 aa ....CentOS Project..........K.U. <= 80x86 validation entry
0000020: 88 00 00 00 00 00 04 00 37 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........7....................... <= 4 sector no-emulation initial/default entry for Legacy BIOS
0000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ <= nothing else...
*
00007e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................

From the tests you've described above, I would expect that the Dell system and VirtualBox EFI both include an ISO9660 driver. I reiterate that nothing in the UEFI specification mandates the presence of an ISO9660 driver, and it is in the best interests of CentOS to ensure maximum compatibility by not depending on an EFI driver which might not be present on your target platforms.

As to what needs doing: Somewhere there is a build script which runs "mkisofs" to generate the final disc images. I've found what appears to be the CentOS 3 version at mirror.aarnet.edu.au/pub/centos/build/build.sh [^] but I haven't yet located where the edit will eventually need to be made for the current versions (or even determined if it's publicly visible). I don't have a make/shell/perl script fragment prepared, but here's an overview of what's needed:
* Immediately before you currently call mkisofs, you need to generate a FAT filesystem with a copy of \EFI\BOOT from the ISO9660 tree:
  - du -s to determine the disk space needed for the contents of \EFI\BOOT; add a bit of padding for filesystem structures etc, and compute the number of blocks to use for the FAT filesystem.
  - mkdosfs with -C and the computed block-count to create the necessary filesystem into a new file which is itself located in the ISO9660 image tree.
  - mount -o loop to loopback mount the filesystem
  - cp -fR to populate it with \EFI\BOOT\*
  - umount the filesystem
  - It should also be possible to do much of those steps with mtools if you prefer...
* Edit the mkisofs command-line to add the newly-created image as an EFI boot entry, for instance by adding "-eltorito-alt-boot -no-emul-boot -boot-load-size 1 -b relative/path/to/efi/boot/image" to the mkisofs command-line options.

To test the change, remove EFI\BOOT from the ISO9660 filesystem after creating the FAT filesystem but before running mkisofs, so you have an image which contains the EFI bootloader only in the El Torito image but not directly in the ISO9660 filesystem. That image should be bootable on the same machines you've tested previously (the Dell and VirtualBox EFI environments) but without the dependency on the ISO9660 driver, and thus it should also work in a VMware EFI VM as well as in other environments lacking ISO9660 filesystem support. I can help to verify that, of course! The images you ship shouldn't need \EFI\BOOT in the ISO9660 filesystem, but whether or not you leave them there is ultimately your call.

Let me know if I can provide any further guidance or assistance. I found it challenging to describe some of the steps above, so if I've been unclear, feel free to ask questions.

Cheers,
--
Darius
(0014164)
tru (administrator)
2012-01-12 13:09

thanks, from what I gather from a quick read, that's what the /usr/lib/anaconda-runtime/mk-images.efi and mk-images.x86 are doing. :) something did not go well in the build process.
mk-images.x86: lines 129 and bellow
...
EFIARGS="-eltorito-alt-boot -e images/efiboot.img -no-emul-boot"
...
(0014165)
kbsingh@karan.org (administrator)
2012-01-12 13:49

investigating
(0014166)
tru (administrator)
2012-01-12 14:20

I am trying to get a RHEL6/64 bits guest to boot from EFI on ESXi4, but I can't find where to change the firmware setup (if possible at all). :(

I also confirm that CentOS 6.2 DVD1.iso does boot on VirtualBox 4.1.8 with EFI.
(0014176)
kbsingh@karan.org (administrator)
2012-01-12 23:57

The actual build run seemed to have worked, but its clearly not ended up in the state where we would like it to be [1]; I'm going to look into exactly what happened, and write some tests around that bit of code to make sure we can get this fixed for 6.3; however, there is going to be some value in getting a fixed install option for 6.2 - what might that be ?

One option is that we can release just an installer image, and point people at the regular distro images ( or even, just support a handful of install options rather than the full lot ) and call this centos-6.2-efi-<something>.iso

- KB

[1] The fact that there is a vmware product that can test for this is great, how do we get that running in the QA harness ? can we replace the vmware-server instance that we are using ? perhaps a conversation for the -devel list...
(0014179)
dariusd (reporter)
2012-01-13 04:00

tru: ESXi 4.x doesn't include virtual EFI firmware capable of booting RHEL 6... you'll want to use ESXi 5.0 or newer.

If you feel it would be easier for you to integrate either VMware Workstation 8 or VMware Fusion 4 into your environment, let me know... although those products don't /officially/ support booting Linux guests through virtual EFI firmware, we can most definitely make it work for this purpose. :-)
(0014385)
changhai jiang (reporter)
2012-02-01 04:01

KB,

>>The fact that there is a vmware product that can test for this is great, how do we get that running in the QA harness ?


if you have iso with EFI supported, please let me know the download location, and I might make verification on my local ESXi 5.0 environment; and let you know the result.


Best Regards,
changhai
(0014467)
changhai jiang (reporter)
2012-02-14 07:47

Admin:

any progress on this issue?
thanks a lot for your time and have a nice day!


Best Regards,
changhai
(0014837)
kbsingh@karan.org (administrator)
2012-04-16 23:14

dariusd,

we now have a machine ( well, blade ) that can be used to host something that could then in turn be used for testing EFI. How can we make that happen ?
(0015381)
galens (reporter)
2012-07-09 23:01

Just tried booting the CentOS 6.3 x86_64 DVD 1 disc with UEFI Boot enabled on an Intel DH77KC motherboard. Rather than displaying the blue screen with the grub menu, I am left at a grub prompt. If I disable UEFI Boot, the expected grub menu is displayed and I can begin an install. The motherboard firmware version is 0095.

Should UEFI Boot work with the DVD 1 disc, or is this a case of operator error?

thanks,
galen
(0015504)
pasik (qa_team)
2012-07-18 23:10

dariusd: You seem to have in-depth knowledge of all this.. could you please check/verify the CentOS 6.3 images for EFI stuff? do we still have the same problem as in 6.2?

galens: Intel is known to have some bugs in their current UEFI firmwares for 7-series motherboards, for example with DH77EB (communities.intel.com/thread/29572 [^]). Not sure if your/my issue is firmware related or not.

I have Intel DQ77MK motherboard myself, and I also see the "grub prompt with no settings configured" issue when booting CentOS 6.2 or 6.3 x64 dvd1 in UEFI mode. This issue might also be caused by the problem dariusd described above..
(0015505)
pasik (qa_team)
2012-07-18 23:27

Further adventures in EFI booting: mjg59.dreamwidth.org/4957.html [^]


Despite EFI being a modern firmware for the modern world[3], EFI implementations are not required to be able to understand ISO 9660. In fact, I've never seen one that does. FAT is all the spec requires, and FAT is typically all you get. Nor will EFI just execute some arbitrary boot code from the start of the CD. So, how does EFI boot off CD?

El Torito. Obviously.

It's not quite as bad as it sounds, merely almost as bad as it sounds. While the typical way of using El Torito for a long time was to use floppy or hard drive emulation, it also supports a "No emulation" mode. It also supports setting a type flag for your media, which means you can distinguish between images intended for BIOS booting and EFI booting. But the fact remains that your CD has to include an embedded FAT partition that then contains a bootloader that's able to read ISO 9660 because your firmware is too inept to handle that itself[4].
(0015506)
vmware-gos-qa (reporter)
2012-07-19 00:35

Pasik,

>>>dariusd: You seem to have in-depth knowledge of all this.. could you please check/verify the CentOS 6.3 images for EFI stuff? do we still have the same problem as in 6.2?

I would make one verification and let you know the result soon.

Best Regards,
changhai
(0015527)
dariusd (reporter)
2012-07-24 00:41

kbsingh: Please accept my apologies, I seem to have missed the notification email containing your question of 2012-04-17, so I have only just seen your question now. You can use CentOS 6.3 x86_64 as a host OS; In CentOS, install the free VMware Player, create a new Virtual Machine with CentOS-6.3-x86_64-bin-DVD1.iso as the install media. Before installing the guest OS inside the VM, power the VM off, close VMware Player, find the ".vmx" file corresponding to the virtual machine, open it in a text editor, and append a line with:

   firmware = "efi"

to the end of the .vmx file. Save the file, then launch VMware Player again and power on the VM. In the unsuccessful case, you'll see the EFI Shell and no filesystems (fs0: etc.) will be found; If there's a FAT filesystem in an El Torito bootable entry, there will be at least one "fs0:", and/or the VM will boot directly into the CentOS installer. And yes, our EFI user-interface is far from ideal...

Let me know if you'd like me to expand on any of the above steps. Note that EFI firmware isn't officially supported on VMware Player 4 or VMware Workstation 8, but it should work. :-)


pasik: The 6.3 images seem to have the same problem -- in my testing, our EFI firmware does not recognize any of the CentOS 6.3 media. I am also using a terse and rough home-grown "eltoritoscan" utility to examine the images, and it also does not see the media as being EFI bootable. Here, I compare the CentOS 6.3 x86_64 media with the RHEL 6.3 x86_64 media:

$ ~/eltorito/eltoritoscan ./CentOS-6.3-x86_64-bin-DVD1.iso
./CentOS-6.3-x86_64-bin-DVD1.iso: Default Bootable No Emulation SysType=0x00 NSectors=0x4 LoadAddr=0x0000 StartSector=0x000002391165312 ./CentOS-6.3-x86_64-bin-DVD1.iso

$ ~/eltorito/eltoritoscan ./rhel-workstation-6.3-x86_64-dvd.iso
./rhel-workstation-6.3-x86_64-dvd.iso: Default Bootable No Emulation SysType=0x00 NSectors=0x4 LoadAddr=0x0000 StartSector=0x0000031d1632256 ./rhel-workstation-6.3-x86_64-dvd.iso

./rhel-workstation-6.3-x86_64-dvd.iso: EFI (Bootable No Emulation SysType=0x00 NSectors=0x2e0 LoadAddr=0x0000 StartSector=0x000002651255424 ./rhel-workstation-6.3-x86_64-dvd.iso
)
$
(0015530)
pasik (qa_team)
2012-07-24 10:52

dariusd: Thanks for the information!

I also found out the same information using "dumpet" tool to examine the EL Torito boot records. CentOS 6.3 iso images are missing the EFI boot entry.

The fix is to add "-eltorito-alt-boot -e images/efiboot.img -no-emul-boot" to the mkisofs cmdline.

Interested people should test this iso image:
pasik.reaktio.net/CentOS-6.3-x86_64-bin-DVD1-EFItest1.iso [^]

I've added those mkisofs cmdline options and regenerated the iso image. It might/should fix the EFI boot problem. Let us know how it goes!
(0015534)
dariusd (reporter)
2012-07-24 22:41

pasik: Awesome! The EFItest1 ISO you posted works here very nicely here! I installed a minimal CentOS 6.3 system in a Virtual Machine using that image, booted into it, and examined dmesg and /sys/firmware/efi/vars/ and everything looks perfect. There is an oddity in that the bootloader is choosing an insanely high screen resolution so the console font is reeeeeally reeeeealy tiny, but I have seen that many times before with other OSes and it is not CentOS's problem... Just for the record, my testing was on VMware Fusion 4.1.3.
(0015563)
tigalch (qa_team)
2012-07-28 13:48

pasik: I also just tested the new image on an ESXi5 host with the VM running in EFI-mode: Installation, subsequent kernel update and booting went fine !! /sys/firmware/efi is also there :)
I also got the weird resolution thing, but only during boot/shutdown, once GNOME is there the resolution is fine. If I switch to runlevel 3 I also have a resolution of - I think - 1920x1080. But that's no problem imho.
(0015706)
KevinM (reporter)
2012-08-25 09:12

the network install disk image is also affected. I've spent three days trying to track down the problem. Thanks for providing the test image, which works perfectly. this with a new IBM x3100 M4 with M5014 hardware raid and 4 x 1TB disks as RAID5 array.
(0015730)
avij (qa_team)
2012-09-02 21:36

pasik's test image does not work for me in VirtualBox with EFI enabled, it just gives me a grub prompt and stops there.
(0015731)
dariusd (reporter)
2012-09-03 04:07

avij: That is interesting. Can you try with the RHEL 6.2 or 6.3 x86_64 DVD images in the same VirtualBox configuration, and see if they fail in the same way? Your finding suggests that either there is more work to do on the CentOS side of things, or VirtualBox's firmware is dependent on its ISO9660 driver to boot CentOS successfully (which would be very unfortunate).

It might be worth including the details of the VirtualBox build you used, for the record.
(0015784)
avij (qa_team)
2012-09-16 08:18

dariusd: Sorry, I missed your question. Unfortunately I don't have access to RHEL .isos. I believe pasik's test image had just enough bootable ISO9660 bits to make VirtualBox think it could boot using the ISO9660 driver, even if the ISO9660 boot configuration wasn't complete in that .iso. The current UEFI boot image in CentOS QA seems to work with both VMware (or so I've heard) and VirtualBox (4.1.22 r80657 on Mac).
(0015792)
tigalch (qa_team)
2012-09-18 20:10

new EFI-bootable images for minimal and netinstall have been announced on the mailing list. These images should solve this issue.
(0015820)
KevinM (reporter)
2012-09-25 12:25

I can confirm that the new (18th Sept) EFI bootable netinstall iso image (CentOS-6.3-x86_64-netinstall-EFI.iso) works as expected with the IBM x3100 M4. Thank you all.
spacer   Notes

spacer  Issue History
Date Modified Username Field Change
2012-01-04 10:00 changhai jiang New Issue
2012-01-06 02:21 changhai jiang Note Added: 0014112
2012-01-12 09:08 dariusd Note Added: 0014157
2012-01-12 09:48 tru Note Added: 0014159
2012-01-12 09:49 tru Status new => feedback
2012-01-12 10:07 changhai jiang Note Added: 0014160
2012-01-12 10:07 changhai jiang Status feedback => assigned
2012-01-12 10:54 kbsingh@karan.org Status assigned => new
2012-01-12 10:58 kbsingh@karan.org Note Added: 0014161
2012-01-12 11:11 arrfab Note Added: 0014162
2012-01-12 12:19 dariusd Note Added: 0014163
2012-01-12 13:09 tru Note Added: 0014164
2012-01-12 13:49 kbsingh@karan.org Note Added: 0014165
2012-01-12 13:50 kbsingh@karan.org Status new => acknowledged
2012-01-12 14:20 tru Note Added: 0014166
2012-01-12 23:57 kbsingh@karan.org Note Added: 0014176
2012-01-13 04:00 dariusd Note Added: 0014179
2012-02-01 04:01 changhai jiang Note Added: 0014385
2012-02-14 07:47 changhai jiang Note Added: 0014467
2012-04-16 23:14
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.