Spotlight not working after imaging (Target mode)

steventhemacman
New Contributor III

Hi,

Imaging just fine, but Spotlight does not work after imaging. I am really new and am not sure how to write a script to fix this issue. I found another forum where they said to write a script containing:

rm /.metadata_never_index
rm /.fseventsd/no_log

Or another containing:

sudo rm -i .metadata_never_index

sudo mdutil -E -a -i on

I am not sure what the difference is, moreover I do not know how to create a script (really, but I am learning slowly). I see someone asking the same thing in the other post, but no one answered. I know it is probably simple, but the help would be appreciated. Also, once I make a script, I can put it in the image configuration I assume.

Thanks!

5 REPLIES 5

steventhemacman
New Contributor III

Oh, one more thing, I did try to make a script, and it kind of works, but it makes the imaging process hang at the (Casper is finishing imaging) window. If I shut the machine off it will finish up. If I delete the script it does not seem to do it (get stuck). What is funny is that it does fix the spotlight issue, just makes it a pain for imaging right now.

Matt
Valued Contributor
#!/bin/sh

# Spotlight Fix

rm /.metadata_never_index
rm /.fseventsd/no_log

steventhemacman
New Contributor III

Thanks! I will give it a try, I was not to far off on the script making, pretty simple. I thought maybe I was missing something. Quick question, set as "after reboot"?

Matt
Valued Contributor

Yeah "At Reboot"

hkim
Contributor II
rm /.metadata_never_index rm /.fseventsd/no_log

That basically removes the offending files that prevents Spotlight for indexing the volume. This should be run as root.

sudo mdutil -E -a -i on

Erases Spotlight database and then turns on Spotlight for all volumes.