For installing any OS on a mobile/PC, you need to know what are the hardware devices(like processor, RAM, Flash/memory, etc) connected on the HW platform. Then System software engineers can write the drivers for the given hardware platform (drivers which are not present).
Nokia710 mobile ported with Windows OS, as they(Nokia) know what are the devices connected on Nokia710. So they have written device drivers for their platform and ported Windows.
Ubuntu or Android OS cannot be ported on Nokia710, as these OS not aware of the hardware platform. But if somebody knows about the hardware details of a mobile, they can port any open source OS(Ubuntu/Android) on given platform by writing/including drivers for the same hardware.