Re: [master] Don't skip biosboot request if no stage1_drive has been chosen.

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

 



On Tue, 2011-09-06 at 14:02 +0200, Ales Kozumplik wrote:
> Otherwise bootloader.stage1_device() later will not detect any suitable
> devices because it will find we're using a GPT disk with no biosboot
> partitions. That fails sanityCheck().

This looks right to me in that _gpt_disk_has_bios_boot only returns
False if the passed-in device is indeed a gpt-labeled disk with no bios
boot partition, so it would return True in this case when passed None.

However, I wonder if there's a case where there's no boot disk but there
is a bios boot partition on the disk that will end up as the boot disk.
We don't want to double up in that case. I wonder if we should just
simplify it down like has been done for the other ones, ie:

  if request.fstype == "bioboot" and storage.bootLoaderDevice:
      # log it, then...
      continue

Dave

> 
> Resolves: rhbz#734861
> ---
>  pyanaconda/storage/partitioning.py |   27 ++++++++++++++-------------
>  1 files changed, 14 insertions(+), 13 deletions(-)
> 
> diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
> index 237e55e..601fa58 100644
> --- a/pyanaconda/storage/partitioning.py
> +++ b/pyanaconda/storage/partitioning.py
> @@ -134,19 +134,20 @@ def _schedulePartitions(storage, disks):
>              continue
>          elif request.fstype == "biosboot" and storage.anaconda:
>              boot_disk = storage.anaconda.bootloader.stage1_drive
> -            if boot_disk and boot_disk.format.labelType != "gpt":
> -                # biosboot is only needed for gpt disklabels on non-efi x86
> -                log.info("skipping bios boot request for msdos disklabel")
> -                log.debug(request)
> -                continue
> +            if boot_disk:
> +                if boot_disk.format.labelType != "gpt":
> +                    # biosboot is only needed for gpt disklabels on non-efi x86
> +                    log.info("skipping bios boot request for msdos disklabel")
> +                    log.debug(request)
> +                    continue
>  
> -            gpt_check = getattr(storage.anaconda.bootloader,
> -                                "_gpt_disk_has_bios_boot",
> -                                None)
> -            if gpt_check and gpt_check(boot_disk):
> -                # there's already a bios boot partition on the gpt boot disk
> -                log.info("skipping bios boot request since boot disk has one")
> -                continue
> +                gpt_check = getattr(storage.anaconda.bootloader,
> +                                    "_gpt_disk_has_bios_boot",
> +                                    None)
> +                if gpt_check and gpt_check(boot_disk):
> +                    # there's already a bios boot partition on the gpt boot disk
> +                    log.info("skipping bios boot request since boot disk has one")
> +                    continue
>  
>          # This is a little unfortunate but let the backend dictate the rootfstype
>          # so that things like live installs can do the right thing


_______________________________________________
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