Yep, David Copperfield. I was surprised to see Tom Brown was written in 1857 - that early.
Just as Dickens used his own childhood, as a basis of sorts, for DAVID COPPERFIELD, Hughs used his and his brother's school days ( but more so! ), for his book on his Public school.
There were also books, for girls ( though not many and completely prettied up ), about a private school in Switzerland, written in the 1930s, maybe early '40s, but glamorized and silly fiction.