Class: Bootloader::Stage1Proposal::X64

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

Overview

x86_64 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



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'src/lib/bootloader/stage1_proposal.rb', line 75

def propose
  selected_location = propose_boot_location
  log.info "propose_x86 (#{selected_location})"

  # set active flag, if needed
  if selected_location == :mbr
    # We are installing into MBR:
    # If there is an active partition, then we do not need to activate
    # one (otherwise we do).
    # Reason: if we use our own MBR code, we do not rely on the activate
    # flag in the partition table to boot Linux. Thus, the activated
    # partition can remain activated, which causes less problems with
    # other installed OSes like Windows (older versions assign the C:
    # drive letter to the activated partition).
    used_disks = mbr_disks
    stage1.activate = used_disks.none? { |d| any_boot_flag_partition?(d) }
    stage1.generic_mbr = false
  else
    # if not installing to MBR, always activate (so the generic MBR will
    # boot Linux)
    stage1.activate = true
    stage1.generic_mbr = true
  end
end