When booting, the Solaris boot manager gives you all 4 primary partitions for choosing which to boot from. If you had your boot loader installed on the boot sector of a primary partition, everything should be fine. Just boot from this partition, and Linux should come up.
Now you have lilo as a secondary boot loader, but you want
it to be your primary boot loader again? No Problem. Lilo
can easily chain boot Solaris. Just add the appropriate
other= lines to your lilo.conf
For testing, you should add the Solaris chain loading to the lilo in your boot sector first. Then try chain loading lilo, Solaris, lilo, Solaris, ... until you have enough of it. If this works, you should be able to put lilo back into the MBR again.
However, Solaris might have messed up your partition table. This has happened on my system after installation of Solaris 8. Lilo doesn't like the new partition, nor does fdisk. I had no problems with Solaris 7
Unfortunately, I have no experience with grub booting Solaris. If you do, please mail me!