Here is an updated xfs_freeze.diff It is the same as the previous version, except the output of --help is a little better. -- 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
--- grub-install 2005-04-25 11:47:21.000000000 -0600 +++ grub-install 2005-04-29 10:01:11.978324529 -0600 @@ -40,6 +40,7 @@ no_floppy= force_lba= recheck=no +sync_sleep=20 debug=no # look for secure tempfile creation wrappers on this platform @@ -70,6 +71,8 @@ --force-lba force GRUB to use LBA mode even for a buggy BIOS --recheck probe a device map even if it already exists + --sync-sleep=SECONDS number of seconds to sleep while trying to + sync XFS INSTALL_DEVICE can be a GRUB device name or a system device filename. @@ -81,6 +84,20 @@ 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 () { + sync + if which xfs_freeze >/dev/null ; then + echo "Trying to sync filesystem, do not interrupt until complete." + xfs_freeze -f ${grubdir} 2>/dev/null + sleep $sync_sleep + xfs_freeze -u ${grubdir} 2>/dev/null + echo "Trying to sync filesystem is complete." + fi +} + # Usage: convert os_device # Convert an OS device to the corresponding GRUB drive. # This part is OS-specific. @@ -247,6 +264,8 @@ force_lba="--force-lba" ;; --recheck) recheck=yes ;; + --sync-sleep=*) + sync_sleep=`echo "$option" | sed 's/--sync-sleep=//'` ;; # This is an undocumented feature... --debug) debug=yes ;; @@ -336,6 +355,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 @@ -414,6 +434,7 @@ ${pkglibdir}/stage1 ${pkglibdir}/stage2 ${pkglibdir}/*stage1_5; do cp -f $file ${grubdir} || exit 1 done +xfs_hack # Make a default file. ${grub_set_default} --root-directory=${rootdir} default @@ -451,6 +472,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