Generate a grid with sequential numbers
Q: How to generate a grid where the cell numbers are sequential?
A: You can use g.region and r.mapcalc for this:
# get rows and cols as environment variables
eval `g.region -g`
# generate the grid
r.mapcalc "grid_seq = col() * $rows + row() + $cols - ($rows + $cols)"
d.mon x0
d.rast.num grid_seq
The resulting raster map looks like this: