From the Online Etymological (word origins) Dictionary: "1555, whobub "confused noise," generally believed to be of Irish origin, perhaps from Gaelic ub!, expression of aversion or contempt, or O.Ir....
It came into English in the 16th century, during the nine years war with Ireland. It was the description of English soldiers of the Irish warcry "abu".