Class: Bootloader::Stage1
- Inherits:
-
Object
- Object
- Bootloader::Stage1
- Includes:
- Yast::Logger
- Defined in:
- src/lib/bootloader/stage1.rb
Overview
it should replace all BootCommon.globals and also “activate” and “generic_mbr” which is related to stage1 code
Represents where is bootloader stage1 installed. Allows also proposing its location.
Instance Method Summary (collapse)
-
- (Stage1) initialize
constructor
A new instance of Stage1.
-
- (Object) propose
Propose and set Stage1 location.
Constructor Details
- (Stage1) initialize
Returns a new instance of Stage1
11 12 13 14 15 16 17 |
# File 'src/lib/bootloader/stage1.rb', line 11 def initialize Yast.import "Arch" Yast.import "BootCommon" Yast.import "BootStorage" Yast.import "Kernel" Yast.import "Storage" end |
Instance Method Details
- (Object) propose
Propose and set Stage1 location. It sets properly all “boot_*” entries in globals. It also sets if partition should be activated by setting its boot flag (in globals key “activate”). It proposes if generic_mbr will be written into MBR (globals key “generic_mbr”). And last but not least it propose if protective MBR flag need to be removed The proposal is only based on storage information, disregarding any existing values of the output variables (which are respected at other times, in AutoYaST).
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'src/lib/bootloader/stage1.rb', line 27 def propose result = case Yast::Arch.architecture when "i386", "x86_64" propose_x86 when /ppc/ propose_ppc when /s390/ propose_s390 else raise "unsuported architecture #{Yast::Arch.architecture}" end log.info "location configured. Resulting globals #{Yast::BootCommon.globals}" result end |