Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #60366

Bug#891560: initramfs-tools-core: mkinitramfs ignores compressed module files

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Noah Massey <noah.massey@gmail.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#891560: initramfs-tools-core: mkinitramfs ignores compressed module files
Date Mon, 26 Feb 2018 18:30:02 +0100
Message-ID <vnuL8-1do-11@gated-at.bofh.it> (permalink)
X-Original-To Debian Bug Tracking System <submit@bugs.debian.org>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Mon Feb 26 17:27:14 2018
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -2.808
Reply-To Noah Massey <noah.massey@gmail.com>, 891560@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc noah.massey@gmail.com, Debian kernel team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message report 891560
X-Debian-Pr-Package initramfs-tools-core
X-Debian-Pr-Keywords patch
X-Debian-Pr-Source initramfs-tools
X-Spam-Bayes score:0.0000 Tokens: new, 55; hammy, 150; neutral, 107; spammy, 0. spammytokens: hammytokens:0.000-+--UD:xz, 0.000-+--H*M:reportbug, 0.000-+--H*MI:reportbug, 0.000-+--H*x:reportbug, 0.000-+--H*UA:reportbug
Content-Type text/plain; charset="us-ascii"
MIME-Version 1.0
Content-Transfer-Encoding 7bit
X-Mailer reportbug 7.1.8
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1444259
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 92
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Mon, 26 Feb 2018 12:24:42 -0500
X-Original-Message-ID <151966588239.9939.11386998344763070859.reportbug@sec14.sep.net>
Xref csiph.com linux.debian.bugs.dist:884135 linux.debian.kernel:60366

Cross-posted to 2 groups.

Show key headers only | View raw


Package: initramfs-tools-core
Version: 0.130
Severity: normal
Tags: patch

Dear Maintainer,

Linux 3.18.0 comes with native support for xz compressed modules.
kmod/25-1 adds support for xz compressed modules. Compression allows me
to build custom kernels with much smaller FS impact, so I've been trying
it out.

I built and installed kernel from source (4.14.21, 4.15.5) with XZ
module compression.

$ make menuconfig
     # Enable CONFIG_MODULE_COMPRESS
     # Enable CONFIG_MODULE_COMPRESS_XZ
$ make
$ make modules_install
$ make install

However, after rebooting throug grub the kernel loads the initramfs, but
initramfs fails to find the root filesystem. Examining contents of
the generated /boot/initrd.img*, compared to an uncompressed build, many
modules and /lib/firmware/* are absent.

I was able to generate working initrd.img* files with the following
patch:

==========>8==========
--- /usr/share/initramfs-tools/hook-functions~	2018-02-23 10:57:27.622691989 -0500
+++ /usr/share/initramfs-tools/hook-functions	2018-02-23 11:57:55.792649031 -0500
@@ -212,12 +212,15 @@
 		fi
 	fi
 	while [ $# -ge 1 ]; do
-		exclude="${exclude:-} -name $1 -prune -o "
+		exclude="${exclude:-} -name $1 -prune -o -name $1.xz -prune -o "
 		shift
 	done
 	for kmod in $(find "${MODULESDIR}/${dir}" ${exclude:-} -name '*.ko' -printf '%f\n'); do
 		modules="$modules ${kmod%.ko}"
 	done
+	for kmod in $(find "${MODULESDIR}/${dir}" ${exclude:-} -name '*.ko.xz' -printf '%f\n'); do
+		modules="$modules ${kmod%.ko.xz}"
+	done
 	manual_add_modules $modules
 }

@@ -313,6 +316,9 @@
 			*/$pattern.ko)
 				manual_add_modules $(basename $module .ko)
 				;;
+			*/$pattern.ko.xz)
+				manual_add_modules $(basename $module .ko.xz)
+				;;
 			esac
 		done < $builtin
 	fi

==========>8==========
There may be more elegant solutions.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 4.14.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages initramfs-tools-core depends on:
ii  cpio         2.12+dfsg-6
ii  klibc-utils  2.0.4-11
ii  kmod         25-1
ii  udev         237-3

Versions of packages initramfs-tools-core recommends:
ii  busybox  1:1.27.2-2

Versions of packages initramfs-tools-core suggests:
ii  bash-completion  1:2.1-4.3

-- Configuration Files:
/etc/initramfs-tools/initramfs.conf unchanged [not included]
(BUSYBOX=y)

-- no debconf information

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Bug#891560: initramfs-tools-core: mkinitramfs ignores compressed module files Noah Massey <noah.massey@gmail.com> - 2018-02-26 18:30 +0100
  Bug#891560: marked as done (initramfs-tools-core: mkinitramfs  ignores compressed module files) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2018-07-25 20:30 +0200

csiph-web