Ermey was convinced that the scenes in boot camp wouldn't be believable unless the actors were actually frightened of him. So the other actors in the film only saw him as the Gunny Hartman character. He never spoke, ate, or fraternized with any of them unless it was during a scene. Much to Ermey's pleasure, the fear you see on the screen is real. Many times in the shooting the actors would become so flustered by Ermey that they would blow their lines. Ermey recalls that he's seen the other actors in the film around Hollywood from time to time, and they still won't speak to him.
R. Lee Ermey actually wrote all of Gunny Hartman's dialog himself. Ermey was involved in a serious car accident right before shooting, so Kubrick invited Ermey to come stay at his house in England to recover. While recovering Ermey read the script over and over, and he remarked that the Drill Instructor's dialog that was in the script was obviously the work of a screenwriter with a cliche imagination who obviously had no idea what boot camp was really like. So Kubrick allowed Ermey to re-write all of the dialog himself.
Many of the extras in the boot camp scenes were actually serving members in the British Territorial Army. They were chosen because it was assumed that they would be familiar with drill. However the English drill practices were so different from the American Marine corps practices that R. Lee Ermey himself had to re-train the British troops to march in Marine Fashion. Ermey said it was twice as much work trying to re-train them than it would have been just training raw recruits.
In some scenes, you can see that R. Lee Ermey does not move one of his arms. That's because he got in a car accident that broke several of his ribs. Being the strong person that he was, he forced himself to not pass out and wait for help to arrive.
The Vietnam scenes were shot in England, at the old disused British gas works in Beckton, East London. To the east of what is now London City Airport. Kubrick had full-grown palm trees planted for those scenes.
According to Ermey, during the shooting of the scene in the head where Pyle kills Hartman, Ermey walked in wearing his Drill Instructor Smokey cover. Kubrick immediately called a cut, and said that it didn't make any sense for a Drill Instructor to still be wearing his Smokey in the middle of the night, while he's in his underwear. Ermey had to inform Kubrick that a D.I. always has his smokey on, as it's his symbol of authority. Anyone who's ever been in the marines knows that the D.I's Smokey is basically part of their head. The only time you actually see Hartman without his Smokey is when he's dead.