Tayammum is valid if done using anything that comes from the face of the earth, such as dust, mud, rocks, sand and clay, because Allaah says (interpretation of the meaning):
“perform Tayammum with clean earth”
Sa’eed (translated here as earth) means the face of the earth. Tayyib (translated here as clean) means pure.
It is permissible to do tayammum with anything that is from the earth. This is the view of Abu Haneefah and Maalik. In their view, it is valid to do tayammum with dust, sand and pebbles. Abu Haneefah regarded it as permissible to do tayammum with smooth rocks surfaces, plastered walls and clay made from pure mud. The same applies if one strikes a cloth and dust rises.
Badaa’i’ al-Sanaa’i’, 1/53; al-Taaj wa’l-Ilkeel, 1/511; al-Mawsoo’ah al-Fihqiyyah, 14/261
Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him) favoured the view that it is permissible to do tayammum with things other than dust from other parts of the earth, if one cannot find dust. Al-Ikhtiyaaraat al-Fiqhiyyah, p. 28.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked about a sick person who cannot find dust – can he do tayammum by striking his hands on the wall or the bed, and so on?
He replied: If the wall is built of something that comes from the earth, such as rocks or mud bricks, then it is permissible to use it for tayammum. But if the wall is covered with wood or paint, if there is any dust on it then it may be used for tayammum and there is nothing wrong with that. It is like doing tayammum on the ground, because dust particles come from the earth. But if there is no dust on it, then it is not from the earth and cannot be used for tayammum.
With regard to the bed we say, if there is dust on it, it may be used for tayammum, otherwise it should not be used for tayammum because it does not come from the earth.
End quote from Fataawa al-Tahaarah, p. 240.
It is permissible to do tayammum on walls or vessels made of clay, so long as they are not painted. If they are painted, tayammum is not valid unless there is dust on them. The Muslim can put some dirt or sand in a vessel and use that for tayammum.
And Allaah knows best.