Go to the DIY sticky at the top of the page, & look at the DIY for the top problems. It is possible that your convertible top could possibly keep the trunk from opening. There are many threads on this that should help.
I recently had a similar issue on my E64 M6. I had a few additional issues that went along with this, but bottom line is I replaced the convertible top control module, and one of the convertible top latches. If your top and rear window is working, it is likely not the module. However the latch was the final fix that got the trunk operational, and I believe it is one of the more common issues. It's a $700 part, so it isn't something I would jump on without a proper diagnosis.
A forum community dedicated to BMW owners and enthusiasts. Come join the discussion about Bimmerfest events, production numbers, programming, performance, modifications, classifieds, troubleshooting, maintenance, and more! Bringing the BMW community together.