How to remotely initiate netinstall of CentOS 7?

Solution 1:

You can reinstall from grub by booting a kernel with suitable command line parameters. I outlined the process for EL6 here but there are some changes that need to be made for EL7. This is just an outline but it should get you going in the right direction.

Download /centos/7/os/x86_64/isolinux/vmlinuz to /boot from a repo of your choice
Download /centos/7/os/x86_64/isolinux/initrd.img to /boot

Configure a grub entry - put this first.

title Install CentOS7
kernel /vmlinuz ro upgradeany biosdevname=0 net.ifnames=0 ip=192.168.254.44::192.168.254.220:255.255.255.0:somehost.tld:eth0:none ks=http://server.tld/ks/kickstart.ks  nameserver=8.8.8.8 headless vnc vncpassword=SomePassword
initrd /initrd.img

The above would boot the installation kernel and configure it's IPv4 as described, this then pulls down the kickstart script and installs the system from there.

Notes: When I did this it was a requirement that the system use old style ethN interface names. If you want the new consistent naming then you may have to figure out how to provide interface to the ip stanza

ip=address::gateway:netmask:hostname:interface:method

you may get away with

ip=dhcp

It may be is possible to omit the interface e.g.

ip=address::gateway:metmask:hostname::none

Once you get this working it works well. You'll probably want to have a look at the options in the relevant documentation.

I start up a VNC server so I can see what's happening if I need to it can be omitted.

The headless parameter stops the system from looking for and initializing video hardware you may want to omit that and watch on the IPMI console.