>>sync() should work --- why do you think it does?
> Because anaconda/booty fails to install grub into a XFS partition.
> Firstly anaconda executes "grub-install --just-copy", and
> executes sync() three times. Then anaconda runs "grub --batch"
> to really install grub into MBR of the disk,
> but grub cannot find files which should have been already
> written in the partition by sync(). grub does not try to seek
> those files through filesystem, but reads the volume directly
> by its internal functions like xfs_dir().
> When I put 1 minutes of sleep() next to sync(),
> grub finds those files and is installed successfully.
> That's why I think a XFS partition needa much time to synchronize.
That's basically luck I'd say. a 5 minute delay there didn't show any
changes for me on some boxen.