Home
Does anyone have an idea on how to do this? I would like to write a script that will reboot the computer after hours, run Repairvolume on the OS drive, copy the results onto a public folder and then reboot the system normally.

Is this even possible?

Normally I would do all this with a Linux usb thumb or the OS install disks, but this time it needs to be done through scripting.

Any ideas would be helpful, including: "That's just not possible mate."

Cheers,
ph8
In most cases a volume has to be unmounted to repair it. I believe disk utility can do most repairs now live, but I still don't think I trust that completely. It still worries me seeing boot camp assistant live-repartition the boot drive. (which uses diskutility, which is the heavy lifter for Disk Utility)

Look up your options with diskutility in terminal.

Just to be picky, it's actually diskutil, which, judging by the title of the thread, ph8tel is already aware of: diskutil repairVolume device is the relevant command.

As long as you're not attempting to repair the boot volume, and assuming the volume in question can be unmounted, diskutil repairVolume unmounts it automatically, just like Disk Utility.
© FineTunedMac