Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/config_files_proto' into jreidin…
Browse files Browse the repository at this point in the history
…ger_config_files_proto
  • Loading branch information
jreidinger committed Apr 7, 2016
2 parents cb6b61b + 8d8f843 commit 4ba8923
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/lib/bootloader/grub2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def propose
super

stage1.propose
# for GPT remove protective MBR flag otherwise some systems won't
# boot, safer option for legacy booting
self.pmbr_action = :remove if Yast::BootStorage.gpt_boot_disk?
# for GPT add protective MBR flag otherwise some systems won't
# boot, safer option for legacy booting (bnc#872054)
self.pmbr_action = :add if Yast::BootStorage.gpt_boot_disk?
device_map.propose if Yast::Arch.x86_64 || Yast::Arch.i386
end

Expand Down
4 changes: 2 additions & 2 deletions src/lib/bootloader/grub2efi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def write
def propose
super

# for UEFI always set PMBR flag on disk (bnc#872054)
self.pmbr_action = :add
# for UEFI always remove PMBR flag on disk (bnc#872054)
self.pmbr_action = :remove

@secure_boot = true
end
Expand Down
4 changes: 2 additions & 2 deletions test/grub2_efi_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
allow(Yast::BootStorage).to receive(:detect_disks)
end

it "proposes to add pmbr flag for disk" do
it "proposes to remove pmbr flag for disk" do
subject.propose

expect(subject.pmbr_action).to eq :add
expect(subject.pmbr_action).to eq :remove
end

it "proposes to use secure boot" do
Expand Down
4 changes: 2 additions & 2 deletions test/grub2_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@
subject.propose
end

it "propose to remove pmbr flag if boot disk is with gpt label" do
it "propose to add pmbr flag if boot disk is with gpt label" do
allow(Yast::BootStorage).to receive(:gpt_boot_disk?).and_return(true)

subject.propose

expect(subject.pmbr_action).to eq :remove
expect(subject.pmbr_action).to eq :add
end

it "propose to do not change pmbr flag if boot disk is not with gpt label" do
Expand Down

0 comments on commit 4ba8923

Please sign in to comment.