[PATCH 1/5] Require that the root filesystem be created by anaconda.
David Lehman
dlehman at redhat.com
Mon Oct 29 20:30:11 UTC 2012
There is kickstart and fsprofile/mke2fs.conf for those with special
requirements for filesystem creation parameters.
---
pyanaconda/storage/__init__.py | 5 +++++
pyanaconda/ui/gui/spokes/custom.py | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 0726a1c..ff930cf 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -1605,6 +1605,11 @@ class Storage(object):
if mountpoint in mustbeonlinuxfs and (not dev.format.mountable or not dev.format.linuxNative):
errors.append(_("The mount point %s must be on a linux file system.") % mountpoint)
+ if self.rootDevice and self.rootDevice.format.exists:
+ e = self.mustFormat(self.rootDevice)
+ if e:
+ errors.append(e)
+
return (errors, warnings)
def isProtected(self, device):
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index dac54bb..a134c2a 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -959,6 +959,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
error = _("%s cannot be encrypted") % mountpoint
elif encrypted and fs_type_short in partition_only_format_types:
error = _("%s cannot be encrypted") % fs_type
+ elif mountpoint == "/" and device.format.exists and not reformat:
+ error = _("You must create a new filesystem on the root device.")
if error:
self.window.set_info(Gtk.MessageType.WARNING, error)
--
1.7.7.6
More information about the anaconda-patches
mailing list