You can run Linux on a CD or DVD(no hard disk required). Here or some ready made distributions that run off of CD's:
Imagine running it off of a dvd-rw (or cd-rw) using the UDF filesystem. In case you don't now what UDF is, it is a standardized filesystem that is used for optical media like cd-rw's and dvd-rw's. It allows these optical media to behave much like magnetic media: random access read and *write*. It's not as fast as magnetic media, yet, but it still works!
Here are some links for UDF filesystems on cd's and dvd's
It's also possible to make linux run off of a read-only cd ( but not as desirable ). For example, you can use a ramdisk as your root file system and create symlinks onto the the read-only cd. This is kind of an ugly way of doing it, but it works!
If you want to use a read-only filesystem it would be better use a Copy on Write (COW) filesystem driver that allows a writable ramdisk to be mounted or "layered" on top of a read-only disk. Whenever a read-only file needs to be modified, a copy would be automatically created in the writable layer.