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]

 



Of course, the commented 3 lines will be removed from the patch.

----- Original Message -----
> If there is no separate /boot partition, treat the
> root partition as the /boot partition, because that's
> where /boot will end up.
> ---
>  storage/partitioning.py |   20 +++++++++++++++++++-
>  1 files changed, 19 insertions(+), 1 deletions(-)
> 
> diff --git a/storage/partitioning.py b/storage/partitioning.py
> index 0484eb5..41172e2 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,23 @@ 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 = "/"
> +
> +        #_mountpoints = [getattr(part.format, "mountpoint", "") for
> part in new_partitions]
> +        #if "/boot" not in _mountpoints:
> +        #    _boot_part = "/"
> +
>      for _part in new_partitions:
>          if _part.partedPartition and _part.isExtended:
>              # ignore new extendeds as they are implicit requests
> @@ -1188,7 +1206,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.startswith(_boot_part)):
>                  # if this is a bootable partition we want to
>                  # use the first freespace region large enough
>                  # to satisfy the request
> --
> 1.7.5.4
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 

_______________________________________________
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