Guest Article: Kickstart Vol. II

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!

Kickstart Vol. II:

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:

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: 

When that gets done copying, we can add another OS’s iso if you like:

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.

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.

If it says this is already installed, replace install with reinstall. These are the efi files you will need for efi based systems.

This will create 3 directies in /tmp.

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.

That’s enough for this article, will add next part later.

Closure:

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.

Guest Article: Kickstart Vol. I

This is an article about Kickstart written by guest author, dos2unix from the Linux.org Forum. It’s the first of a few articles from them, so let’s give them a warm welcome and enjoy their article!

Kickstart Vol. I

Kickstart is really Redhat/CentOS/Fedora-centric. There are some attempts for parts of this work on Ubuntu and SuSE, but so far there is really little support for this. Kickstart does a lot of the mundane work for you. It sets up the filesystems for you, you control this size and format of them. It creates user accounts for you, sets up your network for you, and installs the packages you want to be installed (or not installed). You can even run a shell script automatically when everything is done.

Now if you only have one computer, and you only install the OS once a year, this isn’t going to save you much time. However if you have quite a few computers, for example a data-center with dozens or hundreds of servers. Or even a few test systems that have to be rebuilt every day or every few days. Then this can save you a lot of time.

The Kickstart computer itself doesn’t have to be anything fancy. In fact, it doesn’t even have to run one of Redhat type OS’s listed above. It can be Debian, Ubuntu, or whatever you like. It’s best if it has two LAN (Ethernet) interfaces. Most computers cannot be Kickstarted over WiFi yet. You can use a single network interface, but it makes things a little more difficult. If you have a lot of computers to Kickstart, I recommend that you get a small un-managed switch. 5 or 8 ports should be plenty, unless you’re at a data-center.I have worked in data-centers, but now I work at a place that writes software, and we test it over and over again, so I have to “rebuild” the OS sometimes several times a day.

Obviously you’ll need a computer to do this. If possible you’ll want a second computer to test on. One that will be the computer that’s being “Kickstarted”. You’ll need about 20 GB of free space on your Kickstart server to install .ISO images of the OS(es) you want to install.

Your Kickstart server will need three items installed. There are multiple ways to do this. We will discuss a couple of the most common ones. Perhaps a follow-up article will offer more options if there is enough interest.

First you need a web server like Apache httpd, or NGINX, you could even use the simple Python web-server, it doesn’t matter that much.

Second you’ll need a DHCP server, again you could use either BIND or dnsmasq, we will discuss both ways. Finally you’ll need a tftp server. If you use dnsmasq,it has a tftp server of sorts built-in.

It’s beyond the scope of this article to teach you how to install these items, it is assumed you already know how to install software.Note that this will have to be on a different network that your normal home/work/datacenter network.

You don’t want Kickstart erasing, wiping out, and re-installing the OS’s on your every day driver. This is why I recommend one with two interfaces. Otherwise, you’ll have to re-configure your network to download packages, install updates,and add more packages if necessary, and then re-configure it back to your Kickstart network. That gets old in a hurry, trust me.

I’m using Fedora as my Kickstart server. I currently have configurations to install Redhat 8, Redhat 9, CentOS 8, Fedora 33, Fedora 34, and Fedora 35. I install all of these on 3 different computer hardware types. You don’t have to install the same OS that your Kickstart server is running. For this first example, I’m going to use NGINX as my web server, dhcpd (BIND) as my DHCP server, and tftp-server, as well… My tftp server. My Kickstart has two LAN interfaces, it doesn’t really matter too much how you have the first interface configured.

Again, it’s beyond the scope of this article to tell you how to configure your network interfaces, it is assumed you already know how to do this. You’ll want a static IP on your second interface.A gateway isn’t required, for this article, we can just 192.168.7.227, try to pick something obscure that no one else will use in the environment you are in. I will go ahead a use a /24 subnet or 255.255.255.0 for those who aren’t familiar with CIDR subnet masks.

Remember this IP address, it will be used in quite a configuration files. Again you can use any IP you like,but remember what it is, because you’ll need it several times.

So for Fedora, it’s a simple dnf install -y nginx dhcpd-server tftp-server, other OS’es may vary.

Once they are installed we will need to configure them.

