To be honest, I don't remember exactly where I found it, and I'm replying via my phone. I'd start by looking on e38.org, then if no luck there, then try using Google.

When I did it I remember a few sites I found. One had me disassemble the lock and check to make sure the spring mechanism was intact, the other had me doing something like turning the trunk key while connecting the battery or something. Sorry I can't give you more at the moment.