Class: Bootloader::Stage1Proposal::PPC

Inherits:
Bootloader::Stage1Proposal show all
Defined in:
src/lib/bootloader/stage1_proposal.rb

Overview

ppc64le specific stage1 proposal

Constant Summary

Constants inherited from Bootloader::Stage1Proposal

AVAILABLE_PROPOSALS

Instance Attribute Summary

Attributes inherited from Bootloader::Stage1Proposal

#stage1

Instance Method Summary collapse

Methods inherited from Bootloader::Stage1Proposal

#assign_bootloader_device, #initialize, propose

Constructor Details

This class inherits a constructor from Bootloader::Stage1Proposal

Instance Method Details

#proposeObject



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'src/lib/bootloader/stage1_proposal.rb', line 157

def propose
  partition = proposed_prep_partition
  if partition
    # ensure that stage1 device is in udev (bsc#1041692)
    udev_partition = UdevMapping.to_mountby_device(partition.name)
    assign_bootloader_device([:custom, udev_partition])

    # do not activate on gpt disks see (bnc#983194)
    stage1.activate = !partition.partitionable.gpt?
    stage1.generic_mbr = false
  # handle diskless setup, in such case do not write boot code anywhere
  # (bnc#874466)
  # we need to detect what is mount on /boot and if it is nfs, then just
  # skip this proposal. In other case if it is not nfs, then it is error
  # and raise exception.
  # powernv do not have prep partition, so we do not have any partition
  # to activate (bnc#970582)
  elsif Yast::BootStorage.boot_filesystem.is?(:nfs) ||
      Yast::Arch.board_powernv
    stage1.activate = false
    stage1.generic_mbr = false
    nil
  else
    raise "there is no prep partition"
  end
end