uefi: What if ...?

Chris Murphy lists at colorremedies.com
Tue May 27 05:35:21 UTC 2014


On May 26, 2014, at 4:09 PM, lee <lee at yun.yagibdah.de> wrote:

> Hi,
> 
> what if I got a new mainboard which uses uefi --- and might not even
> support disabling or not using uefi --- and wanted to boot?
> 
> Booting is from a HP smart array P800.  Would that work?  Would I need
> to do something to get it to work, and if so, what?

I think you'd have to ask HP about whether there's UEFI driver support on the P800. If not, then I'd expect the firmware won't see it at boot time. Maybe the kernel driver for the P800 will see it after booting, however, I'm not sure.

As for the partition scheme and bootloader installation and bootloader configuration files, those are completely different between BIOS and UEFI systems. It's much easier to tell you to just reinstall the system than to explain how to do an in place conversion. The gist would be to boot from the new computer, using rescue mode, from Fedora 20 netinstall or DVD media (live media doesn't have a rescue mode). Use gdisk to convert MBR to GPT (not strictly necessary but probably more reliable), resize an existing partition to make room to create an EFI System Partition, and format it FAT32, mount it and create an EFI directory on it, get its UUID from blkid and add it to fstab to mount at /boot/efi. Now you can reboot again in rescue mode and this time it should find the fstab and all the parts correctly including /boot/efi. Then

chroot /mnt/sysimage
yum remove grub2
yum install grub2-efi shim
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
cd /boot
ls -l
dracut -f <kernelversionarch>.img <kernelversionarch>  # for each kernel
exit
reboot

That will remove the BIOS based grub, replace it with a UEFI one, and shim which helps enable Secure Boot support. And writes a new grub.cfg on the ESP where it's (unfortunately) located these days. And rebuild the initramfs for that computer, since Fedora initramfs's are host-only the old ones likely won't work on the new system.

The trick will be whether the firmware sees the array in the pre-boot UEFI environment. If not, then it might be possible to do this with a small boot drive, even a USB stick, with an ESP and a boot partition containing the kernel and initramfs, while the root file system remains on the array to complete the start up process.

Chris Murphy


More information about the users mailing list