I've always wondered how the kernel passes control to third-party code, or specifically distribution-specific code, during boot.
I've dug around in GRUB's configuration files, suspecting a special parameter to be passed to the kernel to let it know what to do once it has booted successfully, but unable to find anything. This leads me to suspect there may be certain files on the root partition that the kernel looks for.
I'd be grateful if someone could shed some light upon this matter. How do distributions achieve this?