We present numerical calculations of lamellar phases of diblock copolymers (BCP) confined between two surfaces, where the top surface is flat and the bottom one is corrugated. The corrugated substrate is assumed to have a single q-mode of lateral undulations with a wavenumber qs and amplitude R. We focus on the effects of substrate roughness, parametrized by the dimensionless quantity, qsR, on the relative stability between parallel and perpendicular orientations of the lamellar phase. The competition between film confinement, energy cost of elastic deformation, and gain in surface energy induces a parallel-to-perpendicular transition of the BCP lamellae. Employing self-consistent field theory (SCFT), we study the critical value, (qsR)∗, corresponding to this transition. The (qsR)∗ value increases as a function of the surface preference toward one of the two BCP components and as a function of film thickness. But, (qsR)∗ decreases with increasing values of the Flory-Huggins parameter, NχAB. Our findings are equivalent to stating that the critical (qsR)∗ value decreases as the BCP molecular weight or the natural BCP periodicity increases. We further show that the rough substrate can overcome the formation of parallel lamellae in cases where the top surface has a preference toward one of the two BCP components. Our results are in good agreement with previous experiments and highlight the physical conditions behind the perpendicular orientation of lamellar phases, as is desired in nanolithography and other industrial applications.