Basis is determined as of the date you acquired the asset. That is step one.
Step two is how you acquired the asset. If you acquired by purchase, then the cost is the basis. If the cost included both the surface and subsurface, then you must allocate the cost between the two estates. That allocation is fact sensitive and depends upon whether you secured the property knowing the mineral rights had value.
If your did not allocate the basis at the time of purchase and are unable to ascertain the allocable basis of the mineral rights estate, you must use a zero basis.