Bug 2211583
| Summary: | dracut generates initramfs for non-existing kernels | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Renaud Métrich <rmetrich> |
| Component: | dracut | Assignee: | dracut-maint-list |
| Status: | CLOSED MIGRATED | QA Contact: | qe-baseos-daemons |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.8 | CC: | prjagtap |
| Target Milestone: | rc | Keywords: | MigratedToJIRA |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-09-20 23:25:41 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Renaud Métrich
2023-06-01 06:31:25 UTC
It's unclear when the kernel removal leaves files behind, it looks like it's due to some 3rd party script executing. Anyway, for the hardening of dracut, please find below an example of listing making dracut generate a dumb initramfs "polluting" /boot: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # ll /lib/modules/4.18.0-193.el8.x86_64 total 24 drwxrwxrwx. 3 1002 1012 21 May 21 2022 kernel -rw-rw-rw-. 1 1002 1012 45 May 19 08:54 modules.alias -rw-rw-rw-. 1 1002 1012 12 May 19 08:54 modules.alias.bin -rw-rw-rw-. 1 1002 1012 0 May 19 08:54 modules.builtin.bin -rw-rw-rw-. 1 1002 1012 0 May 19 08:54 modules.dep -rw-rw-rw-. 1 1002 1012 12 May 19 08:54 modules.dep.bin -rw-rw-rw-. 1 1002 1012 0 May 19 08:54 modules.devname -rw-rw-rw-. 1 1002 1012 55 May 19 08:54 modules.softdep -rw-rw-rw-. 1 1002 1012 49 May 19 08:54 modules.symbols -rw-rw-rw-. 1 1002 1012 12 May 19 08:54 modules.symbols.bin -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Here above all non-binary files are "empty" or just contain comments: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # cat modules.alias modules.softdep modules.symbols # Aliases extracted from modules themselves. # Soft dependencies extracted from modules themselves. # Aliases for symbols, used by symbol_request(). -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- This leads to generating a large but useless initramfs: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # dracut /tmp/test.img 4.18.0-193.el8.x86_64 depmod: WARNING: could not open /var/tmp/dracut.YTEvX1/initramfs/lib/modules/4.18.0-193.el8.x86_64/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/dracut.YTEvX1/initramfs/lib/modules/4.18.0-193.el8.x86_64/modules.builtin: No such file or directory Warning no default label for /tmp/test.img # ll /tmp/test.img -rw-------. 1 root root 25489249 Aug 7 17:49 /tmp/test.img -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug. This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there. Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information. To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like: "Bugzilla Bug" = 1234567 In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information. |