If you are a competent asm coder, it is trivial to write your own code to put in the MBR to do whatever you like at boot time, including checking for a specific blind keystroke with a short timeout to boot a very well hidden OS. (I've coded and used that several times for various reasons).
Hiding an OS may be a harder problem, depending on the level of expertise of the person you want to fool. Hiding it from an ordinary user who just sees what the booted (non hidden) OS shows him, is pretty trivial. It is vastly harder to hide it from an expert who expects something hidden to be there and
comes armed with his own bootable CD (so he can trust what his own
OS tells him about your hard drive).
However well or poorly you have the OS hidden, the well disguised secret boot method will probably be a minor part of the total effort.
Grub (the common Linux boot manager) can be easily customized for what it looks like while booting, how long it waits for keystrokes and what it boots by default. So to fool ordinary Windows users, you might not need to hide the Linux install at all nor do any of your own programming. You might just configure GRUB to be fairly silent and to default to booting Windows after a fairly short timeout.
Originally Posted by G.Freeman
I was talking with a few friends about an episode of NCIS where something similar to this happened,
I watch a lot of similar crime solver fiction, but not that particular series. The "science" mentioned and used in those shows is almost always total nonsense. But extrapolating from what you posted, maybe this time they were moderately close to the truth.
we began wondering if it was possible to make an OS unbootable unless the booter knows how to make it boot.
It is quite trivial to make an OS easily bootable to someone who knows the secret while it could be totally unbootable even by an expert who knows it is there and invisible to a non expert who doesn't know how to look for it.
Making it invisible to an expert would be borderline impossible. But making it useless to even an expert who could easily find it probably just needs some decent encryption plus attention to a whole bunch of complicating details.