Re: [f17-branch master] default to msdos disk labels (#816701)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-04-26 at 16:40 -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux