It appears that Lenovo systems aren't the only ones that have problems
booting from GPT labeled disks. This patch does the following:
* default to msdos labeled disks
* remove the GPT blacklist
* remove nogpt cmdline argument
* add gpt cmdline argument to force use of GPT disklabel
---
pyanaconda/flags.py | 6 +++---
pyanaconda/platform.py | 20 ++++----------------
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 5728ef2..f7dd431 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -67,7 +67,7 @@ class Flags(object):
# do things like bogl on them. this preserves what that
# device is
self.virtpconsole = None
- self.nogpt = False
+ self.gpt = False
# parse the boot commandline
self.cmdline = BootArgs()
# Lock it down: no more creating new flags!
@@ -85,8 +85,8 @@ class Flags(object):
if not selinux.is_selinux_enabled():
self.selinux = 0
- if "nogpt" in self.cmdline:
- self.nogpt = True
+ if "gpt" in self.cmdline:
+ self.gpt = True
cmdline_files = ['/proc/cmdline', '/run/initramfs/etc/cmdline',
'/run/initramfs/etc/cmdline.d/*.conf', '/etc/cmdline']
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 869e567..5fbb676 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -70,9 +70,10 @@ class Platform(object):
all the methods in this class."""
self.anaconda = anaconda
- if flags.nogpt and "gpt" in self._disklabel_types and
- len(self._disklabel_types) > 1:
+ if flags.gpt and "gpt" in self._disklabel_types:
+ # move GPT to the top of the list
self._disklabel_types.remove("gpt")
+ self._disklabel_types.insert(0, "gpt")
- _disklabel_types = ["gpt", "msdos"]
+ _disklabel_types = ["msdos", "gpt"]
# XXX hpfs, if reported by blkid/udev, will end up with a type of None
_non_linux_format_types = ["vfat", "ntfs", "hpfs"]
def setDefaultPartitioning(self):
"""Return the default platform-specific partitioning information."""
@@ -184,18 +184,6 @@ class X86(Platform):
else:
return 0
- def blackListGPT(self):
- """ Remove GPT disk label as an option on systems where their BIOS
- doesn't boot from GPT labeled disks.
-
- Currently this includes: Lenovo
- """
- if not os.path.isfile(DMI_CHASSIS_VENDOR):
- return
- buf = open(DMI_CHASSIS_VENDOR).read()
- if "LENOVO" in buf.splitlines() and "gpt" in self._disklabel_types:
- self._disklabel_types.remove("gpt")
-
class EFI(Platform):
_bootloaderClass = bootloader.EFIGRUB
--
1.7.7.6
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-26-2012, 11:49 PM
David Lehman
default to msdos disk labels (#816701)
On Thu, 2012-04-26 at 16:40 -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl@redhat.com>
>
> It appears that Lenovo systems aren't the only ones that have problems
> booting from GPT labeled disks. This patch does the following:
> * default to msdos labeled disks
> * remove the GPT blacklist
> * remove nogpt cmdline argument
> * add gpt cmdline argument to force use of GPT disklabel
Looks good to me.
> ---
> pyanaconda/flags.py | 6 +++---
> pyanaconda/platform.py | 20 ++++----------------
> 2 files changed, 7 insertions(+), 19 deletions(-)
>
> diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
> index 5728ef2..f7dd431 100644
> --- a/pyanaconda/flags.py
> +++ b/pyanaconda/flags.py
> @@ -67,7 +67,7 @@ class Flags(object):
> # do things like bogl on them. this preserves what that
> # device is
> self.virtpconsole = None
> - self.nogpt = False
> + self.gpt = False
> # parse the boot commandline
> self.cmdline = BootArgs()
> # Lock it down: no more creating new flags!
> @@ -85,8 +85,8 @@ class Flags(object):
> if not selinux.is_selinux_enabled():
> self.selinux = 0
>
> - if "nogpt" in self.cmdline:
> - self.nogpt = True
> + if "gpt" in self.cmdline:
> + self.gpt = True
>
> cmdline_files = ['/proc/cmdline', '/run/initramfs/etc/cmdline',
> '/run/initramfs/etc/cmdline.d/*.conf', '/etc/cmdline']
> diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
> index 869e567..5fbb676 100644
> --- a/pyanaconda/platform.py
> +++ b/pyanaconda/platform.py
> @@ -70,9 +70,10 @@ class Platform(object):
> all the methods in this class."""
> self.anaconda = anaconda
>
> - if flags.nogpt and "gpt" in self._disklabel_types and
> - len(self._disklabel_types) > 1:
> + if flags.gpt and "gpt" in self._disklabel_types:
> + # move GPT to the top of the list
> self._disklabel_types.remove("gpt")
> + self._disklabel_types.insert(0, "gpt")
>
> @property
> def diskLabelTypes(self):
> @@ -159,13 +160,12 @@ class X86(Platform):
> "mdarray": Platform._boot_raid_description}
>
>
> - _disklabel_types = ["gpt", "msdos"]
> + _disklabel_types = ["msdos", "gpt"]
> # XXX hpfs, if reported by blkid/udev, will end up with a type of None
> _non_linux_format_types = ["vfat", "ntfs", "hpfs"]
>
> def __init__(self, anaconda):
> super(X86, self).__init__(anaconda)
> - self.blackListGPT()
>
> def setDefaultPartitioning(self):
> """Return the default platform-specific partitioning information."""
> @@ -184,18 +184,6 @@ class X86(Platform):
> else:
> return 0
>
> - def blackListGPT(self):
> - """ Remove GPT disk label as an option on systems where their BIOS
> - doesn't boot from GPT labeled disks.
> -
> - Currently this includes: Lenovo
> - """
> - if not os.path.isfile(DMI_CHASSIS_VENDOR):
> - return
> - buf = open(DMI_CHASSIS_VENDOR).read()
> - if "LENOVO" in buf.splitlines() and "gpt" in self._disklabel_types:
> - self._disklabel_types.remove("gpt")
> -
> class EFI(Platform):
> _bootloaderClass = bootloader.EFIGRUB
>
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-27-2012, 01:57 PM
Chris Lumens
default to msdos disk labels (#816701)
> It appears that Lenovo systems aren't the only ones that have problems
> booting from GPT labeled disks. This patch does the following:
> * default to msdos labeled disks
> * remove the GPT blacklist
> * remove nogpt cmdline argument
> * add gpt cmdline argument to force use of GPT disklabel
We're going to need to spread the word about this pretty widely, I
think.
- Chris
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-27-2012, 03:32 PM
Chris Murphy
default to msdos disk labels (#816701)
On Apr 27, 2012, at 7:57 AM, Chris Lumens wrote:
>> It appears that Lenovo systems aren't the only ones that have problems
>> booting from GPT labeled disks. This patch does the following:
>> * default to msdos labeled disks
>> * remove the GPT blacklist
>> * remove nogpt cmdline argument
>> * add gpt cmdline argument to force use of GPT disklabel
>
> We're going to need to spread the word about this pretty widely, I
> think.
Yeah I was gonna ask on devel for a reality check, to make sure what that list sounds like is actually what will happen. Return default to MBR for BIOS systems, remove 'nogpt', to get GPT on BIOS use 'gpt' to force. What about BIOS systems with target disks > 2.2TB? Will that trigger GPT, or do we get a MBR disk maxed out to 2.2TB unless using the force option?
Chris Murphy
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-27-2012, 04:14 PM
David Lehman
default to msdos disk labels (#816701)
On Fri, 2012-04-27 at 09:32 -0600, Chris Murphy wrote:
> On Apr 27, 2012, at 7:57 AM, Chris Lumens wrote:
>
> >> It appears that Lenovo systems aren't the only ones that have problems
> >> booting from GPT labeled disks. This patch does the following:
> >> * default to msdos labeled disks
> >> * remove the GPT blacklist
> >> * remove nogpt cmdline argument
> >> * add gpt cmdline argument to force use of GPT disklabel
> >
> > We're going to need to spread the word about this pretty widely, I
> > think.
>
> Yeah I was gonna ask on devel for a reality check, to make sure what that list sounds like is actually what will happen. Return default to MBR for BIOS systems, remove 'nogpt', to get GPT on BIOS use 'gpt' to force. What about BIOS systems with target disks > 2.2TB? Will that trigger GPT, or do we get a MBR disk maxed out to 2.2TB unless using the force option?
You should still get gpt for large disks.
Dave
>
> Chris Murphy
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-28-2012, 08:02 AM
Chris Murphy
default to msdos disk labels (#816701)
On Apr 27, 2012, at 10:14 AM, David Lehman wrote:
>>
>> Yeah I was gonna ask on devel for a reality check, to make sure what that list sounds like is actually what will happen. Return default to MBR for BIOS systems, remove 'nogpt', to get GPT on BIOS use 'gpt' to force. What about BIOS systems with target disks > 2.2TB? Will that trigger GPT, or do we get a MBR disk maxed out to 2.2TB unless using the force option?
>
> You should still get gpt for large disks.
OK. It doesn't appear to have landed in TC2, I still get GPT for BIOS system with an 800G disk.
Chris Murphy
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list