"Started Service enabling compressing RAM with zRam" - CentOS/RHEL 7 Installation hung
The Problem
When installing CentOS/RHEL 7 on a hardware box with huge amount of ram installed, the installation gets hung at:
[ OK ] Started Anaconda NetworkManager configuration.
Starting Anaconda NetworkManager configuration...
Starting Terminate Plymouth Boot Screen...
Starting Login Service...
Starting Wait for Plymouth Boot Screen to Quit...
Starting Dump dmesg to /var/log/dmesg...
Starting firewalld - dynamic firewall daemon...
Starting Service enabling compressing RAM with zRam...
[ OK ] Started System Logging Service.
[ OK ] Started Dump dmesg to /var/log/dmesg.
[ OK ] Started D-Bus System Message Bus.
Starting D-Bus System Message Bus...
[ OK ] Started Login Service.
[ OK ] Started Service enabling compressing RAM with zRam.
The Solution
The line of “Started Service enabling compressing RAM with zRam.” indicates kernel component zRam creates a compressed block device inside the system RAM and uses it for swap space instead of the hard drive. This allows the installer to essentially increase the amount of memory available, which makes the installation faster on systems with low memory.
By default, swap on zRam is enabled on systems with 2 GiB or less RAM, and disabled on systems with more than 2 GiB of memory. The cause that installation getting hang is because zRam is compressing memory. it is still not clear why it is not disabled at seeing memory much more than 2GiB. This option can be changed/disabled on a system with more than 2 GiB RAM manually, use inst.zram=1 to enable it, and on systems with 2 GiB or less memory, use inst.zram=0 to disable this feature.
It is possible to access the boot command line by selecting an installation option in the boot menu and then pressing either the E key (UEFI-based systems) or the Tab key (BIOS-based systems). A prompt is displayed, which enables you to edit the boot options by adding inst.zram=0 and press enter to start the installation.