>>1597072actually post your bike. because it really depends.
pic related are a generic thing called p-clamps you can find anywhere and they work ok. You can mount a generic rear rack with just 4 p-clamps, some allen bolts, and nylock nuts for them. Zip tie a metal basket on it. Put your backpack in it. Wa la.
Tubus makes superior bike specific mounting hardware of various types.
You could also get a rack that mounts on your axle like various Old Man Mountain racks for example. If you have a bolt on axle with spare thread already it's easier. A lot of old shitbikes have that type of rack if you can find one in a junkyard or something.