SharePoint SP2 enables compatibility with Server 2008 R2, so first you've got to make a slipstream install -- then you can install without any problem.
The steps for making a slipstreamed installation of MOSS are pretty simple.
- Download a MOSS image, and extract it (or copy the contents) to a folder.
- Download WSS and MOSS SP2 patches
- Run each patch with /extract:<\mymossimage>\Updates\mymossimage>
- Delete Wsssetup.dll from the updates folder.
- Keep in mind that if you have the combined x86/64 MOSS ISO, your updates folder will be in \x64\Updates or \x86\Updates.
For more details, follow the technet article:
Once you have your slipstream image ready, you'll need to enable a few roles on your Server 2008 R2 box.