Douglas McClendon wrote:
Douglas McClendon wrote:
Hi,
Here is a patch that does away with rootfs formatting
by the livecd backend, as formatting happens again
when the live image is transferred. Only the most
rudimentary of testing has been performed.
Please review. Comments and suggestions for improvements
are very welcome. See bug 248085 for reference.
Oops. Patch is incomplete. I'll repost after a more thorough, but
still rudimentary test succeeds.
Ok, this one is much better. Or at least 'works in qemu'.
-dmc
diff -Naur anaconda.cvs.20070713/backend.py anaconda/backend.py
--- anaconda.cvs.20070713/backend.py 2007-06-26 18:58:55.000000000 +0000
+++ anaconda/backend.py 2007-07-13 09:48:53.000000000 +0000
@@ -44,6 +44,9 @@
self.supportsUpgrades = True
self.supportsPackageSelection = False
+ # some backends may have a special case for rootfs formatting
+ self.skipFormatRoot = False
+
def doPreSelection(self, intf, id, instPath):
pass
diff -Naur anaconda.cvs.20070713/fsset.py anaconda/fsset.py
--- anaconda.cvs.20070713/fsset.py 2007-07-02 19:05:21.000000000 +0000
+++ anaconda/fsset.py 2007-07-13 12:02:46.000000000 +0000
@@ -1618,7 +1618,7 @@
self.volumesCreated = 1
- def makeFilesystems (self, chroot='/'):
+ def makeFilesystems (self, chroot='/', skiprootfs=False):
formatted = []
notformatted = []
for entry in self.entries:
@@ -1626,6 +1626,9 @@
or entry.isMounted()):
notformatted.append(entry)
continue
+ if (skiprootfs and entry.mountpoint == '/'):
+ formatted.append(entry)
+ continue
try:
self.formatEntry(entry, chroot)
formatted.append(entry)
@@ -1692,13 +1695,13 @@
self.migratedfs = 1
- def mountFilesystems(self, anaconda, raiseErrors = 0, readOnly = 0):
+ def mountFilesystems(self, anaconda, raiseErrors = 0, readOnly = 0, skiprootfs = 0):
protected = anaconda.method.protectedPartitions()
for entry in self.entries:
# Don't try to mount a protected partition, since it will already
# have been mounted as the installation source.
- if not entry.fsystem.isMountable() or (protected and entry.device.getDevice() in protected):
+ if not entry.fsystem.isMountable() or (protected and entry.device.getDevice() in protected) or (skiprootfs and entry.mountpoint == '/'):
continue
try:
diff -Naur anaconda.cvs.20070713/livecd.py anaconda/livecd.py
--- anaconda.cvs.20070713/livecd.py 2007-07-02 19:05:21.000000000 +0000
+++ anaconda/livecd.py 2007-07-13 12:02:05.000000000 +0000
@@ -152,6 +152,7 @@
backend.AnacondaBackend.__init__(self, method, instPath)
self.supportsUpgrades = False
self.supportsPackageSelection = False
+ self.skipFormatRoot = True
def doPreInstall(self, anaconda):
if anaconda.dir == DISPATCH_BACK:
diff -Naur anaconda.cvs.20070713/packages.py anaconda/packages.py
--- anaconda.cvs.20070713/packages.py 2007-07-09 15:44:28.000000000 +0000
+++ anaconda/packages.py 2007-07-13 12:00:48.000000000 +0000
@@ -150,8 +150,10 @@
anaconda.id.fsset.createLogicalVolumes(anaconda.rootPath)
anaconda.id.fsset.formatSwap(anaconda.rootPath)
anaconda.id.fsset.turnOnSwap(anaconda.rootPath)
- anaconda.id.fsset.makeFilesystems (anaconda.rootPath)
- anaconda.id.fsset.mountFilesystems (anaconda)
+ anaconda.id.fsset.makeFilesystems(anaconda.rootPath,
+ anaconda.backend.skipFormatRoot)
+ anaconda.id.fsset.mountFilesystems(anaconda,0,0,
+ anaconda.backend.skipFormatRoot)
def setupTimezone(anaconda):
# we don't need this on an upgrade or going backwards