From 39f74eecd85f269c03dd2c909a25cbc37c8ad158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 19 Oct 2018 08:02:13 +0200 Subject: [PATCH] anaconda: use proper subvolume argument when booting from btrfs (EFI) 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 --- pyanaconda/bootloader.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index 6965d6ae202d..d3ef2205098d 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -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))