[how to] Create Centos GPT UEFI-only bootable disk manually.

Comments, suggestions, compliments, etc
Post Reply
Woistmeinauto
Posts: 15
Joined: 2020/08/04 06:45:47

[how to] Create Centos GPT UEFI-only bootable disk manually.

Post by Woistmeinauto » 2020/08/09 12:27:44

I know this looks pointless as you can already use

Code: Select all

dd=/dev/zero of=/dev/sdXY bs=446 count=1
to force uefi-only on any bootable disk. This command clears out MBR boot configuration while keeping partition table intact. Without boot sector no legacy boot basically.

However, my hybrid EFI motherboard does not work with the usual MBR/EFI method of ISO burning.
For some reason the DVD did not work for CentOS either so I was left with only this option for an EFI installation.

So here goes:

1)Format USB/HDD as GPT.
2)Create a 300 mb fat32 partition.
3)From Centos ISO extract EFI folder to fat32 partition.

Example /EFI/BOOT/BOOTX64.efi

4)Edit /EFI/BOOT/grub.cfg to change all LABELs to something short, i chose centos.

Example:

Code: Select all

LABEL=CentOS-8-2-2004-x86_64-dvd    to  ===> LABEL=centos
5)From GParted flag the fat32 partition as boot esp

6)Create ext4 partition that will hold ISO data.

7)Extract all contents of ISO to newly created ext4 partition.

8)Change ext4 partition label to centos or whatever you chose above.

The disk should look like: || 300 mb Fat32 || Ext4 label: centos ||

Don't try to add more or different operating systems to this configuration. EFI files are operating system specific, bootx64.efi and grubx64.efi of this setup will not work with other operating systems.

Post Reply