The cleaner way of doing this is through "inittab". Normally this starts a program called "getty" on the console which provides the login prompt etc. That's what you want to override. It will also restart your program every time it quits.
(Less normal options include "put your program in the initrd", which is viable if it's very small and does all the setup itself, or "write something that runs directly from the UEFI loader")