Clarification of Kickstart Disk-related Commands

Hi Nasunalika:

I’ve noticed that in the Rocky kickstart files on
https://git.rockylinux.org, with Rocky-8-XFCE.ks as an
example, the following code segment is used for hard disk
setup:

# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
# Disk partitioning information
part / --fstype="ext4" --size=5120
part / --size=6656

On the surface, it would seem that prior to installation, the hard disk would be wiped clean.

Thankfully, that doesn’t happen. I’ve installed the Rocky-8-XFCE .iso several times on 3 different machines with multiple partitions in use, and the installation always proceeds normally and uses the target partitions as entered in the installer dialog.

I don’t understand why this code segment thankfully doesn’t have a destructive effect, and if it has no effect, why is it there.

Your clarification would be appreciated.

Thanks in advance !

Len E.

The kickstart is simply used to create the live image in livemedia-creator. It does not tell the anaconda installer how to partition disks or install to the system.

zerombr initializes disks whose formatting is unrecognized …