I find myself working with Raspbian disk images fairly often. A typical workflow is:
- Download the disk image.
- Mount the filesystem somewhere to check something.
- Make some changes or install packages just to check something else.
- Crap I’ve made changes.
…at which point I need to fetch a new copy of the image next time I want to start fresh.
Sure, I could just make a copy of the image and work from there, but what fun is that? This seemed like a perfect opportunity to learn more about the device mapper and in particular how the snapshot target works.