Methods to UEFI Install Fedora 14

Methods to UEFI Install Fedora 14
Finnbarr P. Murphy
(fpm@fpmurphy.com) Fedora 14 ( codename Laughlin) is probably the first version of Fedora which is likely to be installed on a significant number of UEFI-enabled hardware platforms. However, you cannot do a UEFI-install from the standard Fedora 14 distribution media such a DVD as you would on a legacy BIOS-based platform. You have use one of a number of alternative installation procedures. In this post I will describe three ways to do an UEFI install of 64-bit Fedora 14 on a 64-bit Intel-based UEFI-enabled platform. There is no technical reason that an UEFI install should not work on 64-bit AMD platforms but I have not tested such a configuration. Since Fedora 14 is not yet officially released as I write this post, I used the Fedora 14 RC1 candidate images for testing purposes but I do not think anything major relating to UEFI-installs will change prior to the formal release of Fedora 14 in a few days. Although Fedora had rudimentary support for EFI/UEFI since at least Fedora 9, no mention of such support was included in the associated Installation Guides. With Fedora 14, this has changed. The Fedora 14 Installation Guide describes how to make a minimal UEFI boot image in section 3.3.1 and discusses UEFI installs in section 7.1. You should read these sections of the Installation Guide before attempting your own install. Note however that UEFI installation of 32-bit Fedora 14 is not supported. There is no technical reason why this could not be done; it would appear to be simply a business decision as was the decision not to make the standard Fedora 14 distribution media dual bootable like Red Hat Enterprise Linux 6 and some other GNU/Linux distributions. Method 1

This method uses the 64-bit Fedora 14 netinst.iso image. The output of the dumpet utility shows that this image has two bootable entries.

# dumpet -i Fedora-14-x86_64-netinst.iso Validation Entry: Header Indicator: 0x01 (Validation Entry) PlatformId: 0x00 (80x86) ID: "" Checksum: 0x55aa Key bytes: 0x55aa Boot Catalog Default Entry: Entry is bootable Boot Media emulation type: no emulation Media load segment: 0x0 (0000:7c00) System type: 0 (0x00) Load Sectors: 4 (0x0004) Load LBA: 15693 (0x00003d4d) Section Header Entry: Header Indicator: 0x91 (Final Section Header Entry) PlatformId: 0xef (EFI) Section Entries: 1 ID: "" Boot Catalog Section Entry: Entry is bootable Boot Media emulation type: no emulation Media load address: 0 (0x0000) System type: 0 (0x00) Load Sectors: 864 (0x0360)

Fo r

03-04-2011

pe rs o

Copyright 2004-2011 Finnbarr P. Murphy. All rights reserved.

nn a

lu

se

on

ly

1/7

Methods to UEFI Install Fedora 14 Load LBA: 18202 (0x0000471a)

Platform ID 0×00 is for legacy BIOS platforms and platform ID 0xEF is for EFI/UEFI platforms. This image is a complete installation media which uses the Internet to retrieve the various packages it needs to perform the user-specified installation of the Fedora 14 distribution. The contents of this image are:

pe rs o

./images: total 187525 drwxr-sr-x. 3 dr-xr-xr-x. 5 -rw-r--r--. 1 -rw-r--r--. 1 -rw-r--r--. 1 drwxr-sr-x. 2 -r--r--r--. 1

fpm fpm fpm fpm fpm fpm fpm

fpm 2048 Oct 12 fpm 2048 Oct 12 fpm 442368 Oct 12 fpm 36349952 Oct 12 fpm 155226112 Oct 12 fpm 2048 Oct 12 fpm 888 Oct 12

Fo r

./images/pxeboot: total 34991 drwxr-sr-x. 2 fpm drwxr-sr-x. 3 fpm -rw-r--r--. 2 fpm -r--r--r--. 1 fpm -rwxr-xr-x. 2 fpm ./isolinux: total 36246 drwxr-sr-x. dr-xr-xr-x. -r--r--r--. -rw-r--r--. -r--r--r--. -rw-r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--. -r--r--r--.

fpm 2048 Oct 12 fpm 2048 Oct 12 fpm 32043809 Oct 12 fpm 441 Oct 12 fpm 3781792 Oct 12

2 5 1 1 1 2 1 1 1 1 1 1 1

fpm fpm fpm fpm fpm fpm fpm fpm fpm fpm fpm fpm fpm

