One day while Meryl was out running errands I decided to hook up the bathroom fan. We chose a Panasonic for their reputation as being reliable and quiet which was important since it's a bathroom right next to the bedroom. Normally I would prefer to vent through a wall instead of through the roof, but the location of the fan was pretty far from the nearest available exterior wall so I decided to go straight through the roof instead.
The directions call for a about 2' of horizontal run before going vertically through the roof, so I spotted the location for the roof penetration and drove a screw through the roof. Once on the roof, I set out all my tools and materials and began laying out the vent location. I marked the width of the vent and I cut through two layers of shingles to expose the tar paper underneath. I was able to locate the vent in the center of one course of shingles because I had some flexibility in the attic space, and there was only one nail in the way, so I got kinda lucky.
Once I determined the location and cut the middle and bottom shingle out of the way, it was time to drill a hole for the vent pipe. I used a 4 1/2" hole saw to cut the hole. Next I used a flat prybar to separate the courses from each other so I could slip the vent flashing under the middle course. I also separated a section of the middle course from the bottom course so I could drive additional nails to keep the shingle down. I covered the nails with caulking - Geocel 2300 is an excellent roofing quality caulking meant precisely for this kind of application.
Finally, it was time to drop the vent into position. I ran a generous bead of caulking in an inverted "U" around the hole in the roof and slid the vent flashing under both the top and middle courses of shingles. I nailed the vent flashing in the sides and top to secure it to the roof deck. I finished it all off with more caulking on the nail holes and vertical lines of caulking under the shingles on either side of the vent which allowed me to press the shingles into the beads for a watertight seal.
After the work on the roof was done the last thing I needed to do was connect the fan to the roof vent. I chose to use a flexible ducting instead of a solid one because it's easier and we had it on hand. I clamped the ducting to the fan exhaust and roof vent with a screwgun. I then did my usual belt and suspenders routine by using both foil duct tape and water based duct mastic to eliminate moist bathroom air from leaking into the attic. I also wrapped some pipe insulation around the ducting to reduce the chance of condensation forming on the ducting (because of the warm bathroom air meeting the cold attic air).