The first one here is NGINX. On most Linux’s I have used, the nginx.conf file is located in /etc/nginx/nginx.conf. You have a “server section” in this file.It’ll say server with a { after it. Replace the contents of your server section with the content below. This assumes your web content will be at /usr/share/nginx/html you can adjust this accordingly. This will be where your extracted .iso images will live. So make sure you have space here (or do a soft link to another directory that has space). You can use SSL/HTTPS, but again that’s beyond the scope of this article.

I also recommend adding these two lines, below your access_log section. The other lines will likely already be there.

access_log /var/log/nginx/access.log main;

Now enable and start your web server. For Fedora it’s 
systemctl enable nginx
systemctl start nginx

Now we need to configure your DHCP server. For BIND (dhcpd) the conf file is usually located at /etc/dhcp/dhcpd.conf (not to be confused with dhcpd6.conf )

Just mv the dhcpd.conf to something like dhcpd.conf-original or whatever you like, just make sure it doesn’t end with “.conf”. Now make a new files and copy the following to it.

I’m using the entire 192.168.7.x subnet here. The IP address of my Kickstart server is 192.168.7.227.Edit this file and replace the values of your server/network accordingly. The range tells my DHCP server to only give out IP addresses between 10 and 120.

Now you may be wondering about that last line, what is the “next-server” and why does it have the same IP address as my Kickstart/DHCP server? The “next server” after I receive a DHCP address is the tftp server, it’s located at the same IP address. You could run it on a different server, but most people run it on the same server.

Again just like NGINX, let us enable and start the service.
systemctl enable dhcpdsystemctl start dhcpd

For the tftp server, you really don’t have to do much, by default tftp wants tftpboot to be at /var/lib , so…

Note this is a listening socket, not really a server per se.If you want to make sure that your tftp server if pointing to /var/lib/tftpboot you can run..
systemctl cat tftp.service

You should see a line like this somewhere:

ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot

I would recommend not changing this, as several configuration files will like in this directory.

Closure:

Honestly, I edited the above the best that I could – given that I know nothing about the subject. I appreciate the articles, but it means trusting dos2unix – and I’m perfectly willing to do that. If you have any questions, you can post them here or you can post them on the linux.org forum where I share this article (as that’s where dos2unix lives).

Either way, stay tuned – as this is just the first part of a series of articles handily written on this subject. I, for one, am going to probably use the break to get a few articles ahead so that the new year starts off right.

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.

Let’s Determine The Number of RAM Slots Without Opening The Case

Today’s article is going to show you how to determine the number of RAM slots without actually opening up your case. It’s actually a pretty easy task, consisting of just a single command. 

But, wait! There’s more! You may want to know than how many RAM slots you have, you may want to know a lot more about the RAM you have already installed, how many slots are filled, if your RAM has ECC (error correction), the speed, the quantity of RAM per stick, etc…

Well, you can do all that and you can do it all with just a single command. The command in question is dmidecode. While dmidecode isn’t guaranteed to be 100% accurate, it’s usually pretty close. It pulls its data from tables in the DMI (SMBIOS) and presents them to you. Hardware manufacturers aren’t always as nice to Linux users as they could be, so there’s some risk of bad information – or wrongly interpreted information.

While dmidecode has partially been covered previously, it defines itself as:

dmidecode – DMI table decoder

And dmidecode is a pretty handy tool. In a previous article we used it with some success, and we’ll be using it again today, this time to determine the number of RAM slots available to you. On a scale of 1 to 10, I’d say this is a solid 2 – meaning even a rank beginner can follow along.

Determine The Number of RAM Slots:

This article requires an open terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal open, enter the following command:

The line that is important is, “Number of Devices”. On my laptop, the output looks like this:

using dmidecode to determine the number of RAM slots available
The answer is two. Two slots. Ah ah ah ah! Oh how I love to count things!

So, from that, we can determine the number of RAM slots is equal to two. If you want, you can then scroll down and it will show you what RAM is installed. You can see if you have the same number of devices as you have slots. You can even see the size, number of slots, location, vendor. You can use it to learn a great deal about your RAM. 

As I mentioned above, it’s not necessarily going to be 100% accurate. With bleeding edge of hardware, you’ll find it may be less accurate. If your hardware has been around for a bit, you can be pretty sure of the accuracy.

One of the things I notice is the “Maximum Capacity”. That may mean OEM suggested max capacity. I’ve sure seen more RAM than the claimed maximum. On the system, I see a max capacity of 8 GB of RAM. The box has 16 GB of RAM. I’ve seen it claim a maximum of 4 GB of RAM but had 16 GB of RAM in that box. 

Otherwise, it is usually pretty accurate. In the above, I suspect some OEMs are less than honest and would rather you not know that you can add as much RAM as you can. They’d rather you buy a more expensive device, so report the maximum RAM as less than it really supports. However, that’s just a guess and I have zero evidence to support it. It does seem pretty common, however.

Closure:

And there you have it, another article said and done. This one will help you determine the number of RAM slots that you have available. It’s a pretty easy article and a good tool to have in your toolbox. 

As you may have surmised, the antibiotics are kicking in. I’m feeling quite a bit better. Hopefully the articles reflect that. For the past few, I’ve kinda been phoning it in. My goal is to get ahead again. I can probably do that over the coming weekend. 

… Also, anyone reading this out of sequence probably has no idea what half of these closure comments are about. Then again, how many of those folks keep reading after the important bits? Probably not a whole lot. I could write darned near gibberish down here and nobody would be the wiser.

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.

Let’s Learn About Halt

Today’s article is about the halt command. The reason we’re writing about the halt command today is because I was halfway through another article before I realized I’d already written an article on that subject. So, this is going to just be a nice, easy article.

And, yes, yes I did write more than half of an article that I’ve already written. I ain’t even intoxicated!

The command we’re looking at using today is called ‘halt’. For such a little command, here’s an interesting post about the difference between halt and shutdown. And, if that’s not enough, you can read the other answers and comments on that page. 

Anyhow, halt is described like this in the man page:

halt, poweroff, reboot – Halt, power-off or reboot the machine

Of those three, we’ll just be covering the halt. Yes, the man page contains all three in just one page. They’re all related. As I said, we’ll just be covering the useful features of halt command today.

And, without further ado…

The Halt Command:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Once you have the terminal open, the first use of halt would be just to halt the system:

That will halt your CPU. It probably won’t shutdown your computer all the way, it will just stop it. So too won’t the -f (force) flag. If you force it, it just stops the CPU. It looks like and requires sudo:

Finally, of the options we’ll cover, is the -p flag, and the -p stands for poweroff. It’s just another way to shut down your computer, and it obviously looks like this:

Those are about the only ways you’re ever going to use it, if you use it at all. It’s not a command that you’re likely to bump into but now you know it exists and how to use it.

Closure:

There you have it, another article. This one covers the halt command in Linux. It’s not a major article, but I needed one in a hurry – just to ensure there’s one scheduled. While my health is mostly returned, I’m still not so caught up that I have a bunch of extra articles. Feel free to step up and write one or two!

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.

Benchmark Your Linux Box With Geekbench 5

Today’s article will teach you how to benchmark your Linux box with Geekbench 5. It’s a fairly simple exercise, even for a beginner. Parts of the directions for this exercise will change with time, so I hope to make it obvious how you would make said command changes.

What is a benchmark? It’s a measure of your system’s performance. In this case, it tests things like CPU performance, graphics performance, and memory performance. When done, it gives you a handy URL where you can see the results online and share them with your friends.

For example, I have a benchmark result here. That one isn’t as good as it could have been. For example, I had a pile of applications open and hadn’t even been rebooted in about 60 days. See?

Ideally, you’ll run your benchmark with a clean slate. That’ll give you the best results. Be sure to reboot and make sure you’re running as few processes as is reasonable to get the best result.

Why benchmark? Well, it’s good to know how your hardware stacks up. It’s also good for bragging rights, if you’re into that sort of thing. It’s a valuable bit of information if you’re into overclocking. (Overclocking is tweaking at the hardware level to make your system run faster than it is designed for.) It’s a way to measure the performance gains from overclocking.

Well, this article will tell you how to benchmark, using Geekbench 5. It’s not as challenging as one might think!

Benchmark Linux With Geekbench 5:

This article requires an open terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Once you get your terminal open, run the following commands:

That’s going to download the Geekbench 5 benchmarking software for Linux. However, that URL is going to change because the name of the download is going to change when Geekbench releases new versions.

If it has changed – and it WILL change eventually – you can get the new address by clicking on this link. The name of the file is also going to change the following command. It’s an obvious change that you’ll need to make. The current next command is:

That will extract all the files into their own directory. The directory name will also change. So, for this particular file, the next command is this:

Oddly, I didn’t need to make the “geekbench5” file executable, I just ran it with sudo. It looks like:

Now, you wait…

It shouldn’t take very long, though it may take a while on older computers. It will tell you what it’s checking as it checks it and, when done, it will give you a URL to check your results. It’ll look something like this:

geekbench click to see results
That address is where you’ll be able to see your results. Uploading is mandatory with the free version.

You can pay for a copy of Geekbench 5 and get your results locally, or so I understand. I’ve not actually tried it. The free version uploads the results, which I presume they use to crunch additional data, gauging the computers currently in use. They may even provide said data to others, but I’m sure it’s reasonably anonymous. Their privacy policy is located here.

Closure:

And there you have it. You now have your benchmark results in a handy web-page. You can also register to keep track of your previous benchmarks, even adding new results to your collection as you go. Me? I only bothered benchmarking my test laptop and it turned out better than I had expected.

There are other benchmarking utilities. You can use ‘hardinfo’ for some benchmarks, even comparative benchmarks – but older ones, by reading my hardinfo article. If you do benchmark your systems, feel free to leave some comments here or wherever you find this on social media.

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.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.