I've successfully installed a native CentOS and rEFIt using Bootcamp,* then made a VMware virtual machine that boots the native partition,** then installed VMware Tools**, and an NVIDIA driver.*** Problem is, now the CentOS won't boot up properly in native -- the native boot gets stuck on "Starting vmware-tools", and X just doesn't work. Everything works great when booting as a VM, though. I suppose I could run vmware-uninstall-tools and vmware-install (or whatever the install procedure command is) alternately, but that's highly inconvenient and possibly not very robust.
Does anyone have an easy way of setting up the dual native + virtual CentOS so that it boots up nicely in both? There must be a simple virtual machine detector shell command that can be put in the appropriate init files on boot and X initialization.
*See here. Make sure that you use the rEFIt option to sync the MBR and GPT partition tables before grub-install; otherwise, you'll get the /boot/grub/stage1 error.
**See . This just worked for me when I used "/Library/Application\ Support/VMware\ Fusion/vmware-rawdiskCreator create /dev/disk0 3 nativeDiskBoot ide" and "... 4 nativeDiskRoot ide" (my partition, with /dev/sda4 an LVM), then created a new VM (don't copy files!) with these two virtual disks, nativeDiskBoot and nativeDiskRoot.
***See here, here, and after setting the non-XEN kernel to be default in /boot/grub/grub.conf and "grub-install /dev/sda3".
****See here, here; run nvidia installer with "-k$(uname -r)" option.