  Stratified disks with strong horizontal magnetic fields are susceptible to
magnetic buoyancy instability (MBI). Modifying the magnetic field and gas
distributions, this can play an important role in galactic evolution. The MBI
and the Parker instability, in which cosmic rays exacerbate MBI, are often
studied using an imposed magnetic field. However, in galaxies and accretion
discs, the magnetic field is continuously replenished by a large-scale dynamo
action. Using non-ideal MHD equations, we model a section of the galactic disc
(we neglect rotation and cosmic rays considered elsewhere), in which the
large-scale field is generated by an imposed $\alpha$-effect of variable
intensity to explore the interplay between dynamo instability and MBI. The
system evolves through three distinct phases: the linear (kinematic) dynamo
stage, the onset of linear MBI when the magnetic field becomes sufficiently
strong and the nonlinear, statistically steady state. Nonlinear effects
associated with the MBI introduce oscillations which do not occur when the
field is produced by the dynamo alone. The MBI initially accelerates the
magnetic field amplification but the growth is quenched by the vertical motions
produced by MBI. We construct a 1D model, which replicates all significant
features of 3D simulations to confirm that magnetic buoyancy alone can quench
the dynamo and is responsible for the magnetic field oscillations. Unlike with
an imposed magnetic field (arXiv:2305.03318,arXiv:2212.03215), the nonlinear
interactions do not reduce the gas scale height, so the consequences of the
magnetic buoyancy depend on how the magnetic field is maintained.
