How exactly can i achieve this ?
Do i have to kind of safe boot the osx partition to prevent that the system writes to the os9 partition while i do the necessary terminal commands to hide the partition for the next time?
Can you provide some guide please?
No no no no! You are completely overthinking it!
Actually, it's ridiculously simple. You have to first repair the damage and then stop the process causing it. To wit:
1. Boot OSX.
2. Open System Prefs.
3. Select Spotlight / Privacy. You'll see a list form "Prevent Spotlight from searching these locations".
4. Drag your OS9 volume icon onto the list.
5. Go to Time Machine Prefs. Click "Options"…you'll get the same kind of drop-down form called "Do not back up".
6. Drag your OS9 volume icon onto the list.
NOW: You can erase your b-tree-corrupted OS9 volume and then restore it from backup (which you of course,
have, right?) BUT
You
cannot just restore the entire volume
whole because
it probably also contains a corrupted header… SO
7. Boot OS9 from CD (either your own or MacTron's Rescue CD is perfect) and reinstall OS9.
8. Restore your OS9
files from your backup
folder by folder.
9. You're done.
Yes, it's THAT simple. Just never, never again allow those pref settings to get changed back. If you upgrade OSX or add another version of OSX to the computer, IMMEDIATELY go to all OSX prefs and confirm that OS9 is locked out.
You'll find that you can still "see" all the OS9 files from OSX so you can open them, copy them etc. You just can't search them by / for keywords and such with Spotlight and of course, you'll have to backup OS9 with something other than Time Machine - which is fine because Time Machine won't make a useable OS9 restoration anyway. (It usually messes up all of the file permissions and you can't write to them or even move them afterward when you're back in OS9)
Now, enjoy your happily dual-booting Mac!