Comments (7)
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.
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:
- Specify no_kernel
- Set DRACUT_KERNEL_MODALIASES to point to an empty file (the file must exist!)
from dracut.
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.
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.
@martinmcclure I'll keep it open
from dracut.
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.
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)
- Dracut wrong password even it's right + libgcc_s.so.1 must be installed HOT 3
- Discovery with authentication fails to boot
- Gpu passthrough hanging on pre-udev hook HOT 1
- NetworkManager applies DHCP address to dracut-initrd interface with a DHCP address HOT 1
- fw_cfg support for qemu module
- Specify UKI output path in dracut.conf
- network-legacy gen-rules.sh failes due to missing initqueue/finished directory HOT 1
- error: unable to write to pipe (Broken pipe) HOT 3
- dracut fails to work if installed in /usr/local
- "rd.*" Is Ignored When "debug" Or "SYSTEMD_LOG_LEVEL=debug" Is Used As Well HOT 2
- detect and generate initrd.img-${kernel}
- Request to repair the error of qemu nbd in the switch_root process HOT 5
- RFC: review if '.early' postfix for ucode is still required
- dracut uses wrong version description for Unified Kernel Images HOT 5
- network-legacy module dropped from Fedora 40 package HOT 8
- systemd will dlopen libraries that used to be statically included
- RFE: new version?🤔 HOT 3
- rd.live.overlay.overlayfs=1 is broken on Fedora 39 LiveOS HOT 4
- Support bcachefs encrypted root unlocking
- [REPO DEAD] This repo is dead HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dracut.