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


Groups > linux.debian.kernel > #60366 > unrolled thread

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

Started byNoah Massey <noah.massey@gmail.com>
First post2018-02-26 18:30 +0100
Last post2018-07-25 20:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.debian.kernel


Contents

  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

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

FromNoah Massey <noah.massey@gmail.com>
Date2018-02-26 18:30 +0100
SubjectBug#891560: initramfs-tools-core: mkinitramfs ignores compressed module files
Message-ID<vnuL8-1do-11@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#61579 — Bug#891560: marked as done (initramfs-tools-core: mkinitramfs ignores compressed module files)

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2018-07-25 20:30 +0200
SubjectBug#891560: marked as done (initramfs-tools-core: mkinitramfs ignores compressed module files)
Message-ID<wfwHT-m9-1@gated-at.bofh.it>
In reply to#60366

[Multipart message — attachments visible in raw view] — view raw

Your message dated Wed, 25 Jul 2018 18:04:52 +0000
with message-id <E1fiO9c-000BrQ-9x@fasolo.debian.org>
and subject line Bug#891560: fixed in initramfs-tools 0.132
has caused the Debian Bug report #891560,
regarding initramfs-tools-core: mkinitramfs ignores compressed module files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
891560: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891560
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web