Anaconda, grub and XFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There has been an on going issue with installing grub on an XFS partition - anaconda will hang at the installing boot loader stage as grub 'spins'.

The attached patch for 'booty' works round this problem by remounting the XFS file system that contains /boot as read-only and then as read-write before running the grub install command.

This patch replaces the current XFS freeze/thaw work round that fails to work (a lot) more often than not.

James Pearson
*** ./bootloaderInfo.py.dist	2005-05-11 16:41:51.000000000 +0100
--- ./bootloaderInfo.py	2005-10-06 16:45:11.719793730 +0100
***************
*** 54,71 ****
      isys.sync()
      isys.sync()
  
!     # and xfs is even more "special" (#117968)
      if fsset.isValidXFS(dev):
!         rhpl.executil.execWithRedirect( "/usr/sbin/xfs_freeze",
!                                         ["/usr/sbin/xfs_freeze", "-f", mntpt],
!                                         stdout = "/dev/tty5",
!                                         stderr = "/dev/tty5",
!                                         root = instRoot)
!         rhpl.executil.execWithRedirect( "/usr/sbin/xfs_freeze",
!                                         ["/usr/sbin/xfs_freeze", "-u", mntpt],
!                                         stdout = "/dev/tty5",
!                                         stderr = "/dev/tty5",
!                                         root = instRoot)    
  
  class BootyNoKernelWarning:
      def __init__ (self, value=""):
--- 54,85 ----
      isys.sync()
      isys.sync()
  
!     # for XFS make sure the data is _really_ sync'd to disk by remounting
!     # /boot first read-only and then read-write - idea from:
!     # http://marc.theaimsgroup.com/?l=linux-xfs&m=112096901910385&w=2
!     # James Pearson MPC 29-sep-2005
      if fsset.isValidXFS(dev):
!         import _isys
!         fstype = "xfs"
!         device = "/dev/%s" % dev
!         location = "%s%s" % (instRoot, mntpt)
!         readOnly = 1
!         bindMount = 0
!         remount = 1
!         log("remounting %s on %s read-only" % (device, location))
!         # remount the boot partition as read-only
!         rc = _isys.mount(fstype, device, location, readOnly, bindMount, remount)
! 
!         # if the remount fails, then we should really do something else e.g.
!         # sleep for a few minutes? - for the time being we'll just log the
!         # return
!         log("remount return: %s (None == OK)" % rc)
! 
!         # now remount as read-write
!         readOnly = 0
!         log("remounting %s on %s read-write" % (device, location))
!         rc = _isys.mount(fstype, device, location, readOnly, bindMount, remount)
!         log("remount return: %s (None == OK)" % rc)
  
  class BootyNoKernelWarning:
      def __init__ (self, value=""):

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux