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
pull/21/head
Marek Marczykowski-Górecki 6 years ago
parent 7dbbe7c5c4
commit fbc011f01c
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -1887,12 +1887,15 @@ class XenEFI(EFIGRUB):
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))

Loading…
Cancel
Save