How do get Genocide in Hard Mode?

There are two separate issues here:

  1. Genocide normally requires a completely unreasonable amount of grinding. It is not meant to be possible to trigger accidentally. Touching every single tile on the map is neither necessary nor sufficient; you need to walk continuously (in whatever direction you like) until you have randomly triggered enough encounters. Speedrunners usually use a technique where the protagonist can be made to rapidly oscillate between walking north and south while facing a wall, which (reportedly) causes encounters to happen more frequently because you are taking more steps per unit time. If you want to be sure that you are meeting all of its requirements, you may need to count kills explicitly, rather than just assuming that visiting all corners of the map is good enough.
  2. Hard Mode is not a complete game mode. It ends after the Ruins, with the Annoying Dog's dialog suggesting that it's basically a demo. I'm not sure if the Genocide route is even implemented in Hard Mode. Even if it is, you won't get any further than the Ruins, because the rest of the game is not implemented even for the Neutral Route.