Glue it down! Construction adhesive can solve a lot of common problems. When floors are new, the nails hold the subfloor tight to the joists. But after the wood dries out, there is often a space left between the plywood and the joists. It is the rubbing between these two pieces of wood, and rubbing on the nail, that makes a squeaky floor. Many floors have even more layers of wood and the squeaking can come from any two of these rubbing together. Construction adhesive will go a long way toward preventing squeaking. All the layers of wood stay locked together even if they shrink, and you get a more rigid floor as well. Construction adhesive comes in caulking gun type cartridges. Simply gun a single line of adhesive down the middle of the floor joist before putting down the subfloor. Then use flooring screws, not nails, to attach to the joists. If you are putting down a thin underlay over the plywood, make a snakelike pattern with the adhesive and then screw down the underlay as well.