fpm 2048 Oct 12 19:34 . fpm 2048 Oct 12 19:35 .. fpm 2048 Oct 12 19:35 boot.cat fpm 84 Oct 12 19:34 boot.msg fpm 142 Oct 12 19:34 grub.conf fpm 32043809 Oct 12 19:34 initrd.img fpm 24576 Oct 12 19:34 isolinux.bin fpm 1023 Oct 12 19:34 isolinux.cfg fpm 165080 Oct 12 19:34 memtest fpm 462737 Oct 12 19:34 splash.jpg fpm 462737 Oct 12 19:34 syslinux-vesa-splash.jpg fpm 2451 Oct 12 19:35 TRANS.TBL fpm 162860 Oct 12 19:34 vesamenu.c32

03-04-2011

Copyright 2004-2011 Finnbarr P. Murphy. All rights reserved.

nn a
19:34 19:35 19:34 19:34 19:35 19:34 19:35 19:34 19:34 19:34 19:35 19:34

./EFI/BOOT: total 72 drwxr-xr-x. dr-xr-xr-x. -r--r--r--. -rw-r--r--. -r--r--r--.

2 3 1 1 1

fpm fpm fpm fpm fpm

fpm 2048 Oct fpm 2048 Oct fpm 168 Oct fpm 68392 Sep fpm 449 Oct

12 12 12 13 12

19:34 19:35 19:34 12:05 19:35

. .. BOOTX64.conf splash.xpm.gz TRANS.TBL

. .. initrd.img TRANS.TBL vmlinuz

lu
. .. efiboot.img efidisk.img install.img pxeboot TRANS.TBL

se
2/7

./EFI: total 6 dr-xr-xr-x. 3 fpm fpm 2048 Oct 12 19:35 . dr-xr-xr-x. 5 fpm fpm 2048 Oct 12 19:35 .. drwxr-xr-x. 2 fpm fpm 2048 Oct 12 19:34 BOOT

on

# cd /media/Fedora14 # ls -Ral .: total 12 dr-xr-xr-x. 5 fpm fpm drwxr-xr-x. 3 root root dr-xr-xr-x. 3 fpm fpm drwxr-sr-x. 3 fpm fpm drwxr-sr-x. 2 fpm fpm

2048 4096 2048 2048 2048

Oct Oct Oct Oct Oct

12 29 12 12 12

19:35 14:42 19:35 19:34 19:34

. .. EFI images isolinux

ly

Methods to UEFI Install Fedora 14 -rwxr-xr-x. 2 fpm fpm # 3781792 Oct 12 19:34 vmlinuz

The size of the image is only approximately 220Mb. Either create a bootable DVD or USB stick. I recommend the USB stick option as it is the faster of the two to do. Here is how to use the dd utility to create a bootable USB stick (disk) assuming that /dev/sdb points to the USB stick and netinst.iso is in the current directory. By the way, assume that anything previously on the USB stick will be overwritten and lost – so back up anything valuable on the USB stick.

# dd if=./Fedora-14-x86_64-netinst.iso

of=/dev/sdb

# cd /media/Fedora\ 14\ x86_64\ DVD/images # ls -al efidisk.img -rw-r--r--. 1 fpm fpm 36349952 Oct 21 14:29 efidisk.img

# gdisk /dev/sdb GPT fdisk (gdisk) version 0.6.8 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present

Fo r

Found valid GPT with protective MBR; using GPT. Command (? for help): p Disk /dev/sdb: 70996 sectors, 34.7 MiB Logical sector size: 512 bytes Disk identifier (GUID): 99DEEF6A-E513-488B-99A4-142A5EAED065 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 70962 Partitions will be aligned on 2-sector boundaries Total free space is 0 sectors (0 bytes) Number 1 Start (sector) 34 End (sector) Size 70962 34.6 MiB Code EF00 Name EFI System Partition

# mount /dev/sdb /mnt # cd /mnt # ls -alR

03-04-2011

pe rs o

# dd if=./efidisk.img of=/dev/sdb 70996+0 records in 70996+0 records out 36349952 bytes (36 MB) copied, 11.8982 s, 3.1 MB/s

Copyright 2004-2011 Finnbarr P. Murphy. All rights reserved.

nn a

lu

This method requires you to download the entire 64-bit Fedora 14 release and burn the ISO onto a (bootable) DVD. Next mount the DVD and cd to the images subdirectory. Plug in a suitable USB stick and use the dd utility to write efidisk.img to the USB stick. As before, assume that anything previously on the USB stick will be overwritten and lost.

