The New Oxford American Dictionary reports that bum is synonym of vagrant ("a person without a settled home, or regular work, who wanders from place to place and lives by begging"), and that to bum means, "to travel, with no particular purpose or destination." On the list of the phrases, it lists also on the bum to mean, "traveling with rough provisions and with no fixed home."
The dictionary reports that the origin of the word is probably from bummer, and that bummer derives perhaps from German Bummler, from bummeln ("stroll, loaf around").
For hobo, the same dictionary reports that its origin is late 19th century, but the word from which it derives is unknown.