Boundary conditions and the entropy bound