What to do if neither water nor earth is available
باب إِذَا لَمْ يَجِدْ مَاءً وَلاَ تُرَابًا
Sahih al-Bukhari, Book of Rubbing hands and feet with dust (Tayammum)(view book)
Sahih al-Bukhari 336
Narrated 'Urwa's father:
Aisha said, "I borrowed a necklace from Asma' and it was lost. So Allah's Apostle sent a man to search for it and he found it. Then the time of the prayer became due and there was no water. They prayed (without ablution) and informed Allah's Apostle about it, so the verse of Tayammum was revealed." Usaid bin Hudair said to 'Aisha, "May Allah reward you. By Allah, whenever anything happened which you did not like, Allah brought good for you and for the Muslims in that." Al-Jurf and the time for the 'Asr prayer became due while he was at Marbad-AnNa'am (sheep-fold), so he (performed Tayammum) and prayed there and then entered Medina when the sun was still high but he did not repeat that prayer.
حَدَّثَنَا زَكَرِيَّاءُ بْنُ يَحْيَى، قَالَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، قَالَ حَدَّثَنَا هِشَامُ بْنُ عُرْوَةَ، عَنْ أَبِيهِ، عَنْ عَائِشَةَ، أَنَّهَا اسْتَعَارَتْ مِنْ أَسْمَاءَ قِلاَدَةً فَهَلَكَتْ، فَبَعَثَ رَسُولُ اللَّهِ ﷺ رَجُلاً، فَوَجَدَهَا فَأَدْرَكَتْهُمُ الصَّلاَةُ وَلَيْسَ مَعَهُمْ مَاءٌ فَصَلَّوْا، فَشَكَوْا ذَلِكَ إِلَى رَسُولِ اللَّهِ ﷺ فَأَنْزَلَ اللَّهُ آيَةَ التَّيَمُّمِ. فَقَالَ أُسَيْدُ بْنُ حُضَيْرٍ لِعَائِشَةَ جَزَاكِ اللَّهُ خَيْرًا، فَوَاللَّهِ مَا نَزَلَ بِكِ أَمْرٌ تَكْرَهِينَهُ إِلاَّ جَعَلَ اللَّهُ ذَلِكِ لَكِ وَلِلْمُسْلِمِينَ فِيهِ خَيْرًا.