Categories
linux open source redhat server

Running RHEL 6 on EFI BIOS-based system

Been ages since I updated the blog. Was really busy lately with lots of commitments and work-related task.

Just wanna share 1 thing to remember when you intend to run RHEL 6 on EFI-based BIOS. Few months ago I was tasked to setup RHEL 6 on an EFI-based system (IBM x-series 3850 M3 if not mistaken). Linux on IBM x series? should be a piece of cake rite? Just put the CD, setup the partition and voila. How wrong I was. It took me and a friend of mine (which is an expert in Linux with more than 10 years of experience, mind you) around 8 hours to got it right.

To make matters worse, we could not find any documentation regarding it on the Internet and even RH Knowledge Base and documentation didnt help either (at that time, dunno now). To shorten the matter, here are the simple guideline that I can give you. We are installing a RHEL 6 64bit OS BTW.

Linux boot the OS from the /boot partition. Problem is after the installation, it fails to even go to the bootloader menu. And installation is never completed without Anaconda raising a flag that it fails to install RHEL 6. Turn out to be the boot for EFI BIOS partition must be in vfat format in order for the system to detect it. So you have to mount /boot on EXT-based filesystem and /boot/EFI on vfat filesystem (Anaconda labels it as EFI boot partition if I am not mistaken). That should make the server able to boot the OS properly.

What really annoys me is that Anaconda didnt do the proper detection to flag us that our filesystem configuration is not workable. Or put something on the knowledge base about this issue. However if you do the installation using the default setup without any customization, it will actually detect you are installing on an EFI system and put the partition accordingly (Thats how we manage to solve this problem BTW).

Hope this can help some sysadmin from going back late at night to solve the same issue.

17 replies on “Running RHEL 6 on EFI BIOS-based system”

Hi,

just installed an x3850 and ran into the same problem. Thank you very much for your article, it saved me many hours.

I might add that Anaconda did protest (RHEL 6.1) that the /boot/EFI partition was missing. My big mistake was that I decided to convert the 200 Mb /boot partition into /boot/EFI and let /boot reside on the root file system. This resulted in grub crashing upon installation and after reboot system booted into the grub shell. From this I learned that two partitions are required for everything to work.

Interesting info. I’m in the process of trying to dual boot Windows 2008 R2 and Centos 6 on an IBM HS22 blade (System x), which uses UEFI. No problem installing 2008 R2, and while Centos 6 will install, it doesn’t detect the Windows installation. I’ve also noticed that while Centos 6 installs ok, on reboot the boot loader never appears and it starts loading Windows automatically. Is this the same problem? The Windows disk format is left as ‘Basic’ following the install. What’s the best way of approaching this?

I never done dual booting for both Windows and Linux on the UEFI BIOS, but I can share you something that I think might be relevant.

Months ago I installed RHEL 6 on a X3650 M2 IBM if I am not mistaken. It had this fancy UEFI BIOS thingie. So as I’m already experienced enough on it, the installation is a breeze. However upon successful installation, it seems that I need to repair something which is easier to reinstall the entire OS rather than doing modification. So I reinstalled the RHEL 6 again on the same machine, and everything went about smoothly,

However, I realized when I modify anything with regards to the grub setting on the system after the 2nd installation, nothing happen. As if I am editing the wrong grub.conf. Further inspection (after a few hours) shows that actually there is 2 /boot/uefi happens to be on the system. The 1st one is during the 1st installation, while the 2nd one is for the 2nd installation of RHEL. The system seems to always point to the 1st /boot/uefi partition all the time. Either RHEL messed up, or it cant detect the 1st /boot/uefi partition and remove it during installation, I dont know. So now any update on the kernel, I need to paste it to the 1st /boot/uefi partition (which needs to be manually mounted) so that it can boot the newer kernel.

So with regards to your question, I suspect maybe the 1st UEFI boot partition already taken by Windows and therefore CentOS couldnt see it.

