Bug 1431317 - The "-k/--kmoddir" option is broken in F25 and F26
Summary: The "-k/--kmoddir" option is broken in F25 and F26
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 26
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1443760 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-11 08:06 UTC by Artem Bityutskiy
Modified: 2017-08-14 21:52 UTC (History)
6 users (show)

Fixed In Version: dracut-046-2.git20170811.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-14 21:52:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Kernel cloning/compilation script. (198 bytes, application/x-shellscript)
2017-03-11 08:06 UTC, Artem Bityutskiy
no flags Details
Build initramfs and check the modules path (437 bytes, application/x-shellscript)
2017-03-11 08:07 UTC, Artem Bityutskiy
no flags Details

Description Artem Bityutskiy 2017-03-11 08:06:36 UTC
Created attachment 1262109 [details]
Kernel cloning/compilation script.

Description of problem:
----

Dracut has regressed in F25 comparing to F24. What worked in F24 does not work in F25. Namely, the -k/--kmoddir option does not work correctly anymore.


Version-Release number of selected component (if applicable):
----

dracut version: 044-78.fc25


How reproducible:
----

Always.


Steps to Reproduce:
----

1. Clone and compile a linux kernel, for example v4.10.

git clone ~/git/linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
git reset --hard v4.10
make defconfig
make -j modules
cd ..

2. Install kernel modules to a local subdirectory.

make -C linux INSTALL_MOD_PATH="$PWD/modules" modules_install

3. Let's check where we are and what we got.
$ pwd
/home/abityuts/tmp/dracut-bug/dracut-bug
$ ls
linux  modules

4. Build the dependencies for the modules we just installed.
depmod -b modules/ 4.10.0

5. Create initramfs with the modules we just installed.
dracut --force --no-hostonly --local --kver 4.10.0 -k modules/lib/modules/4.10.0/ -- initramfs.img


Actual results:
---

The resulting initramfs.img contains the modules in incorrect place - in "home/abityuts" instead of "/usr/lib".

$ lsinitrd initramfs.img | grep \.ko
-rw-rw-r--   1 root     root        13600 Nov  7 11:59 home/abityuts/tmp/dracut-bug/dracut-bug/modules/lib/modules/4.10.0/kernel/fs/efivarfs/efivarfs.ko


Expected results:
---

Modules are placed to "/usr/lib/modules" within the initramfs image, not in "/home/abiyuts".


Additional info:

This is the same problem as reported in
https://github.com/dracutdevs/dracut/issues/194

There is a fix, but it was not propagated to F25.

Please, port the fix to F25.

Thank you!

Attached a couple of scripts which automate the task of reproducing the problem.

Comment 1 Artem Bityutskiy 2017-03-11 08:07:23 UTC
Created attachment 1262110 [details]
Build initramfs and check the modules path

Comment 2 Harald Hoyer 2017-05-18 14:04:10 UTC
*** Bug 1443760 has been marked as a duplicate of this bug. ***

Comment 3 Artem Bityutskiy 2017-07-29 05:01:11 UTC
Hi, this was ignored so far, even though what needs to be done is applying a patch, so supposedly not huge deal of work. This problem is now in F26. Is there something I can do to get this at least to F27?

Can the maintainer at least add a comment if this will be fixed in F27?

Comment 4 Artem Bityutskiy 2017-08-04 08:49:39 UTC
Hi,

sorry for not being patient enough, but could someone from the dracut maintainers team please comment on this problem? There is the fix:

https://github.com/dracutdevs/dracut/issues/194

it has been in the dracut git tree for quite a while, but it did not hit F26. Questions:

1. Could it please be possible to promote it to F26?
2. If not, will it be in F27?
3. If not, why not?

Thanks a lot!

Comment 5 Fedora Update System 2017-08-11 12:27:39 UTC
dracut-046-2.git20170811.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3c6d1e757b

Comment 6 Fedora Update System 2017-08-13 04:05:59 UTC
dracut-046-2.git20170811.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3c6d1e757b

Comment 7 Fedora Update System 2017-08-14 21:52:41 UTC
dracut-046-2.git20170811.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.