Cover beans with water, bring to boil, and boil for 2 minutes.
Cover pan and let stand for 1 hour.
Add onion and salt; cook until tender, adding more liquid if necessary.
Drain, reserving 1 1/2 cups liquid.
Mix liquid with ketchup and next 4 ingredients.
Put ham in 3-quart casserole.
Put beans around ham and pour liquid over top.
Cover and bake in preheated slow oven (325°F.) for 1 1/2 hours.
Remove ham and put beans back in oven.
Bake, uncovered, for 1 hour more.
Remove rind from ham and cut meat into bite-size pieces.
Add to beans and bake for 30 minutes longer.