I've recently installed Windows on an external USB drive (after modifying the Windows install CD). This works great, except that everytime I connected the external drive to OS X Spotlight would traverse the entire NTFS partition to index it. The traversal would take about 10 minutes during which I could not unmount the drive.
I needed to find a way to prevent Spotlight from indexing this drive since I don't need to search into my Windows installation.
At first I tried preventing the NTFS partition from mounting at all. This made sense since the external drive also has a small FAT32 partition for sharing data between Windows and OS X. Using an entry in the /etc/fstab I was able to prevent the NTFS partition from mounting without any difficulty. The drawback with this approach was that the Startup Disk preference panel would not see the Windows installation since the partition wasn't being mounted.
The Startup Disk preference panel drawback is significant because with Windows installed onto an external drive the only way I have found to boot into Windows is to set the Startup Disk using the preference panel. (And to set the Startup Disk back to OS X using the Startup Disk control panel.) The key combination on boot to boot from an external drive does not trigger a boot into windows as far as I can tell.
After reversing the fstab entry I found a second approach that prevents Spotlight from indexing the NTFS drive while still mounting the partition thus allowing the Startup Disk preference panel to see the partition.
The solution is to create a .Spotlight-V100 file on the NTFS partition so that Spotlight thinks it has already indexed the partition but cannot write to the index (since OS X cannot write to an NTFS filesystem). The result is that Spotlight aborts the index creation. The tricky part is that OS X cannot write to NTFS partitions and Windows refuses to let you create a file or directory if the name starts with a '.' character.
Instead, you can create an empty file in OS X with the correct name then zip up the file and transfer it to a Windows machine (or reboot into Windows) and then unzip the archive into the root of the NTFS partition.
You can use TextEdit to create an empty file in OS X and then archive the file using the finder, or you can open the Terminal and use the following commands to create the zip file:
Copy the zip file to somewhere that you can access from Windows. Boot into Windows and unzip the zip file into the top level of your NTFS partition. Next time you boot into OS X Spotlight will not index the NTFS partition.
I needed to find a way to prevent Spotlight from indexing this drive since I don't need to search into my Windows installation.
At first I tried preventing the NTFS partition from mounting at all. This made sense since the external drive also has a small FAT32 partition for sharing data between Windows and OS X. Using an entry in the /etc/fstab I was able to prevent the NTFS partition from mounting without any difficulty. The drawback with this approach was that the Startup Disk preference panel would not see the Windows installation since the partition wasn't being mounted.
The Startup Disk preference panel drawback is significant because with Windows installed onto an external drive the only way I have found to boot into Windows is to set the Startup Disk using the preference panel. (And to set the Startup Disk back to OS X using the Startup Disk control panel.) The key combination on boot to boot from an external drive does not trigger a boot into windows as far as I can tell.
After reversing the fstab entry I found a second approach that prevents Spotlight from indexing the NTFS drive while still mounting the partition thus allowing the Startup Disk preference panel to see the partition.
The solution is to create a .Spotlight-V100 file on the NTFS partition so that Spotlight thinks it has already indexed the partition but cannot write to the index (since OS X cannot write to an NTFS filesystem). The result is that Spotlight aborts the index creation. The tricky part is that OS X cannot write to NTFS partitions and Windows refuses to let you create a file or directory if the name starts with a '.' character.
Instead, you can create an empty file in OS X with the correct name then zip up the file and transfer it to a Windows machine (or reboot into Windows) and then unzip the archive into the root of the NTFS partition.
You can use TextEdit to create an empty file in OS X and then archive the file using the finder, or you can open the Terminal and use the following commands to create the zip file:
Code:
cd ~/Desktop
touch .Spotlight-V100
zip spotlight.zip .Spotlight-V100
rm .Spotlight-V100
Copy the zip file to somewhere that you can access from Windows. Boot into Windows and unzip the zip file into the top level of your NTFS partition. Next time you boot into OS X Spotlight will not index the NTFS partition.