Today’s guest article is a continuation of the Kickstart theme. The first Kickstart article can be found here. Thanks goes out to dos2unix from the Linux.org forums.
I should mention again that I don’t actually know anything about Kickstart, other than what I’ve read in these articles. I’m extremely grateful, but you may want to check back a few times to ensure all the editing is complete!
Now that we have your web server, dhcp, and tftp server configured, we will need to enable the firewall for them.
On Fedora it looks like this:
firewall-cmd --add-service=http --permanentfirewall-cmd --add-service=dhcp --permanentfirewall-cmd --add-service=tftp --permanentfirewall-cmd --reload
Now we need to extract the iso files you have handy (you did already download these, right?) I should have mentioned you will need the “server” version of these iso’s. There is a way to make the workstation iso’s work, but that’s for another more advanced article.
For the example here, I put everything in:
/usr/share/nginx/html/pub mkdir -p /usr/share/nginx/html/pub/fed32srv/dvd mount -o loop /path/to/Fedora-Server-dvd-x86_64-32-1.6.iso /mntcp -rvf /mnt * /usr/share/nginx/html/pub/fed32srv/dvd
When that gets done copying, we can add another OS’s iso if you like:
umount /mnt mkdir -p /usr/share/nginx/html/pub/fed35srv/dvd mount -o loop /path/to/Fedora-Server-dvd-x86_64-35-1.6.iso /mntcp -rvf /mnt * /usr/share/nginx/html/pub/fed35srv/dvd
If you have more iso’s repeat the same for CentOS or Redhat or whatever you have.
Again, when it gets done copying, simply umount the iso image. I confess, I’m something of a minimalist. I like short names like pub/fed35srv. If you like long names you could have something like /public/fedora35-server/x86_64/ I’m too lazy to type all of that in all my config files.
Now we will install the boot kernels. This isn’t actually the full kernel yet, just a lite kernel with enough parts to boot the system from the network.
Just about all computers have one of two types of internal configuration systems. Legacy BIOS and UEFI. Most newer computers in the last 8 years or so,are UEFI, but there are still plenty of Legacy BIOS systems around. For the purpose of this article we will set-up for both types.
In your /var/lib/tftpboot directory, we will make two directories. One for BIOS and one for UEFI.
mkdir /var/lib/tftpboot/efimkdir /var/lib/tftpboot/pxelinux
Technically you could rename the efi directory to something else, but the pxelinux for legacy BIOS systems is hardcoded in some files.
Now you will need to download a couple of files. I recommend using the Fedora 35 version, even if you are going to be installing Redhat or CentOS. They are newer, have more features, bug fixes, and support more hardware.
But you can use the CentOS or Rehat versions if you want to. Shim-x64, grub2-efi-x86, and grub2-efi-x64-modules. We will need to extract these rpms. You can do this in /tmp or somewhere safe.
dnf install -y shim-x64, grub2-efi-x86, and grub2-efi-x64-modules --downloadonly --downloaddir=/tmp
If it says this is already installed, replace install with reinstall. These are the efi files you will need for efi based systems.
rpm2cpio /tmp/shim-x64-15.4-5.x86_64.rpm | cpio -dmiv rpm2cpio /tmp/grub2-efi-x64-2.06-10.fc35.x86_64.rpm | cpio -dmiv rpm2cpio /tmp/grub2-efi-x64-modules-2.06-10.fc35.noarch.rpm | cpio -dmiv
This will create 3 directies in /tmp.
bootetcusr mv /tmp/boot/efi/EFI/fedora/grubx64.efi /var/lib/tftpboot (note the grubx64.efi does not go in the efi directory) cp /tmp/boot/efi/EFI/fedora/* /var/lib/tftpboot/eficp /tmp/usr/lib/grub/x86_64-efi/* /var/lib/tftpboot/efi
You can delete these directories in /tmp if you like, you are done with them. Make sure you don’t put a leading / and actually delete /usr and /etc.
The next part depends on what iso’s you have downloaded and extracted. But hopefully you will get the idea.I am using Fedora 32, Fedora 35, and Redhat 9 as my examples. You can use whatever directory names you like.
mkdir /var/lib/tftpboot/efi/fed32mkdir /var/lib/tftpboot/efi/fed35 mkdir /var/lib/tftpboot/efi/rh9 cp /usr/share/nginx/html/pub/fed32srv/dvd/isolinux/vmlinuz /var/lib/tftpboot/efi/fed32cp /usr/share/nginx/html/pub/fed32srv/dvd/isolinux/initrd.img /var/lib/tftpboot/efi/fed32cp /usr/share/nginx/html/pub/fed32srv/dvd/isolinux/TRANS.TBL /var/lib/tftpboot/efi/fed32 repeat the same for your other OS'es. cp /usr/share/nginx/html/pub/fed35srv/dvd/isolinux/vmlinuz /var/lib/tftpboot/efi/fed32cp /usr/share/nginx/html/pub/fed35srv/dvd/isolinux/initrd.img /var/lib/tftpboot/efi/fed32cp /usr/share/nginx/html/pub/fed35srv/dvd/isolinux/TRANS.TBL /var/lib/tftpboot/efi/fed32
That’s enough for this article, will add next part later.
And there you have it, another article and this one is a guest article – just like yesterday and probably just like tomorrow. I’m extremely grateful for the respite and wish I knew more about Kickstart. I think, for future reference, I’m gonna ask that folks register and write the draft here. I think it’d streamline it.
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.
Today we'll cover one way to enable or disable your network interface in the Linux…
Today's exercise is a nice and simple exercise where we check your NIC speed in…
Have you ever wanted to easily monitor your wireless connection? Well, now you can learn…
I think I've covered this before with the ls command but this time we'll count…
Today we'll be learning about a basic Linux command that's known as 'uname' and it…
If you've used hardinfo in the past, it may interest you to know that hardinfo…