HOWTO: PXE booting to install CentOS 7 netinstall with UEFI

General support questions
Post Reply
GodofGrunts
Posts: 1
Joined: 2014/10/26 20:42:44

HOWTO: PXE booting to install CentOS 7 netinstall with UEFI

Post by GodofGrunts » 2014/10/26 20:55:37

I searched and searched and couldn't find a guide on how to do this with UEFI. After pulling some resources form the Ubuntu Wiki and some prior knowledge of PXE booting Linux I finally figured it out.

This tutorial assumes you have a PXE environment already set up.

Download grubx64.efi from http://buildlogs.centos.org/centos/7/os ... /EFI/BOOT/ and place it in the root of your TFTP directory (or where ever you set DNSMASQ to)

In that same directory, create a grub.cfg file. In that file, have something similar to this (mine looks funny because I'm doing other things, but it should work for you):

Code: Select all

set default="0"
set timeout=-1

function gfxmode {
        set gfxpayload="${1}"
        if [ "${1}" = "keep" ]; then
                set vt_handoff=vt.handoff=7
        else
                set vt_handoff=
        fi
}

set linux_gfx_mode=keep

export linux_gfx_mode

set default="0"
set timeout=-1

function gfxmode {
        set gfxpayload="${1}"
        if [ "${1}" = "keep" ]; then
                set vt_handoff=vt.handoff=7
        else
                set vt_handoff=
        fi
}

set linux_gfx_mode=keep

export linux_gfx_mode

menuentry 'Install CentOS 7' {
	linuxefi /centos7-net/vmlinuz inst.repo=http://buildlogs.centos.org/centos/7/os/x86_64-latest/
	initrdefi /centos7-net/initrd.img
}
The important part here that no one seems to mention anywhere is the

Code: Select all

inst.repo=http://buildlogs.centos.org/centos/7/os/x86_64-latest/
part.

Now make a folder under your TFTP directory called "centos7-net". You can change this to whatever you like, but make sure you change the grub.cfg to match.

Copy "vmlinuz" and "initrd.img" from PATH-TO-CD/images/pxeboot to the centos7-net directory.

PXE boot should now work.

limbooface
Posts: 3
Joined: 2016/09/01 12:28:45

Re: HOWTO: PXE booting to install CentOS 7 netinstall with UEFI

Post by limbooface » 2016/09/01 12:58:51

I followed your setup on this page and I keep getting the grub prompt no grub menu?
why is that?

Locane
Posts: 25
Joined: 2014/09/05 00:40:12

Re: HOWTO: PXE booting to install CentOS 7 netinstall with UEFI

Post by Locane » 2017/02/28 21:51:17

I'm getting the same thing - trying to figure out why I have "grub>" and no menu. Ended up at this forum post trying to figure it out.

Post Reply