what is covering my garage walls and rafters?

My garage is sturdy ish and would be an awesome space if it wasn't covered in this stuff. I don't think it's been used for a long time, the front part of the building has a lean to it and the garage door is broken and unsafe to operate.

I was guessing it might be an old insulation but would they have caked the beams too? It's just odd enough to me I wanted to check and see if anyone here may have any ideas.

I was planning to try and scrape the walls, but pieces seem to flake off from the ceiling as well. Any advice to tackle this would be greatly appreciated.