Skip to content

Commit

Permalink
anaconda: use proper subvolume argument when booting from btrfs (EFI)
Browse files Browse the repository at this point in the history
Kernel command line in legacy mode is constructed by grub scripts and
properly handle btrfs subvolumes. For EFI, it is built directly by
anaconda and 'rootflags=subvol=...' argument need to be added manually.

Fixes QubesOS/qubes-issues#1871
  • Loading branch information
marmarek authored and fepitre committed Dec 28, 2018
1 parent 00aa7be commit cd72c43
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyanaconda/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1973,12 +1973,15 @@ def write_config_header(self, config):

def write_config_images(self, config):
for image in self.images:
root_args = 'root=' + image.device.fstab_spec
if image.device.type == "btrfs subvolume":
root_args += " rootflags=subvol=%s" % image.device.name
config.write("\n")
config.write("[{}]\n".format(image.version))
config.write("options=loglvl=all dom0_mem=min:1024M dom0_mem=max:4096M iommu=no-igfx\n")
config.write("kernel={} root={} {}\n".format(
config.write("kernel={} {} {}\n".format(
image.kernel,
image.device.fstab_spec,
root_args,
self.boot_args))
config.write("ramdisk={}\n".format(image.initrd))

Expand Down

0 comments on commit cd72c43

Please sign in to comment.