Grub legacy typically loads a couple of config files and then boots the linux kernel. For ubuntu, the kernel loads modules and services are supplied via Upstart, a replacement for the old sys V init systems.
So I'd start looking through Grub/lilo docs and then move on to the init systems.
I don't know much in the way of specifics, but look up Upstart to understand the event based boot up of ubuntu. Sys V Init is the old system still employed by many linux distributions. But most of them are moving to event based systems.