Permalink
Browse files

anaconda: don't force non-encrypted /boot on coreboot systems

With grub payload it is possible to have all the partitions encrypted.

Based on patch by @tlaurion

Fixes QubesOS/qubes-issues#2118
  • Loading branch information...
marmarek committed Jul 14, 2016
1 parent d8fab04 commit 147941657f7892089d8b7b4bcf61de3dad9ef8bd
Showing with 12 additions and 6 deletions.
  1. +1 −0 anaconda/anaconda.spec
  2. +11 −6 anaconda/pyanaconda/bootloader.py
@@ -130,6 +130,7 @@ Requires: hfsplus-tools
%endif
%endif
Requires: python3-pid
Requires: dmidecode

Requires: python3-coverage

@@ -46,6 +46,8 @@
from pyanaconda.orderedset import OrderedSet

import logging
import subprocess

log = logging.getLogger("anaconda")

class serial_opts(object):
@@ -1412,16 +1414,19 @@ class GRUB2(GRUB):
raid.RAID5, raid.RAID6, raid.RAID10]
stage2_raid_metadata = ["0", "0.90", "1.0", "1.2"]

@property
def stage2_format_types(self):
if productName.startswith("Red Hat "):
return ["xfs", "ext4", "ext3", "ext2", "btrfs"]
else:
return ["ext4", "ext3", "ext2", "btrfs", "xfs"]
stage2_format_types = ["ext4", "ext3", "ext2", "btrfs", "xfs"]

def __init__(self):
super(GRUB2, self).__init__()

if subprocess.check_output(
['dmidecode', '-s', 'bios-vendor'],
universal_newlines=True) == "coreboot\n":
log.info("dmidecode -s bios-vendor returns coreboot")
self.encryption_support = True
self.skip_bootloader = True
self.stage2_format_types += ["lvmlv"]

# XXX we probably need special handling for raid stage1 w/ gpt disklabel
# since it's unlikely there'll be a bios boot partition on each disk

0 comments on commit 1479416

Please sign in to comment.