summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-07-29 11:04:04 -0400
committerChris Lumens <clumens@redhat.com>2008-07-29 11:04:04 -0400
commit2cb7a37a1e027f304607744b477cfa333968b731 (patch)
treec42bfadce641d98c00fea2744f4bfd1108e3316f
parent468a1881b686b5c828714d07185f369faf5c8878 (diff)
downloadanaconda-2cb7a37a1e027f304607744b477cfa333968b731.tar.gz
anaconda-2cb7a37a1e027f304607744b477cfa333968b731.tar.xz
anaconda-2cb7a37a1e027f304607744b477cfa333968b731.zip
Use attributes to tell us whether filesystems are bootable (#457037).
-rw-r--r--fsset.py11
-rw-r--r--partitions.py8
2 files changed, 13 insertions, 6 deletions
diff --git a/fsset.py b/fsset.py
index a2a0562aa..6d2f9f788 100644
--- a/fsset.py
+++ b/fsset.py
@@ -194,6 +194,10 @@ class FileSystemType:
self.supportsFsProfiles = False
self.fsProfileSpecifier = None
self.fsprofile = None
+ self.bootable = False
+
+ def isBootable(self):
+ return self.bootable
def isResizable(self):
return self.resizable
@@ -364,6 +368,7 @@ class reiserfsFileSystem(FileSystemType):
self.formattable = 1
self.checked = 1
self.linuxnativefs = 1
+ self.bootable = True
# this is totally, 100% unsupported. Boot with "linux reiserfs"
# at the boot: prompt will let you make new reiserfs filesystems
# in the installer. Bugs filed when you use this will be closed
@@ -458,6 +463,7 @@ class jfsFileSystem(FileSystemType):
self.checked = 1
self.linuxnativefs = 1
self.maxLabelChars = 16
+ self.bootable = True
# this is totally, 100% unsupported. Boot with "linux jfs"
# at the boot: prompt will let you make new reiserfs filesystems
# in the installer. Bugs filed when you use this will be closed
@@ -541,6 +547,7 @@ class extFileSystem(FileSystemType):
self.supportsFsProfiles = True
self.fsProfileSpecifier = "-T"
self.resizable = True
+ self.bootable = True
def resize(self, entry, size, progress, chroot='/'):
devicePath = entry.device.setupDevice(chroot)
@@ -759,6 +766,7 @@ class ext4FileSystem(extFileSystem):
self.partedFileSystemType = parted.file_system_type_get("ext3")
# 256-byte inodes are actually default now, but let's be sure.
self.extraFormatArgs = [ "-j", "-I", "256", "-E", "test_fs" ]
+ self.bootable = False
# this is way way experimental at present...
if flags.cmdline.has_key("ext4"):
@@ -986,6 +994,7 @@ class EFIFileSystem(FATFileSystem):
self.partedPartitionFlags = [ parted.PARTITION_BOOT ]
self.maxSizeMB = 256
self.defaultOptions = "umask=0077,shortname=winnt"
+ self.bootable = True
if not iutil.isEfi():
self.supported = 0
@@ -1104,6 +1113,7 @@ class applebootstrapFileSystem(hfsFileSystem):
self.partedPartitionFlags = [ parted.PARTITION_BOOT ]
self.maxSizeMB = 1
self.name = "Apple Bootstrap"
+ self.bootable = True
if iutil.getPPCMacGen() == "NewWorld":
self.linuxnativefs = 1
self.supported = 1
@@ -1121,6 +1131,7 @@ class prepbootFileSystem(FileSystemType):
self.checked = 0
self.name = "PPC PReP Boot"
self.maxSizeMB = 10
+ self.bootable = True
if iutil.getPPCMachine() == "iSeries":
self.maxSizeMB = 64
diff --git a/partitions.py b/partitions.py
index 785a85d59..8b20bed41 100644
--- a/partitions.py
+++ b/partitions.py
@@ -1246,10 +1246,8 @@ class Partitions:
errors.append(_("Bootable partitions cannot be on a RAID "
"device."))
- # XFS causes problems as /boot. see #138673 and others
- # gfs2 and ext4 aren't supported by grub
- if (bootreq.fstype and
- bootreq.fstype.getName() in ("xfs", "gfs2", "ext4")):
+ # Lots of filesystems types don't support /boot.
+ if (bootreq.fstype and not bootreq.fstype.isBootable()):
errors.append(_("Bootable partitions cannot be on an %s "
"filesystem.")%(bootreq.fstype.getName(),))
@@ -1263,8 +1261,6 @@ class Partitions:
errors.append(_("Bootable partitions cannot be on an "
"encrypted block device"))
-
-
if foundSwap == 0:
warnings.append(_("You have not specified a swap partition. "
"Although not strictly required in all cases, "