Re: [rhel6-branch] Make sure /boot is on the same disk as prepboot (#727136)

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

 



On Fri, 2012-03-02 at 16:05 +0100, Martin Gracik wrote:
> If there is no separate /boot partition, treat the
> root partition as the /boot partition, because that's
> where /boot will end up.

Ack.

> ---
>  storage/partitioning.py |   16 +++++++++++++++-
>  1 files changed, 15 insertions(+), 1 deletions(-)
> 
> diff --git a/storage/partitioning.py b/storage/partitioning.py
> index 0484eb5..46418a2 100644
> --- a/storage/partitioning.py
> +++ b/storage/partitioning.py
> @@ -28,6 +28,7 @@ import parted
>  from pykickstart.constants import *
>  
>  from constants import *
> +import platform
>  
>  from errors import *
>  from deviceaction import *
> @@ -996,6 +997,19 @@ def allocatePartitions(storage, disks, partitions, freespace):
>  
>      removeNewPartitions(disks, new_partitions)
>  
> +    # Search for the /boot partition.
> +    # If there is not a separate /boot partition,
> +    # the /boot will end up on the / partition.
> +    # We need this later for apple's bootstrap and prepboot,
> +    # because this partition needs to be on the same disk
> +    # as bootstrap/prepboot partition.
> +    # Only do this on systems that need it.
> +    _boot_part = "/boot"
> +    pl = platform.getPlatform(None)
> +    if pl.weight(fstype="prepboot") or pl.weight(fstype="appleboot"):
> +        if "/boot" not in storage.mountpoints and "/" in storage.mountpoints:
> +            _boot_part = "/"
> +
>      for _part in new_partitions:
>          if _part.partedPartition and _part.isExtended:
>              # ignore new extendeds as they are implicit requests
> @@ -1188,7 +1202,7 @@ def allocatePartitions(storage, disks, partitions, freespace):
>              if not mountpoint:
>                  mountpoint = ""
>  
> -            if free and (_part.req_bootable or mountpoint.startswith("/boot")):
> +            if free and (_part.req_bootable or mountpoint == _boot_part):
>                  # if this is a bootable partition we want to
>                  # use the first freespace region large enough
>                  # to satisfy the request


_______________________________________________
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