From 56d90eedfb7adba94c8ecc138ba300c9d92f65d1 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 18 Oct 2021 16:11:20 -0700 Subject: [PATCH] Backport PR #1584 to fix missing block drivers, boot in EC2 (#2010058) --- ...es-add-blk_mq_alloc_disk-and-blk_cle.patch | 28 +++++++++++++++++++ dracut.spec | 9 +++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-fix-kernel-modules-add-blk_mq_alloc_disk-and-blk_cle.patch diff --git a/0001-fix-kernel-modules-add-blk_mq_alloc_disk-and-blk_cle.patch b/0001-fix-kernel-modules-add-blk_mq_alloc_disk-and-blk_cle.patch new file mode 100644 index 0000000..cd9eb4e --- /dev/null +++ b/0001-fix-kernel-modules-add-blk_mq_alloc_disk-and-blk_cle.patch @@ -0,0 +1,28 @@ +From b292ce7295f18192124e64e5ec31161d09492160 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 12 Aug 2021 11:46:35 +0200 +Subject: [PATCH] fix(kernel-modules): add blk_mq_alloc_disk and + blk_cleanup_disk to blockfuncs + +Since kernel 5-14 those are used by many drivers for example: +xen-blkfront, loop, nbd, pd +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 8b06893a..69dc18b5 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -2,7 +2,7 @@ + + # called by dracut + installkernel() { +- local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma' ++ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma|blk_mq_alloc_disk|blk_cleanup_disk' + local -A _hostonly_drvs + + find_kernel_modules_external() { +-- +2.33.0 + diff --git a/dracut.spec b/dracut.spec index 3710efa..453839a 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 4 +%define dist_free_release 5 Name: dracut Version: 055 @@ -46,6 +46,10 @@ Patch2: 0001-fix-network-manager-pull-in-network.target-in-nm-ini.patch Patch3: 0001-fix-network-manager-don-t-pull-in-systemd-udev-settl.patch # https://github.com/dracutdevs/dracut/pull/1616/ Patch4: 0001-fix-90kernel-modules-add-Type-C-USB-drivers-for-gene.patch +# Adds more block functions to ensure all needed block drivers are included +# https://bugzilla.redhat.com/show_bug.cgi?id=2010058 +# https://github.com/dracutdevs/dracut/pull/1584 +Patch5: 0001-fix-kernel-modules-add-blk_mq_alloc_disk-and-blk_cle.patch BuildRequires: bash BuildRequires: git-core @@ -499,6 +503,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Mon Oct 18 2021 Adam Williamson - 055-5 +- Backport PR #1584 to fix missing block drivers, boot in EC2 (#2010058) + * Wed Oct 06 2021 Peter Robinson - 055-4 - Add USB Type-C to fix display/input/storage attached via it (rhbz #1964218)