The aim of this paper, is to use the Buongiorno's mathematical model for studying the effect of boundary conditions and some control parameters on the onset of convective instability in presence of a uniform vertical magnetic field in a confined Darcy-Brinkman porous medium filled of an electrically conducting nanofluid which will be considered as Newtonian and heated uniformly from below. The linear study which was achieved in this investigation shows that the thermal stability of nanofluids depends of the state of the horizontal boundaries (rigid or free), the magnetic Chandrasekhar number, the buoyancy forces, the Brownian motion, the thermophoresis and other thermo-physical properties of nanoparticles. The governing differential equations are transformed into a set of ordinary differential equations by using similarity transformations, these equations will be solved analytically by converting our boundary value problem to an initial value problem, after this step we will approach the searched solutions numerically by polynomials of high degree to obtain a fourth-order-accurate solution.