I recently built a project that required drilling a couple of 1⁄4"-diameter holes 2 1⁄2" deep into the ends of several 6'-long boards. It was crucial that the holes were drilled square to the ends of the boards. I knew I couldn’t accurately drill freehand, and the boards were obviously too long for the drill press.
After some head scratching, I realized that the solution was to bore out a drill guide block on the drill press, then glue it to a backer block that would allow clamping the guide to the workpiece, as shown in the drawing. Making the guide block about 11⁄2" long allowed me to drill deep enough into the board to create good starter holes. After removing the jig, I drilled them to final depth. A doweling jig would also work, but the beauty of my setup is that, by aligning the edge of the jig with the edge of the board, the holes are self-registering.