Bug 504743

Summary: BUG - liveinst does not take into account drive still needs to be partitioned.
Product: [Fedora] Fedora Reporter: Traxtopel <traxtopel>
Component: anacondaAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: rmaximo, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-25 20:11:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Traxtopel 2009-06-09 06:24:42 UTC
Description of problem:

boot livecd, start liveinst, choose entire drive, or replace existing linux partitions, install will always fail with

Your / partition does not match the "
                            "the live image you are installing from.  "
                            "It must be formatted as %s."

The problem I see is that the check happens before any partitioning has actually taken place, so indeed it is wrong.
Patch should also check whether replace or entire has been selected.

Comment 1 Traxtopel 2009-06-09 06:37:06 UTC
To work around this, currently I am using. Probably wrong since ext3 vs ext4 could get mixed up. 

--- /usr/lib/anaconda/storage/__init__.py.orig	2009-06-09 08:33:54.377206015 +0200
+++ /usr/lib/anaconda/storage/__init__.py	2009-06-09 08:34:20.951206156 +0200
@@ -830,13 +830,13 @@
                             productName))
 
         # livecds have to have the rootfs type match up
-        if (root and
-            self.anaconda.backend.rootFsType and
-            root.format.type != self.anaconda.backend.rootFsType):
-            errors.append(_("Your / partition does not match the "
-                            "the live image you are installing from.  "
-                            "It must be formatted as %s.")
-                          % (self.anaconda.backend.rootFsType,))
+#        if (root and
+#            self.anaconda.backend.rootFsType and
+#            root.format.type != self.anaconda.backend.rootFsType):
+#            errors.append(_("Your / partition does not match the "
+#                            "the live image you are installing from.  "
+#                            "It must be formatted as %s.")
+#                          % (self.anaconda.backend.rootFsType,))
 
         for (mount, size) in checkSizes:
             if mount in filesystems and filesystems[mount].size < size:

Comment 2 Traxtopel 2009-06-09 07:05:17 UTC
Sorry wrong patch.
Adding the following "if not CLEARPART_TYPE_LINUX and not CLEARPART_TYPE_ALL:" seems to work for me.

--- /usr/lib/anaconda/storage/__init__.py.orig	2009-06-09 08:33:54.377206015 +0200
+++ /usr/lib/anaconda/storage/__init__.py	2009-06-09 09:03:41.922956258 +0200
@@ -830,13 +830,15 @@ class Storage(object):
                             productName))
 
         # livecds have to have the rootfs type match up
-        if (root and
-            self.anaconda.backend.rootFsType and
-            root.format.type != self.anaconda.backend.rootFsType):
-            errors.append(_("Your / partition does not match the "
-                            "the live image you are installing from.  "
-                            "It must be formatted as %s.")
-                          % (self.anaconda.backend.rootFsType,))
+	# However do not check if we are using clearpart
+	if not CLEARPART_TYPE_LINUX and not CLEARPART_TYPE_ALL:
+          if (root and
+              self.anaconda.backend.rootFsType and
+              root.format.type != self.anaconda.backend.rootFsType):
+              errors.append(_("Your / partition does not match the "
+                              "the live image you are installing from.  "
+                              "It must be formatted as %s.")
+                            % (self.anaconda.backend.rootFsType,))
 
         for (mount, size) in checkSizes:
             if mount in filesystems and filesystems[mount].size < size:

Comment 4 Jeremy Katz 2009-06-10 20:21:06 UTC
Urgh, same code block was needed in two different places for partitions vs logical volumes.  Patch sent for review

Comment 5 Jeremy Katz 2009-06-25 20:11:28 UTC
And committed