How to partition a box
A simple approach can be the use of knife project (but depending on the shapes you want for the compartments) :

Here I started from a cube and planes giving the shape of the compartments.


Select the planes RMB
Add the cube to the selection Shift+RMB so that both are selected and the cube is the active object.
Go top view Numpad7
Wireframe mode to have a better visibility Z
Enter edit mode (that will edit the cube but keeping the planes selected) Tab
Use 'knife project' (don't check cut through as we want to keep the base intact)
Then extrude down the compartments E along Z axis




Edit : following the comment, I add here the blend file with step by step explanations :