Determine disk type for clearpart on kickstarts

Latest response

I would like to develop logic in my kickstart to determine whether or not there is an sda or nvme0n1 drive and then clearpart that disk. So far, I have tried the solutions here:

https://www.redhat.com/archives/kickstart-list/2012-October/msg00014.html
https://gist.github.com/oogali/7629503#file-root-disk-selection-ks

But, they fail saying the drive cannot be located (it is an sda drive on my test machine). I have also tried just using the command "clearpart --drives=sda,nvme0n1 --Linux" and it fails saying it could not locate the drive.
Any assistance is appreciated. I am using RHEL 6.9, Satellite 5.7.

Responses