se

Method 2

on

Insert this USB stick into your UEFI platform and select the USB stick to boot from using your UEFI boot manager. The installation will proceed as normal. During the installation you will need to configure a network interface so that the required RPMs for the Fedora 14 distribution can be downloaded over the Internet.

ly

3/7

Methods to UEFI Install Fedora 14 .: total 22 drwxr-xr-x. 3 root root 16384 Dec 31 1969 . dr-xr-xr-x. 24 root root 4096 Oct 29 10:02 .. drwxr-xr-x. 3 root root 2048 Oct 21 18:29 EFI ./EFI: total 20 drwxr-xr-x. 3 root root 2048 Oct 21 18:29 . drwxr-xr-x. 3 root root 16384 Dec 31 1969 .. drwxr-xr-x. 2 root root 2048 Oct 21 18:29 BOOT ./EFI/BOOT: total 35302 drwxr-xr-x. drwxr-xr-x. -rwxr-xr-x. -rwxr-xr-x. -rwxr-xr-x. -rwxr-xr-x. -rwxr-xr-x.

Method 3

Fo r

03-04-2011

pe rs o

If you have a Fedora 14 distribution DVD but poor Internet connectivity, you can still UEFI install Fedora 14. Make a minimal install on a USB stick as described in Method 2. On your UEFI platform, place the DVD in your DVD drive and insert/attach the USB stick. From your UEFI boot manager, select the USB stick and boot from it. During installation do not configure a network interface or select any additional software repositories. A “Found local Installation Media” will be displayed and Anaconda will retrieve the required RPMs from the what it calls the “Installation Repo” i.e the Fedora 14 DVD.

Copyright 2004-2011 Finnbarr P. Murphy. All rights reserved.

nn a

Insert this USB stick into your UEFI platform and select the USB stick to boot from using your UEFI boot manager. The installation will proceed as normal. As before you will need to configure a network interface so that the required RPMs for the Fedora 14 distribution can be downloaded over the Internet.

lu

As you can see from the above a small ESP named EFI System Partition is created on the USB stick. It contains the absolute minimum number of files to UEFI-boot a Fedora 14 image. Well, it could be slightly smaller if they skipped the Legacy GRUB graphic image, i.e. spash.xpm.gz. Because it is removable media, UEFI understands that BOOTX64.efi is the image to load.

se

on
4/7

2 3 1 1 1 1 1

root root root root root root root

root 2048 Oct 21 root 2048 Oct 21 root 156 Oct 21 root 242985 Oct 21 root 32045806 Oct 21 root 68392 Oct 21 root 3782016 Oct 21

18:29 18:29 18:29 18:29 18:29 18:29 18:29

. .. BOOTX64.conf BOOTX64.efi initrd.img splash.xpm.gz vmlinuz

ly

Methods to UEFI Install Fedora 14

# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg_ultra-lv_root 51606140 3420032 45564668 7% / tmpfs 1027392 432 1026960 1% /dev/shm /dev/sda2 495844 29534 440710 7% /boot /dev/sda1 204580 996 203584 1% /boot/efi /dev/mapper/vg_ultra-lv_home 424395160 233064 402604032 1% /home # parted /dev/sda GNU Parted 2.3 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: ATA ST3500418AS (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number 1 2 3 Start 1049kB 211MB 735MB End 211MB 735MB 500GB Size 210MB 524MB 499GB File system fat16 ext4 Name Flags boot

Fo r

# gdisk /dev/sda GPT fdisk (gdisk) version 0.6.8 Partition table scan: MBR: protective

03-04-2011

pe rs o

Copyright 2004-2011 Finnbarr P. Murphy. All rights reserved.

nn a

Now that I have described the above methods for UEFI installing Fedora 14, let us examine the UEFI-specific artifacts created by the Fedora 14 install process. When UEFI-installed, Fedora 14 partitions a disk using GPT (GUID Partition Table) rather than using a MBR. For example, here is the default GPT created by Fedora 14 when the distribution was installed on a single 500Gb disk.

lu

se
5/7

on

ly

Methods to UEFI Install Fedora 14 BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): p Disk /dev/sda: 976773168 sectors, 465.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): 2C5062C9-CFE9-4395-AB01-ED5FB78A9FFD Partition table holds up to 128 entries First usable sector is 34, last usable sector is 976773134 Partitions will be aligned on 2048-sector boundaries Total free space is 2029 sectors (1014.5 KiB) Number 1 2 3 Start (sector) 2048 411648 1435648 End (sector) Size 411647 200.0 MiB 1435647 500.0 MiB 976773119 465.1 GiB Code EF00 0700 0700 Name

