In the movie Master and Commander: The Far Side of the World, the Surprises board their French prey, Acheron, and are brought up short. Apparently, everyone is dead. Struck down by the great guns of Surprise during initial broadsides. Master Allen buys the ruse, and is shot in the head for his gullibility.
Of course, in the case of an able and seasoned captain like Jack Aubrey this would never happen. Killing everyone aboard with a broadside or two is as unlikely as sinking a man-of-war with one shot. Even if he didn't see a man on deck Aubrey would know where his enemy was: they had retreated to closed quarters.
Never seen in movies and rarely spoken of in fiction, closed quarters was a surprisingly common tactic in a boarding situation particularly among poorly armed merchantmen. If there was time to prepare the ship (as in the occurrence of a long chase) and the quartering was done correctly to the last detail, it could save lives, cargo and the ship itself. If botched, however, it could be almost as bad as hand to hand fighting on deck.
Everyone aboard ship would retreat below when the enemy came along side. Hatches had to be reinforced and locked or lashed down so that the boarders could not enter. Prior to the actual retreat what was known as loopholes would be drilled in the deck to allow defenders to shoot small arms and sometimes cannon through them at the attackers. The French, in their usual sarcastic if poetic way, called the loopholes meutrieres: murderesses.
If possible, cannon were positioned to clear the decks of boarders. If they could not be positioned correctly, they were spiked or even thrown overboard so that the enemy could not avail themselves of their prey's weapons. Individuals tossed grenados and stink pots from their hiding places. If time permitted powder chests were set up prior to the boarding. These were kegs or wooden boxes filled with black powder and anything heavy and/or sharp that could do damage to human flesh and bone. Fuses would be run below decks so that the chests could be set off once the boarders were on deck, the explosion burning and cutting them up if not killing them outright.
Robert Everard, a Frenchman who wrote of his forced service aboard a merchant in the Indian Ocean in 1686, recalls his ship being threatened by pirates. Everard's captain prepares to take up closed quarters shouting the challenge "Win her and have her," to the pirates. The freebooter boards and spends hours destroying yards, deck and rigging. The merchant trains her minimal arsenal on the pirate and, as Everard tells it:
... yet we beat his gunnel in and made him put off and lie upon the careen. As soon as she was gone we came out of our close quarters and found one of his men almost dead upon our poop...
Of course, if the quartering was not done correctly, grenades could be pitched into the hold, burning those hiding there at the very least. And then no quarter would be given by the raiding pirates for the prey had not acted "prudently" and would not be forgiven for their injury to the freebooters.
As with so many things in life, closed quarters had to be well thought out and well executed or the damage might be more than anyone cared to suffer.