Find out what make the 40G is.
DLoad the free software from the manuf. site.
Connect the 40 to where the CDRom drive/s are.
Reboot and run the DLoad and "clone" the 5G to the 40G.
This will give you an exact replica of what you had on the 5G.
Shut down.
Disconnect the 5G drive, replace it with the 40G with the jumpers set on the back of the 40G set to master and hook it up at the end of the ribbon cable.
Re-boot a few times in a row and make sure all is running.
If so at a later time you can hook up the 5G on the middle ribbon connector with it's jumpers set to slave and then format/erase it and use it for extra storage.
Free and simple. Just take your time.