I thought using linux was the best way to do it. I want to create a specialized USB that does a simple thing like run a program or automated script I put on it when you boot into it. I don't want a GUI or anything like that, I just want to have it run in tty and restart. One example would be like a recovery tool that runs and does fsck and stuff like that, or one that recovers the password automatically. As if I were running autorun on windows on boot.
How would I go about making something like that? I'm a programmer in C/C++, so I can handle complicated solutions. I thought I might have to make a custom linux distro.