Yes, you must fragment the genome in order to insert it into a vector for cloning; you can't "insert" the whole 5 Mbp genome of E. coli into a vector. It's difficult to transform cells with huge plasmids, 2-20 kbp is an optimal range. In any case, if you want a clone of the whole genome, wait 30 minutes and the cell will happily oblige you.
Most procedures that isolate genomic DNA will fragment it in the first place, as it is much too large and fragile to stay together, and if it did it, the majority would be caught up in other cell debris and discarded. Vortexing with glass beads is a typical first step to randomly fragment it. After this, you can digest the DNA and your vector to place matching ends on it, ligate it, and transform host cells.
If you want a targeted approach (to extract a specific gene, a technique with which I am unfamiliar), you may be able to use PCR on your extracted, fragmented DNA, as there would hopefully be one intact segment spanning what you want.