The HD scenario is mostly fantasy on the internet. In real life, pistols are used, and less than three shots fired.
In real life, they are pounding down the door, or you come home to find it open and hear voices inside.
In real life, you call 911 FIRST - after all, pizza gets there faster - and then you warn the assailant to stop or you will shoot them dead.
In real life, the citizen has no obligation to shout "stop," or waste ammo firing a warning shot, or the other stuff that fills S&T forums as postulated by LEO's who are obligated to respond in a legal manner and escalate force to meet force.
The citizen can simply shoot the dumb perp upon his immediate discovery on your premises. You will like have no time to get, or have in your possession, a long arm. You will have a pistol either CCW or close by, simply because they are much handier. People wear them all day. People with long arms rack them inside buildings, and go without.
I'm not tellling anyone they can't use a long arm, but having served 22 years, MP and Infantry, worked in armed security, and simply reading accounts of home invasions, I LOL at anyone who thinks they are going to handgun their way to the long arm. In most accounts, they shoot the intruder once discovered on the property.
Use a light to ID them, it's completely valid to carry it separate off handed to control where you want them to respond as your center of mass.
The major issue ignored in these fantasy discussions is Why break down your door? Statistics show a number of possibilities, the most likely are: you ripped off your drug lord, stole his girlfriend, or smacked down the gang on the street, and they want revenge. After that, you've been leaving your otherwise suburban home a vacant target with the Xbox, 54" plasma, and new laptop boxes sitting at the curb.
In other words, clueless. Figure out the real problem - moving to a better neighborhood often helps, so does CCW. There's a reason carry licensing has multiplied a decade before the AR15 became a fashionable topic in the Home Defense fantasy theater.
I would strongly encourage anyone who is concerned about home security to actually study it, and spend their money on combatives and armed handgun response. Those are the primary tools you need when physical and behavioral remedies have apparently failed, and some less than normal human still decides to rob you.
Whether you decide to practice Point and Shoot, or use the sights, it is more likely you'll do it with a handgun and be done with it, rather than retreat to a safe room. You as a citizen are NOT obligated to surrender any turf to an intruder. Castle doctrine or not, it's still the primary rule, Better to be judged by twelve, than carried by six.