See Post 390 and the surrounding discussion. There are indeed bacteria called "Obligate Chemolithoautotrophs" that get all of their energy and body mass from inorganic sources.
Lichens are similar. They can live on a vertical rock face, ingesting water, carbon dioxide, and some minerals.
One of the bacteria in the linked-to post lives on sulfur and requires ferric iron in its environment. Another one can live on car exhaust.
Think of the ecosystem around vents in the ocean floor.
Examples of what we got NOW.
From where did they come?
You add water, a polar molecule essential for life.
When I said nothing lives on inorganic dust, rocks, sand, I meant nothing lives on dust, rock, sand. In the universes I refer to there would be no water.
Water is the first thing we look for when exploring other planets becaus of its importance for life, as we know it. Water has a transformational capability which helps extract energy from other molecules.