Hopefully that will guide you. I still couldn’t understand why this happens tho (as I dont manage that server anymore, so there’s no motivation to research it 🙂

Thanks wariola. My past understanding (for MBR setups) was that to dual boot Windows and Linux, you had to install Windows first, then Linux, and use Grub to select the O/S. With UEFI this no longer seems to be relevant, as each O/S installs their own loader into /boot/EFI, and these automatically appear in the boot list on the UEFI device (or you can manually add them). Select the O/S from the menu, and away you go. I’m going to try and install CentOS 6 first on another HS22, and see how that goes. If it works ok, then I’ll try installing Windows after that.

Has anyone played with using efibootmgr to actually install your new EL6 boot option in the kickstart %post section?? From the F2 screen after my install completes existing post-install scripts I tried it out. The command is available but since no /boot/efi mounted when kernel came up, it doesn’t work. Gives the “try modprobe efivars” message – which of course I tried but it didn’t work – FATAL: Module efivars not found.

So then how does RH 6.2, Fedora 16, and Ubuntune Server v11.10 manage to use efibootmgr to install the new OS before first boot after install???

Update: just tried out CentOS 6.1 – seems to have the same issues – anaconda support for GPT uEFI is nothing to write home about that’s for sure! Why make it so hard? Maybe it’s IBM’s adoption of uEFI standards that’s off here. The 6.1 disc tells me I am installing uEFI GPT on a non-uEFI system. IBM x3650M3 is without a doubt a uEFI system!

I also got into some trouble installing the RHEV-H 3.0 hypervisor (based on RHEL 6.2) on IBM x3650 M3. After a lot of tweak in the BIOS then only it works. I think we disable the UEFI altogether or something

RHEV-H 3.0 is not supported (beta version) booting from Uefi. You have to select on the bootlist “legacy only” option as first one, so it will not try to install in uefi mode, and it will work.
I think there is a patch being created so uEFI will be supported.

This issue is solved the same way with others: legacy only trick.
Good luck!

could you post more detail. Kickstart config, or steps taken ?
I tried the /boot/efi parition – didn’t help

part /boot –fstype=”ext4″ –size=100
part /boot/efi –fstype=’vfat’ –size=60
part swap –fstype=”swap” –size=1024
part / –fstype=”ext4″ –size=10000
part /var –fstype=”ext4″ –grow –size=1

# pre install

%pre
dd if=/dev/zero of=/dev/sda bs=512 count=64
/usr/sbin/parted -s /dev/sda mklabel gpt
/usr/sbin/parted -s /dev/sda mkpart primary ext2 0 10M
/usr/sbin/parted -s /dev/sda set 1 bios_grub on

%end

its been a very long time and did not have access to the system anymore, sorry

I just faced the same issue while installing RHEL 6.2 on x3650-M2 system, it took me more than 4 hours, however while doing the default installation it works fine, I had a doubt about the number of partitions to be created (since I was customizing the setup for SAP and creating all applicable filesystems on LVM in addition to SAP FSs, my plan was to make 2 VGs rootvg for system and sapvg for SAP), so I did the following make 200MB for /boot/efi and 500MB for /boot, these sizes were determined by default installation on physical partition, create rootvg for system with SWAP and “/” only, create a partition with the remaining space for SAPVG (around 300GB) as vfat and installation went fine, however after installation finished and system reboot “fdisk -l” command was not working and giving me a message to use parted on GPT disk…
Also I’d like to add that the GPT disk is 300GB disk on top of 4 disks configured as RAID 5.

I need to install the rhel6 in my new G560 Lenova i5, uefi enabled, I tried the same but not able boot the system. Grub> is the error. Please guide me, I am going to study about redhat and preparing the RHCE examination. Please guide me to install the rhel6 64 bit server

Hi,
I own a lenovo U400 with Windows 7 on it.
Windows is installed on SDB, sdb1 is containing the UEFI bootloader
I want to install RHEL 6, so I created on SDA, sda1 as /boot and used /dev/sdb1 as /boot/efi.
RHEL 6 added it’s own bootloader to /boot/efi, but never boots !!
any idea ?

Leave a comment