Sorry, but I realized after reading ... http://lists.debian.org/debian-boot/2004/06/msg02301.html
... that what I was doing was a little overkill. Here is a better approach. I've tested it both on ext3 (to ensure I haven't broken something when xfs_freeze exists, but the filesystem is not xfs), and xfs. Here is xfs_freeze.diff, suitable for replacing xfs_freeze.diff that is in debian/patches of the source package. -- Encrypted Mail Preferred: Key ID: 8527B9AF Key Fingerprint: E1B6 40B6 B73F 695E 0D3B 644E 6427 DD74 8527 B9AF Information: http://www.gnupg.org/ ASCII ribbon campaign: () against HTML email /\ against Microsoft attachments Information: http://www.expita.com/nomime.html
--- svn.old/util/grub-install.in 2005-04-25 11:47:21.563643409 -0600 +++ svn/util/grub-install.in 2005-04-25 11:51:26.828576206 -0600 @@ -81,6 +81,17 @@ EOF } +# Usage: xfs_hack +# Routine to flush xfs filesystem log (sync doesn't do this) +# sleep is needed to give time for the log to be flushed +xfs_hack () { + if which xfs_freeze >/dev/null ; then + xfs_freeze -f ${grubdir} 2>/dev/null + sleep 1 + xfs_freeze -u ${grubdir} 2>/dev/null + fi +} + # Usage: convert os_device # Convert an OS device to the corresponding GRUB drive. # This part is OS-specific. @@ -336,6 +347,7 @@ # Create a safe temporary file. test -n "$mklog" && log_file=`$mklog` + xfs_hack $grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file quit EOF @@ -426,6 +438,7 @@ count=5 tmp=`echo $file | sed "s|^${grubdir}|${grub_prefix}|"` while test $count -gt 0; do + xfs_hack $grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file dump ${root_drive}${tmp} ${img_file} quit @@ -451,6 +464,7 @@ test -n "$mklog" && log_file=`$mklog` # Now perform the installation. +xfs_hack $grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file root $root_drive setup $force_lba --stage2=$grubdir/stage2 --prefix=$grub_prefix $install_drive
signature.asc
Description: Digital signature