Git Product home page Git Product logo

Comments (7)

marmarek avatar marmarek commented on May 19, 2024

FWIW, the same problem happens when /proc is not mounted at all (for example in some build chroot environment). Workaround of touch /proc/modules in that case works.

from dracut.

martinmcclure avatar martinmcclure commented on May 19, 2024

I ran into this issue, since I am building kernels for certain machines without loadable module support. In hostonly mode, Dracut 049 gives the message:

libkmod: kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
dracut-install: Could not get list of loaded modules: Unknown error -2. Switching to non-hostonly mode.

I would prefer the behavior to be that if in hostonly mode and /proc/modules does not exist, Dracut will not attempt to include any modules (and probably log a message about skipping modules due to absence of /proc/modules), but will stay in hostonly mode.

There is a workaround, but it's non-obvious and rather ugly. You have to both:

  1. Specify no_kernel
  2. Set DRACUT_KERNEL_MODALIASES to point to an empty file (the file must exist!)

from dracut.

johannbg avatar johannbg commented on May 19, 2024

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

from dracut.

martinmcclure avatar martinmcclure commented on May 19, 2024

This problem still reproduces in the latest Dracut (5da7038). Please keep this issue open if there is any chance of it ever being fixed.

from dracut.

johannbg avatar johannbg commented on May 19, 2024

@martinmcclure I'll keep it open

from dracut.

stale avatar stale commented on May 19, 2024

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

from dracut.

AJ-Ianozi avatar AJ-Ianozi commented on May 19, 2024

This may be the same issue or related, but I built my kernel without any modules and tried running dracut v 053:

dracut --hostonly --kver 5.15.1-gentoo -f /boot/initramfs-5.15.1-gentoo.img
dracut: Cannot find module directory /lib/modules/5.15.1-gentoo/
dracut: and --no-kernel was not specified

My /lib/modules/ contains

/lib/modules/
├── build -> /usr/src/linux-5.15.1-gentoo
├── kernel
├── modules.order
└── source -> /usr/src/linux-5.15.1-gentoo

The workaround is creating a blank directory, /lib/modules/5.15.1-gentoo, and the command works.

from dracut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.