We classify here the title groups and note that such groups must be of exponent > 4 if both D(8) and H(2) = < a, b vertical bar a(4) = b(4) = 1, a(b) = a(-1)) appear as subgroups (Theorem 1.1). This solves a problem stated by Y. Berkovich in [Y. Berkovich, Groups of Prime Power Order, I and II (with Z. janko), Walter de Gruyter, Berlin, 2008]. On the other hand, if G is a nonabelian finite 2-group all of whose minimal nonabelian subgroups are non-metacyclic and have exponent 4, then G must be of exponent 4 (Theorem 1.5). We also solve a more general problem Nr. 1475 of Berkovich (Y. Berkovich, Groups of Prime Power Order, I and II (with Z. janko), Walter de Gruyter, Berlin, 20081 by classifying nonabelian finite 2-groups of exponent 2(e) (e >= 3) which do not have any minimal nonabelian subgroup of exponent 2(e) (Theorem 1.6). Finally, we prove Lemma 1.7 which might be useful for future investigations. (C) 2009 Elsevier Inc. All rights reserved.