Wow, that’s quite a title. But I was unable to find a lot of helpful information on the internet describing how to accomplish what I aim to do. I found a lot of hints and clues, but nothing that spelled it all out. This page will capture my experience.
I use Fedora on my personal laptop. There are a lot of reasons for this which I won’t get into here, but the regular schedule of new releases provides me the “opportunity” to tweak my installation process. I can find various and distributed notes I’ve left myself and I have even often tried to script/automate it as much as possible, yet I tend to move on and abandon every attempt. (I even found a previous, unpublished page explicitly stating that I gave up)
So I was at Fedora’s booth at Red Hat Summit this year and asked a guy for some advice or insight on how to automate this whole song-and-dance that I find myself in routinely. He confirmed what I had found, that the LiveCD I had been trying to use to Kickstart a system would not work. He said that he always installs manually, but just uses the Minimal install and then configures his system with Ansible. I’m intrigued by this and will be attempting the same.
But that is not what this page is about. The kind gentleman also mentioned that, if I was determined to install via Kickstart (and I am…because I do this at work all the time, I should be able to figure it out here), then I would need to use the Netinstall Image. I had already learned this, but had always been unable to put all the pieces together. Now I have and it is actually very simple:
01 Download the correct image
There are tons of download options on getfedora.org, but once you’ve decided what spin and what “flavor” of system you’ll be installing on, it is important to grab the Netinstall Image (as opposed the Live Image):
NOTE: I will be installing the Workstation “flavor” and I have chosen to give Gnome a chance again, it is the default spin (I have other notes on some expeditions into other spins, but that is also for a different page)
02 Acquire a Kickstart file
There are probably places to get the default kickstart file and I have just as easily created my own based on experience and documentation, but I decided to build a test VM manually and then use the file it generated as a base. Every time Fedora installs, it creates an
anaconda-ks.cfg file in root’s home directory. So I built a system only specifying a few things during the graphical installation:
- root password
- install the “ansible-node” group (since I’m preparing to configure w/ ansible)
I then copied this
anaconda-ks.cfg file somewhere locally where I could modify it.
03 Modify the kickstart file
Point to a source:
In order to get the packages, you have to tell the kickstart where the packages reside. This is the part that I was always missing. I added the following lines near the top of my kickstart file:
# use a fedora mirror url --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
I changed the firstboot line as seen below, but the system always seems to come up asking me about languages and users and stuff…maybe I need to add these details to my kickstart file, but also maybe that firstboot screen will be skipped if I use Ansible to configure these types of things and reboot?:
# Don't run the Setup Agent on first boot firstboot --disabled
I’m not sure why this isn’t the default behavior, but I have to explicitly state that sshd should be started by adding it to the services line:
# System services services --enabled="chronyd,sshd"
04 Make the kickstart file network accessible
05 Boot to the ISO and specify the kickstart file
When you boot to the NetInstall Image ISO, instead of hitting “Enter” after highlighting “Install Fedora yadda yadda,” hit the “Tab” key with that line highlighted and specify the location of the kickstart with
There are a lot of options which are thoroughly documented, this is simply what I did.
WHAT I LEARNED
- I searched high and low for the binary locations and finally found some hints in bugzilla but did not do a good job of making note of those
- General Fedora kickstart page: https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst (I didn’t actually look at this page until I was looking for the pages I used initially…)
To avoid tl;dr enjoy this instead:
## 01 Download the correct image # be sure to download the NetInstall Image (NOT the Live Image) ## 02 Acquire a Kickstart file # make or find a general kickstart file for your flavor ## 03 Modify the kickstart file # MOST IMPORTANTLY, ADD THE SOURCE/URL: url --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch # disable firstboot firstboot --disabled # enable SSHD in services services --enabled="chronyd,sshd" ## 04 Make the kickstart file network accessible ## 05 Boot to the ISO and specify the kickstart file # get to the boot command prompt and use ks=