Rocky Linux Installation with 80GB RAM: Configured to Use 75GB Swap
This article covers the process of installing Rocky Linux on a system with 80GB of RAM and configuring it to use 75GB of swap space. We will discuss the key concepts related to swap space and its importance in a Linux system, as well as provide a detailed, step-by-step guide to the installation process and configuration. The article concludes with a summary of the process and references for further reading.
Understanding Swap Space
Swap space is a portion of a hard drive that has been set aside for use as memory. When a system runs out of RAM, it can temporarily use the swap space as additional memory. This can be useful in situations where a system has a large amount of memory but not all of it is being used at once. By using swap space, a system can make use of its resources more efficiently and avoid running out of memory.
Installing Rocky Linux
The first step in the installation process is to download the Rocky Linux installation image from the official website. Once the image has been downloaded, it can be burned to a DVD or written to a USB drive using a tool such as dd.
sudo dd if=/path/to/rocky-linux.iso of=/dev/sdX bs=4M
Where /path/to/rocky-linux.iso is the path to the downloaded installation image and /dev/sdX is the device path for the USB drive.
Once the installation media has been created, the system can be booted from it. This will bring up the Rocky Linux installation screen. Follow the on-screen prompts to select your language, keyboard layout, and other system settings. When prompted, choose the option to partition the disk manually. This will allow you to create a large swap partition.
Creating a Swap Partition
To create a swap partition, first select the free space on the disk where you want to create the partition. Then, choose the option to create a new partition. Set the size of the partition to 75GB and choose the partition type of "Linux swap." Once the partition has been created, it will need to be formatted using the mkswap command.
sudo mkswap /dev/sdaX
Where /dev/sdaX is the device path for the new swap partition.
Enabling Swap
Once the swap partition has been formatted, it can be enabled using the swapon command.
sudo swapon /dev/sdaX
To make the swap partition persistent across reboots, it should be added to the /etc/fstab file. This can be done using a text editor such as nano.
sudo nano /etc/fstab
Add the following line to the end of the file:
/dev/sdaX swap swap defaults 0 0
Verifying Swap Usage
To verify that the swap partition is being used, you can use the free or cat /proc/swaps commands. However, for a more detailed view of system memory usage, you can use the bashtop command. This will provide a real-time view of system memory usage, including the amount of memory being used from the swap partition.
- Rocky Linux is a new Linux distribution based on Red Hat Enterprise Linux.
- Swap space is a portion of a hard drive that can be used as memory when a system runs out of RAM.
- A swap partition can be created during the Rocky Linux installation process.
- The swap partition must be formatted using the
mkswapcommand and enabled using theswaponcommand. - The swap partition should be added to the
/etc/fstabfile to make it persistent across reboots. - The
freeandcat /proc/swapscommands can be used to verify swap usage, but thebashtopcommand provides a more detailed view.