In the video I forgot to mention (and some people already ran into this problem):
the magic number must be put to the beginning of the file, because the bootloader will only look for it in the first 2 MiB (iirc),
so if you put it at the end, it will work for a while, but it will stop working once the kernel becomes big enough.