Command (? for help): c Partition number (1-3): 1 Enter name: ESP Command (? for help): x

pe rs o

Expert command (? for help): o MBR disk identifier: 0x00000000 MBR partitions: Number Boot Start (sector) 1 1

nn a

Expert command (? for help): i Partition number (1-3): 1 Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System) Partition unique GUID: 8CCDE8E2-30A0-4C5A-A1AE-EB2056F04627 First sector: 2048 (at 1024.0 KiB) Last sector: 411647 (at 201.0 MiB) Partition size: 409600 sectors (200.0 MiB) Attribute flags: 0000000000000000 Partition name: ESP

Length (sectors) 976773167 0xEE

Disk size is 976773168 sectors (465.8 GiB)

The GPT protective partition starts at sector 0, i.e. it precedes partition number 1, and covers the entire area of the disk used by three GPT partitions. Partition 1 is the EFI System Partition (ESP).

Fo r

The ESP is mounted on /boot/efi. Here is listing of the contents of the ESP.

# cd /boot/efi # ls -alR .: total 26 drwx------. 3 root root 16384 Dec 31 1969 . dr-xr-xr-x. 5 root root 1024 Oct 28 18:26 .. drwx------. 4 root root 4096 Oct 28 22:36 EFI ./EFI: total 28 drwx------. 4 root root 4096 Oct 28 22:36 . drwx------. 3 root root 16384 Dec 31 1969 .. drwx------. 2 root root 4096 Oct 28 18:27 redhat ./EFI/redhat: total 252

03-04-2011

Copyright 2004-2011 Finnbarr P. Murphy. All rights reserved.

lu

se
Type

on
6/7

ly

Methods to UEFI Install Fedora 14 drwx------. drwx------. -rwx------. -rwx------. 2 4 1 1 root root root root root 4096 root 4096 root 906 root 242985 Oct 28 18:27 . Oct 28 22:36 .. Oct 28 22:49 grub.conf Aug 5 15:06 grub.efi

The loadable image for the UEFI booting service is /EFI/redhat/grub.efi. This is a modified version of GRUB Legacy which a UEFI loader can load. According to section 3.4.1.2 of the current version (2.3) of the UEFI specification: It is expected that on a non-removable media device complete FilePath can be used which includes subdirectories and a file name for the boot target and the platform will boot using this FilePath according to normal system policy.

The current UEFI specification also states that:

By the way the Fedora 14 install does not create an EFI volume label for the EFI System Partition. If you wish, you can easily add one from an EFI shell if one is available to you.

fs0:

vol fs0 -n EFI_SYS_PART

Fo r

A number of utilities do not work after a UEFI install of Fedora 14. For example fdisk does not work with GPT disks. In fairness, it does display a message to that effect. Many people use parted which does understand GPT but I prefer to use the gdisk utility. Also System/Administration/Bootloader (/usr/share/system-config-boot/system-config-boot.py) fails with a /boot/grub/grub.conf not found error. This script needs to be modified so that it knows to edit /boot/efi/EFI/redhat/grub.conf when an ESP exists. Please let me know if you discover other interesting methods of UEFI booting Fedora 14 or any other commands and utilities that exhibit failures due to a UEFI install.

03-04-2011

pe rs o

All the UEFI platforms I have encountered to date support such default boot processing. In the case of an X86_64 platform the system firmware will attempt to load the image /EFI/BOOT/BOOTX64.EFI. For this reason, as a backup boot mechanism, I usually create a …/EFI/BOOT directory and copy the …/EFI/redhat/grub.efi and …/EFI/redhat/grub.conf files into this directory renaming them as BOOTX64.EFI and BOOTX64.CONF respectively.

Copyright 2004-2011 Finnbarr P. Murphy. All rights reserved.

nn a

lu

If for whatever reason, all the Boot#### variables referenced in the BootOrder variable point to devices that are not present, the boot devices have timed out, the specific boot file does not exist, or there is no valid boot variable, default boot processing may optionally occur.

se

on

For Fedora 14, that FilePath is /EFI/redhat/grub.efi. It would be nice if this were mentioned somewhere in the Fedora 14 install documentation.

ly

7/7

Sign up to vote on this title
UsefulNot useful