I think as far Data Ontap 8 onwards is concerned :The OS (ontap operation system) is stored on the CF/USB flash boot_media device in the controller (depending upon the Model). The root aggregate contains the root volume that stores OS related stuff like configuration and logs. However it boots from boot_media device. Thanks!
Just to mention: the whole of ONTAP itself is not stored on the boot medium, but on vol0 in the root aggregate.
But it is started from the pre-boot-environment that's stored on the Boot Medium. I.e. there's kernel(s) and drivers and stuff, but all of ONTAP, let alone 2 versions ("images") of it, don't fit on it.