Random positioning of board game pieces

So I have an 8x8 grid based board game with 8 different pieces which need to be positioned randomly. Simple, correct?

But consider the following

  1. Each game piece is a different length, either 2,3, or 4 grid squares in length

  2. And as a a result of #1, each game piece can also orient vertically or horizontally

Stumbling over this, can anyone help?

Place a few objects at random and then use a packing algorithm to fill in the rest or just brute force it by generating it randomly and discarding the solution and try again if it isn’t valid.