pax_global_header00006660000000000000000000000064147472733510014527gustar00rootroot0000000000000052 comment=956c08774074ddc45b2f975e13d5c13d1fc36eff dracut-ng-dracut-ng-3e4cfdd/000077500000000000000000000000001474727335100160535ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/.astylerc000066400000000000000000000002231474727335100176770ustar00rootroot00000000000000lineend=linux style=linux indent=spaces=8 convert-tabs min-conditional-indent=0 max-instatement-indent=120 align-pointer=name max-code-length=120 dracut-ng-dracut-ng-3e4cfdd/.dir-locals.el000066400000000000000000000021761474727335100205120ustar00rootroot00000000000000; Directory Local Variables ; For more information see (info "(emacs) Directory Variables") ; Sets emacs variables based on mode. ; A list of (major-mode . ((var1 . value1) (var2 . value2))) ; Mode can be nil, which gives default values. ; Characters width is set to 109 for .c and XML but for everything else 79. ; If you update this file make sure to update .vimrc and .editorconfig too. ((c-mode . ((fill-column . 109) (c-basic-offset . 8) (eval . (c-set-offset 'substatement-open 0)) (eval . (c-set-offset 'statement-case-open 0)) (eval . (c-set-offset 'case-label 0)) (eval . (c-set-offset 'arglist-intro '++)) (eval . (c-set-offset 'arglist-close 0)) (eval . (c-set-offset 'arglist-cont-nonempty '(c-lineup-gcc-asm-reg c-lineup-arglist))))) (nxml-mode . ((nxml-child-indent . 2) (fill-column . 109))) (meson-mode . ((meson-indent-basic . 8))) (sh-mode . ((sh-basic-offset . 4) (sh-indentation . 4))) (awk-mode . ((c-basic-offset . 8))) (nil . ((indent-tabs-mode . nil) (tab-width . 4) (fill-column . 79))) ) dracut-ng-dracut-ng-3e4cfdd/.editorconfig000066400000000000000000000016461474727335100205370ustar00rootroot00000000000000# EditorConfig configuration for dracut # http://EditorConfig.org # If you update this file make sure to update .dir-locals.el and .vimrc too. # Top-most EditorConfig file root = true # Unix-style newlines with a newline ending every file, utf-8 charset [*] end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true charset = utf-8 indent_style = space indent_size = 4 switch_case_indent = true function_next_line = false binary_next_line = true space_redirects = true # Match config files, set indent to spaces with width of eight. [*.{c,h}] indent_style = space indent_size = 8 # Match config files, set indent to spaces with width of four. [*.sh] indent_style = space indent_size = 4 switch_case_indent = true function_next_line = false binary_next_line = true space_redirects = true # Match xml man pages, set indent to spaces with width of two. [man/*.xml] indent_style = space indent_size = 2 dracut-ng-dracut-ng-3e4cfdd/.github/000077500000000000000000000000001474727335100174135ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/.github/CODEOWNERS000066400000000000000000000005071474727335100210100ustar00rootroot00000000000000# This is a comment. # Each line is a file pattern followed by one or more owners. # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, # @global-owner1 and @global-owner2 will be requested for # review when someone opens a pull request. * @dracut-ng/committers dracut-ng-dracut-ng-3e4cfdd/.github/ISSUE_TEMPLATE/000077500000000000000000000000001474727335100215765ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000011251474727335100242670ustar00rootroot00000000000000--- name: "\U0001F41B Bug report" about: A report of an error in a recent Dracut version labels: 'bug' --- **Describe the bug** A clear and concise description of what the error is. **Distribution used** Which distribution was this behaviour seen in? **Dracut version** Which dracut version was this behaviour seen in? **Init system** Which init system is being used? **To Reproduce** Steps or code to reproduce the behavior. **Expected behavior** A clear and concise description of what you expected to happen. **Additional context** Add any other context you like about the problem here. dracut-ng-dracut-ng-3e4cfdd/.github/ISSUE_TEMPLATE/documentation.md000066400000000000000000000003341474727335100247710ustar00rootroot00000000000000--- name: "\U0001F4D6 Documentation" about: Suggest an improvement for documentation in Dracut labels: 'documents' --- **Describe the documentation** A clear and concise description of what should be better documented. dracut-ng-dracut-ng-3e4cfdd/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000003411474727335100253210ustar00rootroot00000000000000--- name: "\U00002728 Feature Request" about: A request for enhancement in Dracut labels: 'enhancement' --- **Describe the enhancement** A clear and concise description of what the enhancement is that you would like to see. dracut-ng-dracut-ng-3e4cfdd/.github/dependabot.yml000066400000000000000000000004571474727335100222510ustar00rootroot00000000000000--- version: 2 # Maintain dependencies for GitHub Actions updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" day: "tuesday" commit-message: prefix: "chore" include: "scope" ignore: - dependency-name: "Manual test" dracut-ng-dracut-ng-3e4cfdd/.github/labeler.yml000066400000000000000000000333651474727335100215560ustar00rootroot00000000000000--- repository: - changed-files: - any-glob-to-any-file: './*' github: - changed-files: - any-glob-to-any-file: ['.github/*', '.github/**/*'] docs: - changed-files: - any-glob-to-any-file: - antora-playbook.yaml - README.* - man/* - doc_site/* - doc_site/**/* - doc_site/**/**/* - doc_site/**/**/**/* - doc_site/**/**/**/**/* man: - changed-files: - any-glob-to-any-file: 'man/*' kernel-install: - changed-files: - any-glob-to-any-file: 'install.d/*' shell-completion: - changed-files: - any-glob-to-any-file: ['shell-completion/*', 'shell-completion/**/*'] dracut-cpio: - changed-files: - any-glob-to-any-file: ['src/dracut-cpio/*', 'src/dracut-cpio/**/*'] dracut-install: - changed-files: - any-glob-to-any-file: 'src/install/*' dracut-util: - changed-files: - any-glob-to-any-file: 'src/util/*' skipcpio: - changed-files: - any-glob-to-any-file: 'src/skipcpio/*' c: - changed-files: - any-glob-to-any-file: 'src/**/*.c' modules: - changed-files: - any-glob-to-any-file: ['modules.d/*', 'modules.d/**/*'] bash: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]bash/*' dash: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dash/*' systemd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd/*' warpclock: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]warpclock/*' fips: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]fips/*' fips-crypto-policies: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]fips-crypto-policies/*' systemd-battery-check: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-battery-check/*' systemd-ac-power: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-ac-power/*' systemd-ask-password: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-ask-password/*' systemd-bsod: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-bsod/*' systemd-coredump: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-coredump/*' systemd-creds: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-creds/*' systemd-hostnamed: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-hostnamed/*' systemd-initrd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-initrd/*' systemd-integritysetup: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-integritysetup/*' systemd-journald: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-journald/*' systemd-ldconfig: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-ldconfig/*' systemd-modules-load: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-modules-load/*' systemd-networkd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-networkd/*' systemd-network-management: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-network-management/*' systemd-pcrphase: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-pcrphase/*' systemd-portabled: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-portabled/*' systemd-pstore: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-pstore/*' systemd-repart: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-repart/*' systemd-resolved: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-resolved/*' systemd-sysctl: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-sysctl/*' systemd-sysext: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-sysext/*' systemd-sysusers: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-sysusers/*' systemd-timedated: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-timedated/*' systemd-timesyncd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-timesyncd/*' systemd-tmpfiles: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-tmpfiles/*' systemd-udevd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-udevd/*' systemd-veritysetup: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-veritysetup/*' systemd-emergency: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-emergency/*' caps: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]caps/*' modsign: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]modsign/*' rescue: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]rescue/*' watchdog: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]watchdog/*' watchdog-modules: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]watchdog-modules/*' busybox: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]busybox/*' dbus-broker: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dbus-broker/*' dbus-daemon: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dbus-daemon/*' rngd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]rngd/*' dbus: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dbus/*' i18n: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]i18n/*' convertfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]convertfs/*' connman: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]connman/*' network-legacy: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]network-legacy/*' network-manager: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]network-manager/*' network: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]network/*' url-lib: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]url-lib/*' drm: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]drm/*' plymouth: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]plymouth/*' bluetooth: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]bluetooth/*' cms: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]cms/*' lvmmerge: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]lvmmerge/*' lvmthinpool-monitor: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]lvmthinpool-monitor/*' cio_ignore: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]cio_ignore/*' btrfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]btrfs/*' crypt: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]crypt/*' dm: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dm/*' dmraid: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dmraid/*' dmsquash-live: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dmsquash-live/*' dmsquash-live-autooverlay: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dmsquash-live-autooverlay/*' dmsquash-live-ntfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dmsquash-live-ntfs/*' kernel-modules: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]kernel-modules/*' kernel-modules-extra: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]kernel-modules-extra/*' kernel-network-modules: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]kernel-network-modules/*' livenet: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]livenet/*' lvm: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]lvm/*' mdraid: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]mdraid/*' multipath: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]multipath/*' numlock: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]numlock/*' nvdimm: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]nvdimm/*' overlayfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]overlayfs/*' ppcmac: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]ppcmac/*' qemu: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]qemu/*' qemu-net: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]qemu-net/*' systemd-cryptsetup: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]systemd-cryptsetup/*' crypt-gpg: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]crypt-gpg/*' crypt-loop: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]crypt-loop/*' fido2: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]fido2/*' pcsc: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]pcsc/*' pkcs11: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]pkcs11/*' tpm2-tss: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]tpm2-tss/*' zipl: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]zipl/*' cifs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]cifs/*' dasd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dasd/*' dasd_mod: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dasd_mod/*' dcssblk: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dcssblk/*' debug: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]debug/*' fcoe: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]fcoe/*' fcoe-uefi: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]fcoe-uefi/*' fstab-sys: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]fstab-sys/*' hwdb: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]hwdb/*' iscsi: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]iscsi/*' lunmask: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]lunmask/*' nbd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]nbd/*' nfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]nfs/*' nvmf: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]nvmf/*' resume: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]resume/*' rootfs-block: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]rootfs-block/*' ssh-client: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]ssh-client/*' terminfo: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]terminfo/*' udev-rules: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]udev-rules/*' virtfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]virtfs/*' virtiofs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]virtiofs/*' zfcp: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]zfcp/*' znet: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]znet/*' securityfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]securityfs/*' biosdevname: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]biosdevname/*' masterkey: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]masterkey/*' dracut-systemd: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]dracut-systemd/*' ecryptfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]ecryptfs/*' integrity: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]integrity/*' pollcdrom: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]pollcdrom/*' selinux: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]selinux/*' syslog: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]syslog/*' usrmount: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]usrmount/*' base: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]base/*' fs-lib: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]fs-lib/*' img-lib: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]img-lib/*' memstrack: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]memstrack/*' shutdown: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]shutdown/*' squash: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]squash/*' squash-lib: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]squash-lib/*' squash-erofs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]squash/*' squash-squashfs: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]squash/*' uefi-lib: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]uefi-lib/*' net-lib: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]net-lib/*' pcmcia: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]pcmcia/*' shell-interpreter: - changed-files: - any-glob-to-any-file: 'modules.d/[0-9][0-9]shell-interpreter/*' test: - changed-files: - any-glob-to-any-file: ['test/*', 'test/**/*'] dracut-ng-dracut-ng-3e4cfdd/.github/pull_request_template.md000066400000000000000000000003201474727335100243470ustar00rootroot00000000000000This pull request changes... ## Changes ## Checklist - [ ] I have tested it locally - [ ] I have reviewed and updated any documentation if relevant - [ ] I am providing new code and test(s) for it Fixes # dracut-ng-dracut-ng-3e4cfdd/.github/stale.yml000066400000000000000000000016221474727335100212470ustar00rootroot00000000000000--- # Number of days of inactivity before an issue becomes stale daysUntilStale: 30 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 # Ignore if in a milestone exemptMilestones: true # Issues with these labels will never be considered stale exemptLabels: - documents - enhancement - regression - wiki - bug # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > 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. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false dracut-ng-dracut-ng-3e4cfdd/.github/workflows/000077500000000000000000000000001474727335100214505ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/.github/workflows/codeql.yml000066400000000000000000000023231474727335100234420ustar00rootroot00000000000000--- # vi: ts=2 sw=2 et: # SPDX-License-Identifier: LGPL-2.1-or-later # name: "CodeQL" on: # yamllint disable-line rule:truthy push: branches: - main paths: - 'src/**' pull_request: branches: - main paths: - 'src/**' permissions: contents: read jobs: analyze: name: Analyze runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }} cancel-in-progress: true permissions: actions: read security-events: write strategy: fail-fast: false matrix: language: ['cpp', 'python'] steps: - name: Checkout repository uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} queries: +security-extended,security-and-quality - name: Install dependencies run: | sudo apt-get -y update sudo apt-get -y install asciidoc gcc libkmod-dev libsystemd-dev pkg-config - name: Autobuild uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 dracut-ng-dracut-ng-3e4cfdd/.github/workflows/container-extra.yml000066400000000000000000000072361474727335100253060ustar00rootroot00000000000000--- # Containers that takes longer to build or mainline, development, non-stable # version of CI containers name: Container (extra) on: # yamllint disable-line rule:truthy schedule: - cron: '30 11 * * *' # every day at 11:30 UTC push: branches: [main] paths: - 'test/container/**' - '.github/workflows/container-extra.yml' pull_request: branches: [main] paths: - 'test/container/**' - '.github/workflows/container-extra.yml' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: permissions: packages: write contents: read jobs: amd64: if: github.repository == 'dracut-ng/dracut-ng' || vars.CONTAINER == 'enabled' name: ${{ matrix.config.tag }} on ${{ matrix.architecture.platform }} runs-on: ${{ matrix.architecture.runner }} concurrency: group: amd64-${{ github.workflow }}-${{ github.ref }}-${{ matrix.config.tag }}-${{ matrix.architecture.platform }} cancel-in-progress: true strategy: fail-fast: false matrix: architecture: - {platform: 'linux/amd64', runner: 'ubuntu-24.04', tag: 'amd'} - {platform: 'linux/arm64', runner: 'ubuntu-24.04-arm', tag: 'arm'} config: - {dockerfile: 'Dockerfile-debian', tag: 'debian:sid'} - {dockerfile: 'Dockerfile-debian', tag: 'ubuntu:devel'} - {dockerfile: 'Dockerfile-debian', tag: 'ubuntu:rolling'} - {dockerfile: 'Dockerfile-alpine', tag: 'alpine:edge'} - {dockerfile: 'Dockerfile-gentoo', tag: 'gentoo:latest', option: 'systemd'} - {dockerfile: 'Dockerfile-gentoo', tag: 'gentoo:amd64-openrc', option: 'amd64-openrc'} - {dockerfile: 'Dockerfile-fedora', tag: 'fedora:rawhide', registry: 'registry.fedoraproject.org'} - {dockerfile: 'Dockerfile-fedora', tag: 'centos:stream10-development', registry: 'quay.io/centos'} exclude: - config: {tag: 'alpine:edge'} architecture: {platform: 'linux/arm64'} - config: {tag: 'arch:latest'} architecture: {platform: 'linux/arm64'} - config: {tag: 'gentoo:amd64-openrc'} architecture: {platform: 'linux/arm64'} steps: - name: Check out the repo uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up env run: echo "repository_owner=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV} - name: Build and Push Container uses: docker/build-push-action@v6 with: file: test/container/${{ matrix.config.dockerfile }} tags: ghcr.io/${{env.repository_owner}}/${{ matrix.config.tag }}-${{ matrix.architecture.tag }} push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} platforms: ${{ matrix.architecture.platform }} build-args: | DISTRIBUTION=${{ matrix.config.tag }} REGISTRY=${{ matrix.config.registry }} OPTION=${{ matrix.config.option }} dracut-ng-dracut-ng-3e4cfdd/.github/workflows/container.yml000066400000000000000000000060121474727335100241540ustar00rootroot00000000000000--- name: Container on: # yamllint disable-line rule:truthy schedule: - cron: '30 11 * * *' # every day at 11:30 UTC push: branches: [main] paths: - 'test/container/**' - '.github/workflows/container.yml' pull_request: branches: [main] paths: - 'test/container/**' - '.github/workflows/container.yml' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: permissions: packages: write contents: read jobs: amd64: if: github.repository == 'dracut-ng/dracut-ng' || vars.CONTAINER == 'enabled' name: ${{ matrix.config.tag }} on ${{ matrix.architecture.platform }} concurrency: group: amd64-${{ github.workflow }}-${{ github.ref }}-${{ matrix.config.tag }}-${{ matrix.architecture.platform }} cancel-in-progress: true strategy: fail-fast: false matrix: architecture: - {platform: 'linux/amd64', runner: 'ubuntu-24.04', tag: 'amd'} - {platform: 'linux/arm64', runner: 'ubuntu-24.04-arm', tag: 'arm'} config: - {dockerfile: 'Dockerfile-debian', tag: 'debian:latest'} - {dockerfile: 'Dockerfile-fedora', tag: 'fedora:latest'} - {dockerfile: 'Dockerfile-opensuse', tag: 'opensuse:latest'} - {dockerfile: 'Dockerfile-arch', tag: 'arch:latest'} - {dockerfile: 'Dockerfile-debian', tag: 'ubuntu:latest'} - {dockerfile: 'Dockerfile-alpine', tag: 'alpine:latest'} - {dockerfile: 'Dockerfile-void', tag: 'void:latest'} exclude: - config: {tag: 'alpine:latest'} architecture: {platform: 'linux/arm64'} - config: {tag: 'arch:latest'} architecture: {platform: 'linux/arm64'} runs-on: ${{ matrix.architecture.runner }} steps: - name: Check out the repo uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up env run: echo "repository_owner=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV} - name: Build and Push Container uses: docker/build-push-action@v6 with: file: test/container/${{ matrix.config.dockerfile }} tags: ghcr.io/${{env.repository_owner}}/${{ matrix.config.tag }}-${{ matrix.architecture.tag }} push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} platforms: ${{ matrix.architecture.platform }} dracut-ng-dracut-ng-3e4cfdd/.github/workflows/doc.yml000066400000000000000000000021571474727335100227450ustar00rootroot00000000000000--- name: Doc Test on: # yamllint disable-line rule:truthy pull_request: branches: [main] paths: - 'man/**' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: doc: name: doc on ${{ matrix.container }} runs-on: ubuntu-latest timeout-minutes: 10 concurrency: group: doc-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - alpine - arch - debian - fedora - gentoo - opensuse - ubuntu - void container: image: ghcr.io/dracut-ng/${{ matrix.container }} steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: doc on "${{ matrix.container }}" run: TARGETS=all enable_documentation=yes ./test/test-container.sh dracut-ng-dracut-ng-3e4cfdd/.github/workflows/integration-extra-arm64.yml000066400000000000000000000026361474727335100265750ustar00rootroot00000000000000--- name: Daily Integration Tests (amd64) on: # yamllint disable-line rule:truthy schedule: - cron: '30 23 * * *' # every day at 23:30 UTC # Allows you to run this workflow manually from the Actions tab workflow_dispatch: pull_request: paths: - '.github/workflows/integration-extra-arm64.yml' jobs: arm64: name: ${{ matrix.test }} on ${{ matrix.container }} on arm64 runs-on: ubuntu-24.04-arm timeout-minutes: 20 concurrency: group: arm64-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - debian - fedora - opensuse - ubuntu - void test: - "10" - "30" - "43" - "80" - "81" container: image: ghcr.io/dracut-ng/${{ matrix.container }}:latest-arm options: '--privileged' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} dracut-ng-dracut-ng-3e4cfdd/.github/workflows/integration-extra.yml000066400000000000000000000041041474727335100256360ustar00rootroot00000000000000--- name: Daily Integration Tests on: # yamllint disable-line rule:truthy schedule: - cron: '30 23 * * *' # every day at 23:30 UTC # Allows you to run this workflow manually from the Actions tab workflow_dispatch: pull_request: paths: - '.github/workflows/integration-extra.yml' jobs: basic: # run this test on all containers name: ${{ matrix.test }} on ${{ matrix.container }} runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: basic-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - alpine:latest - alpine:edge - arch:latest - debian:latest - debian:sid - fedora:latest - fedora:rawhide - centos:stream10-development - gentoo:latest - gentoo:amd64-openrc - opensuse:latest - ubuntu:latest - ubuntu:devel - ubuntu:rolling - void:latest test: - "10" - "11" - "12" - "20" - "23" - "26" - "30" - "40" - "41" - "42" - "43" - "80" - "81" - "82" container: image: ghcr.io/dracut-ng/${{ matrix.container }}-amd options: '--device=/dev/kvm --privileged' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} dracut-ng-dracut-ng-3e4cfdd/.github/workflows/integration.yml000066400000000000000000000176471474727335100245350ustar00rootroot00000000000000--- name: Integration Test on: # yamllint disable-line rule:truthy pull_request: branches: [main] paths-ignore: - antora-playbook.yaml - 'doc_site/**' - 'man/**' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: env: # set V to 2 when re-running jobs with debug logging enabled # see https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging V: "${{ secrets.ACTIONS_STEP_DEBUG && '2' }}" jobs: basic: # run this test on all containers name: ${{ matrix.test }} on ${{ matrix.container }} runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: basic-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - alpine:latest - arch:latest - debian:latest - fedora:latest - gentoo:latest - opensuse:latest - ubuntu:rolling - void:latest test: - "10" container: image: ghcr.io/dracut-ng/${{ matrix.container }}-amd options: '--device=/dev/kvm' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} # syncheck syncheck: needs: basic name: syncheck runs-on: ubuntu-24.04 steps: - name: "Checkout Repository" uses: actions/checkout@v4 - run: | sudo apt-get update sudo apt-get -y install shellcheck shfmt make syncheck extended: needs: basic name: ${{ matrix.test }} on ${{ matrix.container }} runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: extended-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - arch:latest - fedora:latest - gentoo:latest - opensuse:latest - ubuntu:rolling - void:latest test: - "11" - "12" - "20" - "23" - "26" - "30" - "80" - "81" container: image: ghcr.io/dracut-ng/${{ matrix.container }}-amd options: '--device=/dev/kvm' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} extended-systemd: needs: basic name: ${{ matrix.test }} on ${{ matrix.container }} runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: extended-systemd-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - arch:latest - fedora:latest - gentoo:latest - opensuse:latest - ubuntu:rolling test: - "40" - "41" - "42" - "43" container: image: ghcr.io/dracut-ng/${{ matrix.container }}-amd options: '--device=/dev/kvm --privileged' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} dracut-cpio: needs: basic name: ${{ matrix.test }} on ${{ matrix.container }} runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: dracut-cpio-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - opensuse:latest test: - "82" container: image: ghcr.io/dracut-ng/${{ matrix.container }}-amd options: '--device=/dev/kvm' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} network: needs: basic # all nfs based on default networking name: ${{ matrix.test }} on ${{ matrix.container }} runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: network-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - arch:latest - debian:latest - fedora:latest - gentoo:latest - opensuse:latest - ubuntu:rolling test: - "60" - "61" - "62" include: - network: "" # on debian run tests with systemd-networkd - container: "debian:latest" network: "systemd-networkd" # on openSUSE run tests with network-legacy - container: "opensuse:latest" network: "network-legacy" container: image: ghcr.io/dracut-ng/${{ matrix.container }}-amd options: '--device=/dev/kvm' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: USE_NETWORK=${{ matrix.network }} ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} network-advanced: needs: basic name: ${{ matrix.test }} on ${{ matrix.container }} runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: network-iscsi-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }} cancel-in-progress: true strategy: fail-fast: false matrix: container: - opensuse:latest test: - "70" include: # on openSUSE run tests with network-legacy - container: "opensuse:latest" network: "network-legacy" container: image: ghcr.io/dracut-ng/${{ matrix.container }}-amd options: '--device=/dev/kvm' steps: - name: "Checkout Repository" uses: actions/checkout@v4 - name: "${{ matrix.container }} TEST-${{ matrix.test }}" run: USE_NETWORK=${{ matrix.network }} ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} dracut-ng-dracut-ng-3e4cfdd/.github/workflows/labels.yml000066400000000000000000000006171474727335100234410ustar00rootroot00000000000000--- name: "Labeler" # runs on pull_request_target instead of pull_request # see https://github.com/actions/labeler?tab=readme-ov-file#permissions on: # yamllint disable-line rule:truthy pull_request_target: jobs: triage: runs-on: ubuntu-latest steps: - uses: actions/labeler@main with: repo-token: "${{ secrets.GITHUB_TOKEN }}" dracut-ng-dracut-ng-3e4cfdd/.github/workflows/lint.yml000066400000000000000000000026221474727335100231430ustar00rootroot00000000000000--- name: Lint on: # yamllint disable-line rule:truthy pull_request: branches: [main] paths-ignore: - antora-playbook.yaml - 'doc_site/**' - 'man/**' jobs: lint-shell: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: shfmt uses: luizm/action-sh-checker@v0.9.0 env: SHFMT_OPTS: -s # arguments to shfmt. with: # disable shellcheck in favor of differential-shellcheck sh_checker_shellcheck_disable: true differential-shellcheck: runs-on: ubuntu-latest permissions: security-events: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - id: ShellCheck name: Differential ShellCheck uses: redhat-plumbers-in-action/differential-shellcheck@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - if: ${{ always() }} name: Upload artifact with ShellCheck defects in SARIF format uses: actions/upload-artifact@v4 with: name: Differential ShellCheck SARIF path: ${{ steps.ShellCheck.outputs.sarif }} lint-c: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: install tools run: sudo apt-get install astyle - name: indent run: make indent-c - name: check formatting run: git diff --exit-code dracut-ng-dracut-ng-3e4cfdd/.github/workflows/manualtest.yml000066400000000000000000000065011474727335100243520ustar00rootroot00000000000000--- name: Manual test on: # yamllint disable-line rule:truthy workflow_dispatch: inputs: test: description: "Array of tests to run, such as [11,12]" default: "[]" container: type: choice description: 'distro' default: 'all' options: - "all" - "alpine" - "alpine:edge" - "centos:stream10-development" - "fedora" - "fedora:rawhide" - "arch" - "debian" - "debian:sid" - "ubuntu" - "ubuntu:devel" - "ubuntu:rolling" - "opensuse" - "gentoo" - "void" env: description: 'Environment (optional)' default: '{"DEBUGFAIL": "rd.debug"}' registry: description: 'Registry for containers, such as ghcr.io/dracut-ng' env: ${{ fromJSON(inputs.env) }} jobs: matrix: runs-on: ubuntu-24.04 outputs: registry: ${{ steps.set-matrix.outputs.registry }} container: ${{ steps.set-matrix.outputs.container }} tests: ${{ steps.set-matrix.outputs.tests }} steps: - name: "Checkout Repository" uses: actions/checkout@v4 with: fetch-depth: 0 - id: set-matrix name: "Set Matrix" run: | [[ "${{ inputs.registry }}" != '' ]] && echo "registry=\"${{ inputs.registry }}\"" >> $GITHUB_OUTPUT \ || ( echo "registry=\"ghcr.io/${{ github.repository_owner }}\"" >> $GITHUB_OUTPUT ) [[ "${{ inputs.container }}" != 'all' ]] && echo "container=[\"${{ inputs.container }}\"]" >> $GITHUB_OUTPUT \ || ( containers=$(find test/container -name "Dockerfile-*" | cut -d\- -f2 | tr '[:upper:]' '[:lower:]' | sed -z 's/\n/","/g'); echo "container=[\"${containers%??}]" >> $GITHUB_OUTPUT ) [[ "${{ toJson(fromJson(inputs.test)) }}" != '[]' ]] && echo "tests=${{ inputs.test }}" >> $GITHUB_OUTPUT \ || ( tests=$(find test -type d -a -name "TEST-*" | cut -d\- -f2 | sed -z 's/\n/","/g' ); echo "tests=[\"${tests%??}]" >> $GITHUB_OUTPUT ) test: needs: matrix runs-on: ubuntu-24.04 timeout-minutes: 20 concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} cancel-in-progress: true strategy: matrix: container: ${{ fromJSON(needs.matrix.outputs.container) }} test: ${{ fromJSON(needs.matrix.outputs.tests) }} fail-fast: false container: image: ${{ fromJSON(needs.matrix.outputs.registry) }}/${{ matrix.container }} options: "--privileged -v /dev:/dev" steps: - name: "Checkout Repository" uses: actions/checkout@v4 with: fetch-depth: 0 - name: "${{ matrix.container }} ${{ matrix.test }}" run: ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} dracut-ng-dracut-ng-3e4cfdd/.github/workflows/pr.yml000066400000000000000000000011621474727335100226140ustar00rootroot00000000000000--- name: Commisery on: # yamllint disable-line rule:truthy pull_request: types: [edited, opened, synchronize, reopened] jobs: commit-message: name: Conventional Commit Message Checker (Commisery) runs-on: ubuntu-latest steps: - name: Check-out the repo under $GITHUB_WORKSPACE uses: actions/checkout@v4 - name: Run Commisery uses: tomtom-international/commisery-action@master with: token: ${{ secrets.GITHUB_TOKEN }} # don't validate the pull request title validate-pull-request: false validate-pull-request-title-bump: false dracut-ng-dracut-ng-3e4cfdd/.github/workflows/publish.yml000066400000000000000000000025251474727335100236450ustar00rootroot00000000000000--- name: Publish to GitHub Pages on: # yamllint disable-line rule:truthy push: branches: [main] paths-ignore: - 'modules.d/**' - 'test/**' - 'src/**' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: concurrency: group: github-pages cancel-in-progress: false # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write jobs: build: runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Configure Pages uses: actions/configure-pages@v5 - name: Install Node.js uses: actions/setup-node@v4 with: node-version: '18' - name: Install dependencies run: | sudo apt-get -y update sudo apt-get -y install make asciidoc - name: Install Antora run: npm i antora - name: Generate Site run: make doc_site - name: Upload Artifacts uses: actions/upload-pages-artifact@v3 with: path: build/site - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 dracut-ng-dracut-ng-3e4cfdd/.github/workflows/release.yml000066400000000000000000000015251474727335100236160ustar00rootroot00000000000000--- name: Release on: # yamllint disable-line rule:truthy schedule: ## Schedule the job quarterly to run on Feb-1, May-1, Aug-1, and Nov-1 - cron: '0 0 1 FEB,MAY,AUG,NOV *' workflow_dispatch: inputs: tag: description: "release version number (3 digits)" required: true permissions: contents: write jobs: release: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Build run: bash ${GITHUB_WORKSPACE}/tools/release.sh ${{ inputs.tag }} - name: Release if: ${{ env.new_version }} uses: softprops/action-gh-release@v2.2.1 with: tag_name: ${{ env.new_version }} name: dracut-${{ env.new_version }} body_path: ${{ github.workspace }}/release.md dracut-ng-dracut-ng-3e4cfdd/.gitignore000066400000000000000000000003621474727335100200440ustar00rootroot00000000000000**/*.[0-9] *.o .idea/ /*.rpm /*.sign /.buildpath /.project /Makefile.inc /dracut-install /dracut-util /dracut.conf.d/*.conf /dracut.pc /src/install/dracut-install /src/skipcpio/skipcpio /src/util/util /test/*/.testdir /test/*/test.log build/ dracut-ng-dracut-ng-3e4cfdd/.kateconfig000066400000000000000000000002051474727335100201630ustar00rootroot00000000000000kate: space-indent on; tab-width 4; indent-width 4; replace-tabs on; eol unix; kate-mimetype(text/x-c): tab-width 8; indent-width 8; dracut-ng-dracut-ng-3e4cfdd/.kateproject000066400000000000000000000002601474727335100203650ustar00rootroot00000000000000{ "name": "Dracut" , "files": [ { "git": 1 } ] , "build": { "directory": "./" , "build": "make -j $(getconf _NPROCESSORS_ONLN) all" , "clean": "make clean" } } dracut-ng-dracut-ng-3e4cfdd/.mailmap000066400000000000000000000042301474727335100174730ustar00rootroot00000000000000Philippe Seewer Seewer Philippe Philippe Seewer Victor Lowther Harald Hoyer Harald Hoyer Harald Hoyer Harald Hoyer Mike Snitzer Amerigo Wang Andrey Borzenkov Dan Horák John Reiser Luca Berra Dave Young Dave Young Frederick Grose Frederic Crozat Shawn W Dunn Kyle McMartin Angelo "pallotron" Failla Yu Watanabe Martin Wilck Thomas Renninger Andrey Borzenkov Cristian Rodríguez Daniel Drake Fabian Vogt Hannes Reinecke Julian Wolf Lidong Zhong Nikoli Peter Robinson Xunlei Pang Daniel Molkentin Thomas Blume Brian C. Lane Tomasz Paweł Gajc dracut-ng-dracut-ng-3e4cfdd/.shellcheckrc000066400000000000000000000011741474727335100205110ustar00rootroot00000000000000# SC2154: Variable is referenced but not assigned # https://github.com/koalaman/shellcheck/wiki/SC2154 disable=SC2154 # SC1091: Not following # https://github.com/koalaman/shellcheck/wiki/SC1091 disable=SC1091 # SC2174: When used with -p, -m only applies to the deepest directory. # https://github.com/koalaman/shellcheck/wiki/SC2174 disable=SC2174 # SC3043: In POSIX sh, 'local' is undefined. # https://github.com/koalaman/shellcheck/wiki/SC3043 # ... but dash supports it disable=SC3043 # SC3013: In POSIX sh, -ef is undefined. # https://github.com/koalaman/shellcheck/wiki/SC3013 # ... but dash supports it disable=SC3013 dracut-ng-dracut-ng-3e4cfdd/.vimrc000066400000000000000000000012111474727335100171670ustar00rootroot00000000000000" Vim can use per directory configuration files like this. " To enable that feature two lines are needed in your ~/.vimrc " set exrc " enables per-directory .vimrc files " set secure " disable unsafe commands in local .vimrc files " Characters width is set to 109 for .c and XML but for everything else 79. " If you update this file make sure to update .dir-locals.el & .editorconfig set tabstop=4 set shiftwidth=4 set expandtab set makeprg=GCC_COLORS=\ make set tw=79 au BufRead,BufNewFile *.xml set tw=109 shiftwidth=2 smarttab au FileType sh set tw=80 shiftwidth=4 smarttab au FileType c set tw=109 shiftwidth=8 tabstop=8 smarttab expandtab dracut-ng-dracut-ng-3e4cfdd/AUTHORS000066400000000000000000000401641474727335100171300ustar00rootroot00000000000000Harald Hoyer Jo Zzsi Laszlo Gombos Victor Lowther Antonio Alvarez Feijoo Jóhann B. Guðmundsson Amadeusz Żołnowski Benjamin Drung Daniel Molkentin Hannes Reinecke Kairui Song Will Woods Philippe Seewer Warren Togami Martin Wilck Dave Young Jeremy Katz Lukas Nykryn David Dillow Henrik Gombos Lubomir Rintel Michal Soltys Colin Guthrie Amerigo Wang Thomas Renninger Frederick Grose Alexander Tsoy Beniamino Galvani Pavel Valena Ian Wienand наб dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Jonathan Lebon Steffen Maier WANG Chao Andrew Ammerlaan David Tardon Yu Watanabe Andrey Borzenkov David Disseldorp Frantisek Sumsal Marcos Mello Peter Robinson Thomas Blume Brian C. Lane Hans de Goede Peter Jones Philipp Rudo Andreas Thienemann Renaud Métrich Tomasz Paweł Gajc Fabian Vogt Nicolas Chauvet Zoltán Böszörményi Colin Walters David Teigland Dusty Mabe John Reiser Kairui Song Luca Berra Mike Gilbert Shreenidhi Shedi Xunlei Pang Daniel Drake Angelo "pallotron" Failla Dan Horák Ville Skyttä Adrien Thierry Böszörményi Zoltán Cristian Rodríguez Javier Martinez Canillas Mikhail Novosyolov Ondrej Mosnacek Tao Liu Baoquan He Brendan Germain BtbN Jonas Witschel Leho Kraav Lidong Zhong Moritz Maxeiner Nathan Rini Radek Vykydal Zbigniew Jędrzejewski-Szmek dracutng[bot] Đoàn Trần Công Danh Adam Williamson Fabian Deutsch Jan Macku Kamil Rytarowski Marc Grimme NeilBrown Peter Rajnoha Thorsten Behrens q66 Chao Wang Cornelius Hoffmann Frederic Crozat James Lee Jesse Keating Masahiro Matsuya Milan Broz Mimi Zohar Norbert Lange Pingfan Liu Roberto Sassu Stefan Reimer Takashi Iwai Tony Asleson Zoltán Böszörményi Alper Nebi Yasak Anton Blanchard Bill Nottingham Chapman Flack Chris Leech David Cantrell Dennis Gilmore Doan Tran Cong Danh Gaël PORTAY Jan Synacek Jiri Konecny Jochen Sprickerhof Jon Ander Hernandez Juan RP Lance Albertson Marian Ganisin Matt Coleman Matteo Croce Matthias Gerstner Max Resch Michael Ploujnikov Michal Koutný Neal Gompa Nicolas Porcel Pratyush Anand Sam James Silvio Fricke Stefan Berger Steven Brudenell Stig Telfer Thomas Backlund Topi Miettinen Vasiliy Tolstov Vitaly Kuznetsov Wim Muskee keentux Alan Jenkins Alan Pevec Alberto Planas Alex Harpin Alexander Wenzel Alexey Shabalin Andre Russ Andreas Schwab Ankit Kumar Antony Messerli Benjamin Marzinski Chao Fan Coiby Xu Daniel Cordero Daniel Kahn Gillmor Daniel McIlvaney Daniel Schaal Daniel Winzen Denis Silakov Dimitri John Ledkov Erwan Velu Evgeny Vereshchagin Fabian Vogt Federico Vaga Fernando Fernandez Mancera Frederick Grose <4335897+FGrose@users.noreply.github.com> German Maglione Guido Trentalancia Hari Bathini Hari Bathini Hector Martin Ian Dall Imran Haider James Buren Joey Boggs Jose Ignacio Tornos Martinez José María Fernández Julian Wolf Kamil Szczęk Koen Kooi Konrad Rzeszutek Wilk Kyle McMartin Lee Duncan LinkTed Luiz Angelo Daros de Luca Lukas Wunner Manuel Fombuena Manuel Fombuena Mariusz Tkaczyk Marko Myllynen Matthew Thode Mike Snitzer Minfei Huang Nikoli Ondrej Kubik Patrick Talbert Pedro Monreal Petr Pavlu Przemysław Rudy Robert LeBlanc Robert Scheck Stefan Berger Thomas Lange Tianhao Chai Till Maas Timo Rothenpieler Vivek Goyal Vladislav Bogdanov Wenchao Hao dalto8 <57767042+dalto8@users.noreply.github.com> farfalleflickan <6597735+farfalleflickan@users.noreply.github.com> nkraetzschmar Érico Rolim “Masahiro 0x5c A. Wilcox Adam Alves Alexander Kurtz Alexander Miroshnichenko Alexander Sosedkin Alexander Todorov Alexey Kodanev Andreas Stieger Andrew Gunnerson Andrew Halaney Andrew J. Hesford Andrey Sokolov Andy Lutomirski Anjali Kulkarni Anssi Hannula Anton Lundin Antz Arnaud Rebillout Artem Savkov Attila Bruncsak B. Wilson Ben Howard Benjamin Gilbert Bernhard M. Wiedemann Bernhard Rosenkraenzer Brandon Philips Brandon Sloane Brian Harring Bruno E. O. Meneguele Bryn M. Reeves Cameron Baird Canek Peláez Valdés Carlo Caione Chad Dupuis Charles Rose Christian Heinz Clemens Lang Cole Robinson Cong Wang Conrad Hoffmann Daan De Meyer Dan Fuhry Daniel P. Berrangé Dave Jones David Cassany David Hildenbrand David Härdeman David Michael Denis Volkov Dennis Schridde Derek Hageman Derek Higgins Dirk Müller Dmitry Klochkov Donovan Tremura Dorina Kovacs Duane Griffin Elan Ruusamäe Emanuele Giuseppe Esposito Enno Boland Enzo Matsumiya Eugene S. Sobolev Eugene Syromiatnikov Evgeni Golov Fabian Henze <1144183+flyser@users.noreply.github.com> Florian Albrechtskirchinger Florian Gamböck Frank Deng François Cami George Mileka Gerd von Egidy Glen Gray Glenn Morris GuoChuang HATAYAMA Daisuke Hendrik Brueckner Hermann Gausterer Hiroaki Mizuguchi Hongxu Jia Huaxin Lu Hui Wang Icenowy Zheng Ignaz Forster Ihno Krumreich Jacob Wen James Laska James Morris Jan Stodola Jaroslav Jindrak Jason Dana Jens Heise <46450477+heisej@users.noreply.github.com> Jeremy Linton Jeremy Linton Jeremy Linton Jiri Pirko Joe Lawrence Johannes Thumshirn John Meneghini Jonas Jelten Jonas Jonsson Jonas Witschel Kenneth D'souza Kevin Yung Khem Raj Lars R. Damerow Lars Wendler Laszlo Laura Hild Lennart Poettering Lennert Buytenhek Lev Veyde Lianbo Jiang Lichen Liu Louis Sautier Luca BRUNO Lucas C. Villa Real Major Hayden Marc-Antoine Perennou Marek Marczykowski-Górecki Marian Csontos Mark Fasheh Matt Matt Smith Matthias Berndt Mei Liu Michael Chapman Michael McCracken Michal Hecko Michal Schmidt Michal Sekletar Michał Zegan Mike Gorse Mike Schwarz Moritz 'Morty' Strübe Morten Linderud Munehiro Matsuda Nick Rosbrook Nicolas Saenz Julienne Nowa Ammerlaan Nowa Ammerlaan Olivier Blin Ondrej Dubaj P J P Paolo Bonzini Patrick Schleizer Paul Charlton Paul Robins Pavel Zhukov Pawel Wieczorkiewicz Pekka Wallendahl Peter Georg Peter Levine Petr Tesarik Petr Vorel Prarit Bhargava Praveen_Paladugu@Dell.com Pádraig Brady Quentin Armitage Reilly Brogan Robert Buchholz Ruben Kerkhof Rumbaut Thomas Rusty Bird Savyasachee Jha Scott Moser Sebastian Mitterle Sergei Iudin Sergey Fionov Sergio E. Nemirowski Shawn W Dunn Srinivasa T N Stijn Hoop Sullivan (CTR), Austin Thierry Bultel Thierry Vignaud Thilo Bangert Thomas Abraham Thomas Haller Tobias Geerinckx Tobias Klauser Tom Gundersen Tomas Bzatek Tomasz Torcz Tong Li Vadim Kuznetsov Valentin David Valentin Lefebvre Vaughan Cao Vladius25 Vratislav Podzimek Yang Liu <50459973+ly4096x@users.noreply.github.com> Yanko Kaneti Zhiguo Deng Ziyue Yang foopub <45460217+foopub@users.noreply.github.com> gaoyi gombi gregory-lee-bartholomew honza801 innovara jbash aka John Bashinski jloeser joamonwx johannes jonathan-teh <30538043+jonathan-teh@users.noreply.github.com> joshuacov1 lapseofreason leo-lb lilinjie logan masem maximilian attems mulhern mwberry nabijaczleweli privb0x23 realtime-neil runsisi tupper xtraeme Дамјан Георгиевски dracut-ng-dracut-ng-3e4cfdd/COPYING000066400000000000000000000432541474727335100171160ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. dracut-ng-dracut-ng-3e4cfdd/Makefile000066400000000000000000000263621474727335100175240ustar00rootroot00000000000000-include dracut-version.sh DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CURDIR)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :) ifeq ($(DRACUT_MAIN_VERSION),) DRACUT_MAIN_VERSION = $(DRACUT_VERSION) endif DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CURDIR)/.. git describe --tags --always 2>/dev/null || :) ifeq ($(DRACUT_FULL_VERSION),) DRACUT_FULL_VERSION = $(DRACUT_VERSION) endif HAVE_SHELLCHECK ?= $(shell command -v shellcheck >/dev/null 2>&1 && echo yes) HAVE_SHFMT ?= $(shell command -v shfmt >/dev/null 2>&1 && echo yes) -include Makefile.inc KVERSION ?= $(shell uname -r) prefix ?= /usr libdir ?= ${prefix}/lib datadir ?= ${prefix}/share pkglibdir ?= ${libdir}/dracut sysconfdir ?= ${prefix}/etc bindir ?= ${prefix}/bin mandir ?= ${prefix}/share/man CFLAGS ?= -O2 -g -Wall -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 bashcompletiondir ?= ${datadir}/bash-completion/completions pkgconfigdatadir ?= $(datadir)/pkgconfig man1pages = man/lsinitrd.1 man5pages = man/dracut.conf.5 man7pages = man/dracut.cmdline.7 \ man/dracut.bootup.7 \ man/dracut.modules.7 man8pages = man/dracut.8 \ man/dracut-catimages.8 \ modules.d/98dracut-systemd/dracut-cmdline.service.8 \ modules.d/98dracut-systemd/dracut-initqueue.service.8 \ modules.d/98dracut-systemd/dracut-mount.service.8 \ modules.d/98dracut-systemd/dracut-shutdown.service.8 \ modules.d/98dracut-systemd/dracut-pre-mount.service.8 \ modules.d/98dracut-systemd/dracut-pre-pivot.service.8 \ modules.d/98dracut-systemd/dracut-pre-trigger.service.8 \ modules.d/98dracut-systemd/dracut-pre-udev.service.8 manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) .PHONY: install clean archive test all check AUTHORS CONTRIBUTORS doc all: dracut.pc dracut-install src/skipcpio/skipcpio dracut-util %.o : %.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $(KMOD_CFLAGS) $< -o $@ DRACUT_INSTALL_OBJECTS = \ src/install/dracut-install.o \ src/install/hashmap.o\ src/install/log.o \ src/install/strv.o \ src/install/util.o # deps generated with gcc -MM src/install/dracut-install.o: src/install/dracut-install.c src/install/log.h src/install/macro.h \ src/install/hashmap.h src/install/util.h src/install/hashmap.o: src/install/hashmap.c src/install/util.h src/install/macro.h src/install/log.h \ src/install/hashmap.h src/install/log.o: src/install/log.c src/install/log.h src/install/macro.h src/install/util.h src/install/util.o: src/install/util.c src/install/util.h src/install/macro.h src/install/log.h src/install/strv.o: src/install/strv.c src/install/strv.h src/install/util.h src/install/macro.h src/install/log.h src/install/dracut-install: $(DRACUT_INSTALL_OBJECTS) $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(FTS_LIBS) $(KMOD_LIBS) dracut-install: src/install/dracut-install ln -fs $< $@ SKIPCPIO_OBJECTS = src/skipcpio/skipcpio.o skipcpio/skipcpio.o: src/skipcpio/skipcpio.c skipcpio/skipcpio: $(SKIPCPIO_OBJECTS) UTIL_OBJECTS = src/util/util.o util/util.o: src/util/util.c util/util: $(UTIL_OBJECTS) dracut-util: src/util/util cp -a $< $@ .PHONY: indent-c indent-c: astyle -n --quiet --options=.astylerc $(wildcard *.[ch] */*.[ch] src/*/*.[ch]) .PHONY: indent indent: indent-c ifeq ($(HAVE_SHFMT),yes) shfmt -w -s . endif src/dracut-cpio/target/release/dracut-cpio: src/dracut-cpio/src/main.rs cargo --offline build --release --manifest-path src/dracut-cpio/Cargo.toml dracut-cpio: src/dracut-cpio/target/release/dracut-cpio ln -fs $< $@ ifeq ($(enable_dracut_cpio),yes) all: dracut-cpio endif doc: $(manpages) ifneq ($(enable_documentation),no) all: doc endif %: %.xml @rm -f -- "$@" xsltproc -o "$@" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< %.xml: %.adoc @rm -f -- "$@" asciidoc -f man/asciidoc.conf -a "version=$(DRACUT_FULL_VERSION)" -d manpage -b docbook -o "$@" $< # If ANOTRA_BIN not set, default to look for "npx" to run "npx antora". If we # end up with undefined ANTORA_BIN (i.e. not set and npx not found), we'll give # a sane error when building docs below. ifeq ($(ANTORA_BIN),) NPX := $(shell command -v npx 2> /dev/null) ifneq ($(NPX),) ANTORA_BIN := "$(NPX) antora" endif endif .PHONY: doc_site doc_site: $(manpages) doc_site/modules/ROOT/nav.adoc doc_site/modules/ROOT/pages/index.adoc ifndef ANTORA_BIN $(error Antora not found, install nodejs or set ANTORA_BIN to make doc site) endif mkdir -p doc_site/modules/ROOT/pages/man cd doc_site/modules/ROOT/pages/man/; for i in $(manpages) man/dracut.usage; do ln -sf ../../../../../$${i}.adoc $(basename $i); done $(shell echo $(ANTORA_BIN)) --attribute "mainversion=$(DRACUT_MAIN_VERSION)" \ --attribute "version=${DRACUT_FULL_VERSION}" \ antora-playbook.yml dracut.8: man/dracut.8.adoc \ man/dracut.usage.adoc dracut.pc: Makefile.inc Makefile @echo "Name: dracut" > dracut.pc @echo "Description: dracut" >> dracut.pc @echo "Version: $(DRACUT_FULL_VERSION)" >> dracut.pc @echo "dracutdir=$(pkglibdir)" >> dracut.pc @echo "dracutmodulesdir=$(pkglibdir)/modules.d" >> dracut.pc @echo "dracutconfdir=$(pkglibdir)/dracut.conf.d" >> dracut.pc install: all mkdir -p $(DESTDIR)$(pkglibdir) mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(sysconfdir) mkdir -p $(DESTDIR)$(pkglibdir)/modules.d mkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8 install -m 0755 dracut.sh $(DESTDIR)$(bindir)/dracut install -m 0755 dracut-catimages.sh $(DESTDIR)$(bindir)/dracut-catimages install -m 0755 lsinitrd.sh $(DESTDIR)$(bindir)/lsinitrd install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d mkdir -p $(DESTDIR)$(pkglibdir)/dracut.conf.d install -m 0755 dracut-init.sh $(DESTDIR)$(pkglibdir)/dracut-init.sh install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore rm -rf $(DESTDIR)$(pkglibdir)/modules.d/80test* cp -arx modules.d dracut.conf.d $(DESTDIR)$(pkglibdir) for i in $(configprofile) ; do \ cp -arx dracut.conf.d/$$i/* $(DESTDIR)$(pkglibdir)/dracut.conf.d/ ;\ done ifneq ($(enable_test),no) cp -arx test $(DESTDIR)$(pkglibdir) else rm -rf $(DESTDIR)$(pkglibdir)/modules.d/80test* endif ifneq ($(enable_documentation),no) for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done for i in $(man7pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man7/$${i##*/}; done for i in $(man8pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man8/$${i##*/}; done ln -fs dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 endif if [ -n "$(systemdsystemunitdir)" ]; then \ mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown-onfailure.service; \ ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \ mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants; \ ln -sf ../dracut-shutdown.service \ $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants/dracut-shutdown.service; \ mkdir -p $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants; \ for i in \ dracut-cmdline.service \ dracut-initqueue.service \ dracut-mount.service \ dracut-pre-mount.service \ dracut-pre-pivot.service \ dracut-pre-trigger.service \ dracut-pre-udev.service \ ; do \ ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/$$i $(DESTDIR)$(systemdsystemunitdir); \ ln -sf ../$$i \ $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$$i; \ done \ fi if [ -f src/install/dracut-install ]; then \ install -m 0755 src/install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \ fi if [ -f src/skipcpio/skipcpio ]; then \ install -m 0755 src/skipcpio/skipcpio $(DESTDIR)$(pkglibdir)/skipcpio; \ fi if [ -f dracut-util ]; then \ install -m 0755 dracut-util $(DESTDIR)$(pkglibdir)/dracut-util; \ fi ifeq ($(enable_dracut_cpio),yes) install -m 0755 dracut-cpio $(DESTDIR)$(pkglibdir)/dracut-cpio endif mkdir -p $(DESTDIR)${prefix}/lib/kernel/install.d install -m 0755 install.d/50-dracut.install $(DESTDIR)${prefix}/lib/kernel/install.d/50-dracut.install install -m 0755 install.d/51-dracut-rescue.install $(DESTDIR)${prefix}/lib/kernel/install.d/51-dracut-rescue.install mkdir -p $(DESTDIR)${bashcompletiondir} install -m 0644 shell-completion/bash/dracut $(DESTDIR)${bashcompletiondir}/dracut install -m 0644 shell-completion/bash/lsinitrd $(DESTDIR)${bashcompletiondir}/lsinitrd mkdir -p $(DESTDIR)${pkgconfigdatadir} install -m 0644 dracut.pc $(DESTDIR)${pkgconfigdatadir}/dracut.pc if ! [ -n "$(systemdsystemunitdir)" ]; then \ rm -rf $(DESTDIR)$(pkglibdir)/test/TEST-[0-9][0-9]-*SYSTEMD* ;\ rm -rf $(DESTDIR)$(pkglibdir)/modules.d/*systemd* $(DESTDIR)$(mandir)/*.service.* ; \ for i in bluetooth connman dbus* fido2 lvmmerge lvmthinpool-monitor memstrack network-manager pcsc pkcs11 rngd squash* tpm2-tss; do \ rm -rf $(DESTDIR)$(pkglibdir)/modules.d/[0-9][0-9]$${i}; \ done \ fi clean: $(RM) *~ $(RM) */*~ $(RM) */*/*~ $(RM) $(manpages:%=%.xml) dracut.xml $(RM) dracut-*.tar.bz2 dracut-*.tar.xz $(RM) dracut-install src/install/dracut-install $(DRACUT_INSTALL_OBJECTS) $(RM) src/skipcpio/skipcpio $(SKIPCPIO_OBJECTS) $(RM) dracut-util src/util/util $(UTIL_OBJECTS) $(RM) $(manpages) $(RM) dracut.pc $(RM) dracut-cpio src/dracut-cpio/target/release/dracut-cpio* $(RM) -rf build/ doc_site/modules/ROOT/pages/man/* $(MAKE) -C test clean syncheck: @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ [ "$${i##*/}" = "module-setup.sh" ] && continue; \ read line < "$$i"; [ "$${line#*bash*}" != "$$line" ] && continue; \ [ $$V ] && echo "posix syntax check: $$i"; bash --posix -n "$$i" ; ret=$$(($$ret+$$?)); \ [ $$V ] && echo "checking for [[: $$i"; if grep -Fq '[[ ' "$$i" ; then ret=$$(($$ret+1)); echo "$$i contains [["; fi; \ [ $$V ] && echo "checking for echo -n: $$i"; if grep -Fq 'echo -n ' "$$i" ; then ret=$$(($$ret+1)); echo "$$i contains echo -n"; fi \ done;exit $$ret @ret=0;for i in *.sh modules.d/*/*.sh modules.d/*/module-setup.sh; do \ [ $$V ] && echo "bash syntax check: $$i"; bash -n "$$i" ; ret=$$(($$ret+$$?)); \ done;exit $$ret ifeq ($(HAVE_SHELLCHECK),yes) ifeq ($(HAVE_SHFMT),yes) shellcheck $$(shfmt -f .) else find . -name '*.sh' -print0 | xargs -0 shellcheck endif endif check: all @$(MAKE) -C test check AUTHORS: @git log | git shortlog --numbered --summary -e | while read -r a rest || [ -n "$$rest" ]; do echo "$$rest"; done > AUTHORS CONTRIBUTORS: @git log | git shortlog $(DRACUT_MAIN_VERSION).. --numbered --summary -e | while read -r a rest || [ -n "$$rest" ]; do echo "- $$rest"; done dracut-ng-dracut-ng-3e4cfdd/NEWS.md000066400000000000000000007367001474727335100171660ustar00rootroot00000000000000[Rendered view](https://github.com/dracut-ng/dracut-ng/blob/master/NEWS.md) dracut-ng-106 ============= #### Bug Fixes * check if xx-lib.sh is needed before executing ([8b71a80e](https://github.com/dracut-ng/dracut-ng/commit/8b71a80edfca725e8aa281a4f91c55ff6234cc82)) * check if dracut-lib.sh is needed before executing ([8f249c2b](https://github.com/dracut-ng/dracut-ng/commit/8f249c2b3ed37f2fbd356c12e71a8b27ff2d87a5)) * add bash dependency when bash scripts are used in the module ([3a04a139](https://github.com/dracut-ng/dracut-ng/commit/3a04a139700ffc7fe7a4897bb6067ebc46972874)) * initqueue -> /sbin/initqueue ([6f9b5a52](https://github.com/dracut-ng/dracut-ng/commit/6f9b5a52307011cec016b06c2caf96c2788a52eb)) * set initrd-release in the base module ([41f9e8f9](https://github.com/dracut-ng/dracut-ng/commit/41f9e8f9acde08ab5ebf9f33cff627f3192bb8b9)) * remove extra bracket ([512215c7](https://github.com/dracut-ng/dracut-ng/commit/512215c79ef433cf5e29daa64ca3632c7532e091)) * **01fips-crypto-policies:** use /bin in shebang ([f7ca0f3e](https://github.com/dracut-ng/dracut-ng/commit/f7ca0f3ef3c7635cee334ad7d5a82b74b989c44c)) * **35network-manager:** * install nftables kernel modules needed ([fca71490](https://github.com/dracut-ng/dracut-ng/commit/fca714903c634ad5d1a90b425bc4231aa5e358e2)) * install nft binary during module installation ([a6264d17](https://github.com/dracut-ng/dracut-ng/commit/a6264d1726d9a89ecb8b45c6215768755dcb8ba7)) * **ENC-RAID-LVM:** correct test name and remove obsolete step ([90f46fcb](https://github.com/dracut-ng/dracut-ng/commit/90f46fcbab236a603c5554c75416db5d1199cee9)) * **Makefile:** * remove irrelevant testcases ([5b58bbea](https://github.com/dracut-ng/dracut-ng/commit/5b58bbead35fb5d09c44f9e98219bf7b9ed93ff5)) * path for make clean ([a81782ce](https://github.com/dracut-ng/dracut-ng/commit/a81782ce44a46cf9880a1da42c70bfad15ce8cb4)) * **base:** * fallback when shell-interpreter is not included ([7f13ea21](https://github.com/dracut-ng/dracut-ng/commit/7f13ea21834f0e080675d6750af4d866b84e5c9f)) * remove fallback for shell selection ([e139edb8](https://github.com/dracut-ng/dracut-ng/commit/e139edb87cf8d5a6199bf53d78f16664fb27155f)) * **crypt:** crypt-lib.sh optionally depends on stty ([4532fb0f](https://github.com/dracut-ng/dracut-ng/commit/4532fb0f420a28026b91abda2ca0cc2e69aecca2)) * **dm:** remove 59-persistent-storage-dm.rules ([d2ade8a6](https://github.com/dracut-ng/dracut-ng/commit/d2ade8a6bf084c4cfb104dc9eff9917ea9bb9110)) * **dmsquash-live-root.sh:** support images with non-existing /proc ([e37c67f6](https://github.com/dracut-ng/dracut-ng/commit/e37c67f6f573ca5a15e88e5899e92ce1a8582bac)) * **docs:** correct spelling mistake of recommended ([4e03ac7c](https://github.com/dracut-ng/dracut-ng/commit/4e03ac7cdc41bb8d26a4e44d4202564fde704dee)) * **dracut:** rework timeout for devices added via --mount and --add-device ([c79fc8fd](https://github.com/dracut-ng/dracut-ng/commit/c79fc8fd0d4b9aaa8e753296cbafdb1f82781d08)) * **dracut-functions.sh:** * check_kernel_module go one dir further up ([16abd45f](https://github.com/dracut-ng/dracut-ng/commit/16abd45f8227841697d2d8b1e5ab1a8237ad38df)) * check for modules in --kmoddir, not in --sysroot ([b90eda4b](https://github.com/dracut-ng/dracut-ng/commit/b90eda4b431af23d1101f1ea68b656929c6a82b2)) * **dracut-init:** add compatibility with Debian/Ubuntu for libdirs detection ([8809b246](https://github.com/dracut-ng/dracut-ng/commit/8809b2468aa2e3fd2ce4ff99f1cc4d400a190cf2)) * **dracut-lib:** initialize getcmdline/getarg local variables ([fc18d0b3](https://github.com/dracut-ng/dracut-ng/commit/fc18d0b317f463dc16351104ba260a08955694ff)) * **dracut-systemd:** * check SYSTEMD_SULOGIN_FORCE before allowing passwordless ([27024d67](https://github.com/dracut-ng/dracut-ng/commit/27024d67f96b5ee0ad7260e3c6796375a56467e5)) * check systemd-cryptsetup before including ([484a8a23](https://github.com/dracut-ng/dracut-ng/commit/484a8a23f11146f3360622b91f453f33e5fff0c2)) * unquote variable in udev conf ([3b753bf7](https://github.com/dracut-ng/dracut-ng/commit/3b753bf7b7d6cf69f8ece5d6e591e66c1cbaa791)) * **dracut.sh:** * do not add cmdline for force_drivers if --kernel-only ([95fe9048](https://github.com/dracut-ng/dracut-ng/commit/95fe904812ff4f192e56cf498983e3264c8135b4)) * ensure abs path for objcopy args ([1579bb0c](https://github.com/dracut-ng/dracut-ng/commit/1579bb0c77d9e1e4599623a165c54a0dccdaf875)) * **fips-crypto-policies:** improve check for module inclusion ([1ef60f9f](https://github.com/dracut-ng/dracut-ng/commit/1ef60f9fcfb57f79532604c1ea1920ace7c21e99)) * **i18n:** make /etc/vconsole.conf optional ([1246c4a1](https://github.com/dracut-ng/dracut-ng/commit/1246c4a176847e8be4cfb2dd82ef1ddc9462c012)) * **img-lib:** trim required binaries ([755c5c52](https://github.com/dracut-ng/dracut-ng/commit/755c5c522e54a71207d075ebcba8fc83f6799e01)) * **iscsi:** * attempt iSCSI login before all interfaces are up ([f30cf46e](https://github.com/dracut-ng/dracut-ng/commit/f30cf46e5bb8919c15245325e095103c2624884e)) * don't require network setup for bnx2i ([cc2c48a0](https://github.com/dracut-ng/dracut-ng/commit/cc2c48a0b3b97781e7e10e8fc9bd0a74c4c5bce2)) * do not install services when not using systemd ([87fefd3c](https://github.com/dracut-ng/dracut-ng/commit/87fefd3cab7f9c611dc74a7ebc230228a7682e84)) * remove duplicate inst_multiple calls for iscsiadm and iscsid ([73cdd31c](https://github.com/dracut-ng/dracut-ng/commit/73cdd31c1b086fd847affa8defc212f1186e51db)) * include /usr/lib/open-iscsi/startup-checks.sh if needed ([7fe7fa94](https://github.com/dracut-ng/dracut-ng/commit/7fe7fa943748c6b746e762ab263084eb7d15a63e)) * **kernel-network-modules:** if running inside vm, include qemu-net ([2ecdda2d](https://github.com/dracut-ng/dracut-ng/commit/2ecdda2d28f165d26cbdb82c9fe3a2f7bab71c52)) * **lsinitrd:** improve KERNEL_VERSION detection ([37ce14fb](https://github.com/dracut-ng/dracut-ng/commit/37ce14fb0215c031090cac890c1c6dabcf183714)) * **lvmthinpool-monitor:** make sure systemd is included ([359e1e9a](https://github.com/dracut-ng/dracut-ng/commit/359e1e9a50ff77345696a8088f613c6418886cf1)) * **nfs:** * do not set DRACUT_RESOLVE_LAZY for musl ([9060fe6b](https://github.com/dracut-ng/dracut-ng/commit/9060fe6b2eda894235464fbd2aa1ba2b279971c7)) * use the same directory set ownership and permissions as the host ([6c3b8b2f](https://github.com/dracut-ng/dracut-ng/commit/6c3b8b2f297657920a022e52e68c8b0c192acbbe)) * **pcsc:** add libpcsclite_real.so.* ([bfa00c2a](https://github.com/dracut-ng/dracut-ng/commit/bfa00c2a03b07efae5a826aa881317acea9a4ec6)) * **plymouth:** * change severity of shutdown log messages ([62c79128](https://github.com/dracut-ng/dracut-ng/commit/62c79128dac8cc2cbc5422dc7b871de1e7a54467)) * silence warnings ([85bb1bc6](https://github.com/dracut-ng/dracut-ng/commit/85bb1bc6344065884bb85d6638400632f3bf3010)) * do not depend on dpkg-architecture ([1b374931](https://github.com/dracut-ng/dracut-ng/commit/1b374931126cc1cc4d731930c4b0ee520a4abbf6)) * **qemu-net:** align check logic between qemu modules ([bb7425b8](https://github.com/dracut-ng/dracut-ng/commit/bb7425b8102f46928327bc762f653b2660643c34)) * **rngd:** do not include the module if we can not start the service ([3c727b60](https://github.com/dracut-ng/dracut-ng/commit/3c727b602d36d52960420ebaba1147152a603ceb)) * **shell-interpreter:** move later in the module ordering ([8f247f2f](https://github.com/dracut-ng/dracut-ng/commit/8f247f2faae48d2250e0ed82cef95911f0735073)) * **systemd:** * systemd dlopens libbpf ([659c2681](https://github.com/dracut-ng/dracut-ng/commit/659c268198ec9895292695b658b47d9e588513d6)) * include dmi-sysfs ([817dd612](https://github.com/dracut-ng/dracut-ng/commit/817dd61252f535412f488f0a05361abdfaeedbcd)) * **systemd-ask-password:** do not half-install systemd-ask-password-wall ([d8d11852](https://github.com/dracut-ng/dracut-ng/commit/d8d118523f0ed74427beccec4857a92fe5ffdf7e)) * **systemd-networkd:** depend on net-lib ([80e9d891](https://github.com/dracut-ng/dracut-ng/commit/80e9d891dbe4b9d9244fc801dcec0dac52d16de3)) * **systemd-pcrphase:** include systemd-pcrphase in hostonly mode ([ea6a47ed](https://github.com/dracut-ng/dracut-ng/commit/ea6a47ede7d9c5b268bd51aac3808d8b3979a962)) * **systemd-sysext:** install new initrd-specific units ([68a09b43](https://github.com/dracut-ng/dracut-ng/commit/68a09b43e95a760b7f2b055e91e394dba7b968c8)) * **systemd-sysuser:** add support for Gentoo ([1c5f45a2](https://github.com/dracut-ng/dracut-ng/commit/1c5f45a24b34e3fb81e29f44de451bd1f9638203)) * **systemd-sysusers:** systemd.conf no longer exists ([8f30a001](https://github.com/dracut-ng/dracut-ng/commit/8f30a001a221f5ea668cd1bdab43f813c97b98a8)) * **systemd-tmpfiles:** * passwd and group file management ([4e520c88](https://github.com/dracut-ng/dracut-ng/commit/4e520c88d9826cc1ed7b759472f747de35fc0eee)) * copy 20-systemd-stub.conf into the initrd ([0df92885](https://github.com/dracut-ng/dracut-ng/commit/0df928856150e674ce4cb04c0ceafae71d18d55b)) * **test:** running tests on bare metal fail with syntax error ([e26a4ab9](https://github.com/dracut-ng/dracut-ng/commit/e26a4ab9b3156660c84c2d8d39177218ec2d6bdf)) * **test-root:** dracut-getarg and dracut-lib are no longer used for test-root ([97e502c4](https://github.com/dracut-ng/dracut-ng/commit/97e502c444c4c19ee3892d36953138ac9e1a37c6)) #### Performance * **base:** /etc/initrd-release is only for systemd ([5bf724fa](https://github.com/dracut-ng/dracut-ng/commit/5bf724fa217ccd6011be4341d30eca05427b3415)) * **hwdb:** only include when another module requires it in hostonly ([7766da60](https://github.com/dracut-ng/dracut-ng/commit/7766da60f5dc045b5b709849a211bebf8077162e)) * **systemd:** remove crypto API kernel modules ([fa45d844](https://github.com/dracut-ng/dracut-ng/commit/fa45d84469b915ede2e72111d658df18bfb60a27)) #### Features * default config profile ([8c15bb61](https://github.com/dracut-ng/dracut-ng/commit/8c15bb6150934aa5ede384c6976e509ac2bf3215)) * systemd-battery-check dracut module ([7cf47b26](https://github.com/dracut-ng/dracut-ng/commit/7cf47b26fe2e8a1a6fcac301db74ae3dbbf523b0)) * create a documentation site ([77e0571c](https://github.com/dracut-ng/dracut-ng/commit/77e0571c29256e6951cc9a48c0d2ff5015a5f6b3)) * **Makefile:** * roll cleaninstall target into the install target ([9825dd7b](https://github.com/dracut-ng/dracut-ng/commit/9825dd7b271f7fa6f5d784a6de34eee3250e9a68)) * cleaninstall target ([dc40daa8](https://github.com/dracut-ng/dracut-ng/commit/dc40daa81d5a09221803c0a4ea37b359931463c6)) * **base:** create /proc if it does not exists ([ff370f55](https://github.com/dracut-ng/dracut-ng/commit/ff370f5517ee860d51f4f27089f99a738b0ba5a1)) * **configure:** * allow dracut-cpio to be disabled ([4a4ab928](https://github.com/dracut-ng/dracut-ng/commit/4a4ab928a49e81e02104ec5466160664e59c3965)) * let's build dracut-cpio if cargo is installed ([89a86dcb](https://github.com/dracut-ng/dracut-ng/commit/89a86dcb0a3248606824de50f5c63f61cfe0369c)) * **crypt:** remove empty /etc/crypttab to allow creating it later ([23ef35d3](https://github.com/dracut-ng/dracut-ng/commit/23ef35d3eddb49bd09df15a8f3f28244e1a4fa70)) * **dmsquash-live:** add support for rd.live.overlay.nouserconfirmprompt ([6ac1033c](https://github.com/dracut-ng/dracut-ng/commit/6ac1033c8d59e2324f56a2c453f14a0318cc7190)) * **dracut-init.sh:** give --force-add precedence over --omit ([a0d92d39](https://github.com/dracut-ng/dracut-ng/commit/a0d92d39891e4a8b61ff3a75ba46688306a1016a)) * **dracut-systemd:** install dracut-* into /usr/bin ([00902e25](https://github.com/dracut-ng/dracut-ng/commit/00902e25bb4b2a25a03c9ddec6b4c4c9f802650d)) * **dracut.install:** force hostonly for kernel-install plugin ([17706f9a](https://github.com/dracut-ng/dracut-ng/commit/17706f9a8781385769929e0407e5808c5c8c7e46)) * **fips:** include openssl's fips.so and openssl.cnf ([97c5d43c](https://github.com/dracut-ng/dracut-ng/commit/97c5d43ceb9d65bc0970f1e7ad44bc43bc93fc26)) * **livenet:** get live image size from TFTP servers ([93df9ad2](https://github.com/dracut-ng/dracut-ng/commit/93df9ad26122d3d4c0120e19c8da78b7cc69e653)) * **lsinitrd.sh:** look for initrd in /usr/lib/modules/ ([f01eec69](https://github.com/dracut-ng/dracut-ng/commit/f01eec692d222232c821426f453d3c66411ee34e)) * **nvmf:** enable other shells (dash) not just bash ([43707cab](https://github.com/dracut-ng/dracut-ng/commit/43707cabc86ab1d4a7f040ccfa2d2d673d00ce0e)) * **systemd-battery-check:** always include the module if possible ([961daa9d](https://github.com/dracut-ng/dracut-ng/commit/961daa9db49023c091fa87c86561ecb7eb371678)) * **systemd-emergency:** install rescue and emergency targets ([be7e87fb](https://github.com/dracut-ng/dracut-ng/commit/be7e87fbb7d7122cdc6386bac4e7bc5d32c6ad2f)) * **systemd-sysusers:** run systemd-sysusers as part of the build process ([f3dacc01](https://github.com/dracut-ng/dracut-ng/commit/f3dacc013d90bd2c0bbfa04f5f9b167b65298440)) #### Contributors - Jo Zzsi - Benjamin Drung - Ian Wienand - Laszlo Gombos - Antonio Alvarez Feijoo - Pavel Valena - dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - Martin Wilck - Fernando Fernandez Mancera - Jochen Sprickerhof - Andrew Ammerlaan - David Härdeman - George Mileka - Manuel Fombuena - Mike Gilbert - Nowa Ammerlaan - Nowa Ammerlaan - Patrick Schleizer dracut-ng-105 ============= Resolve a regression in release v104 that impacts generated initrds when both systemd and i18n dracut modules are included. #### Bug Fixes * **dmsquash-live:** checkisomd5 is installed into /usr/bin ([39887041](https://github.com/dracut-ng/dracut-ng/commit/398870413e98d85a574b06ca69e8613a1ac209be)) * **man:** * use US English spelling for initialization ([c12a018e](https://github.com/dracut-ng/dracut-ng/commit/c12a018eb89febfa550d478a97d4bfbdd39bda90)) * correct spelling of initramfs ([b5ada6cc](https://github.com/dracut-ng/dracut-ng/commit/b5ada6ccb618eec005f01b40a9f94eb149ff5b3d)) * **systemd:** remove typo from the dracut module name ([7d998705](https://github.com/dracut-ng/dracut-ng/commit/7d998705e15949dd4d62d2af9ae35171316b7ca5)) * **systemd-cryptsetup:** change the ordering for consistency ([43581cd0](https://github.com/dracut-ng/dracut-ng/commit/43581cd065821e82654237f0dd5493e3b828601f)) * **udev-rules:** move relevant rules from systemd ([1ef30c83](https://github.com/dracut-ng/dracut-ng/commit/1ef30c832f4a0b6e82b85fd6576057eae22f8d41)) #### Contributors - Jo Zzsi - Benjamin Drung dracut-ng-104 ============= New dracut modules: * shell-interpreter: meta package for improved shell selection * fips-crypto-policies: make c-p follow FIPS mode automatically * squash-lib: code shared by 95squash-{squashfs,erofs} Removed dracut modules: * ifcfg: no longer needed for networking * mksh: lack of interest to maintain Notable new features: * add --add-confdir option to dracut * new dracut configuration profiles under dracut.conf.d/ (e.g. for uki) * systemd-udevd: make systemd-sysctl, systemd-modules-load optional Notable bug fixes: * crypt: include systemd-cryptsetup module when needed * udev-rules: move installation of libkmod to udev-rules module * busybox: install busybox symlinks later in the generation process * nvmf: install (only) required nvmf modules * systemd: include systemd config files from /usr/lib/systemd * systemd: trigger systemd-vconsole-setup.service only on demand * multipath: include module with "find_multipaths strict" * nfs: include also entries from /usr/lib/{passwd,group} * network: handle '-m network' * systemd-networkd: remove basename dependency * remove obsolete syntax for many command line options without the rd. prefix The project builds test containers daily for the following Linux distributions: Alpine, Arch, Debian (amd64 and arm64), Fedora (amd64 and arm64), Gentoo, openSUSE, Ubuntu, Void These Linux distributions test dracut in various configurations (systemd/OpenRC/runit, glibc/musl, dhclient/NetworkManager/systemd-networkd). #### Features * config example for cloud provider uki vm ([cc0a0e42](https://github.com/dracut-ng/dracut-ng/commit/cc0a0e420df6120fa81b8c12b47865dc7825d1f4)) * add common config when networking is not desired ([9ffabd59](https://github.com/dracut-ng/dracut-ng/commit/9ffabd5916605be5052faa1256f29feafbc83b1e)) * **busybox:** use busybox --install to install itself ([3975e26a](https://github.com/dracut-ng/dracut-ng/commit/3975e26a84cd8645b15d0a863263a63da93650e0)) * **dracut:** detect kernel initrd support ([b41c2401](https://github.com/dracut-ng/dracut-ng/commit/b41c24019321232a22062955254bd3eb2f002b4a)) * **dracut-functions:** check more paths ([ede2a05a](https://github.com/dracut-ng/dracut-ng/commit/ede2a05a6e44f6c73eca79e1fd4803927d334511)) * **dracut-init.sh:** allow changing the destination directory for inst et al ([3ad7e6c2](https://github.com/dracut-ng/dracut-ng/commit/3ad7e6c23bdcac7c7f6adc8a2cb31bab3c37038a)) * **dracut-initramfs-restore:** unpack erofs images ([ce83d38d](https://github.com/dracut-ng/dracut-ng/commit/ce83d38dfa30507382b00219f9e009dbb10e3c72)) * **dracut.sh:** add --add-confdir option ([6107f5e5](https://github.com/dracut-ng/dracut-ng/commit/6107f5e54fb82f1c00285a4cc709b04f29eee460)) * **fips:** add support for UKIs ([1000265a](https://github.com/dracut-ng/dracut-ng/commit/1000265a185c5156e0e0ba218bca23a9f1031f60)) * **fips-crypto-policies:** make c-p follow FIPS mode automatically ([bd3c1e1c](https://github.com/dracut-ng/dracut-ng/commit/bd3c1e1cc2f656f7ee4ff47e00ca716d52a86a3d)) * **lsinitrd:** add support for erofs images ([2a3bc5af](https://github.com/dracut-ng/dracut-ng/commit/2a3bc5af412929a638559a9e530c00a53932a606)) * **pcmcia:** only include when another module requires it ([ea4199b3](https://github.com/dracut-ng/dracut-ng/commit/ea4199b38c097fa4dc059dd52740af91111145b5)) * **rescue:** move command line arguments to 50-rescue.conf ([d24917fa](https://github.com/dracut-ng/dracut-ng/commit/d24917fa1907d67d3e422139a2bf0866bf0dc26d)) * **shell-interpreter:** meta package for improved shell selection ([e1fcfe64](https://github.com/dracut-ng/dracut-ng/commit/e1fcfe64fb439ae71fc6babcaac3c6bc834b00a9)) * **squash:** * add module 95squash-erofs ([ebc9e84d](https://github.com/dracut-ng/dracut-ng/commit/ebc9e84dd3bdcb3fc2899431cb46bc12bd986294)) * split 95squash-squashfs from 99squash ([5d03cc3b](https://github.com/dracut-ng/dracut-ng/commit/5d03cc3be869268ec07cf2c2ec74f008dde3e110)) * move mksquashfs to 99squash/modules-setup ([b5482f07](https://github.com/dracut-ng/dracut-ng/commit/b5482f0726e02e6c6484377725345109c204fb03)) * **systemd:** always install libsystemd libraries ([921792f2](https://github.com/dracut-ng/dracut-ng/commit/921792f201e954de461d3b551e01b5369d666db8)) * **systemd:** include systemd config files from /usr/lib/systemd ([6c99c073](https://github.com/dracut-ng/dracut-ng/commit/6c99c07327b9600f18fcf97564f427610453a771)) * **test-root:** only include debug module if V is set to 2 ([8974fea2](https://github.com/dracut-ng/dracut-ng/commit/8974fea2f92a63a10e48ad9aee9ccc02c5e78883)) #### Bug Fixes * install test infrastructure ([a0d12aa7](https://github.com/dracut-ng/dracut-ng/commit/a0d12aa7dd6d4304955de1407a35dda87ee86b54)) * typo in variable name ([76b2f1a9](https://github.com/dracut-ng/dracut-ng/commit/76b2f1a9b52afd4203c1d0e6afb57314bbfe8407)) * **Dockerfile-Gentoo:** explicitly pull in all build dependencies ([2f8ea1c9](https://github.com/dracut-ng/dracut-ng/commit/2f8ea1c90175b3fbe8c98621776a7d3456c78c56)) * **Makefile:** install dracut config examples under /usr ([0d369e3e](https://github.com/dracut-ng/dracut-ng/commit/0d369e3e30935dffe48dfff1e90463868e7f804a)) * **base:** * init from base is not needed when systemd is enabled ([ae94b24f](https://github.com/dracut-ng/dracut-ng/commit/ae94b24f2370db490593dd35b2cfea57aa7dbfe5)) * remove the undocumented real_init, realinitpath and rd.distroinit ([b1dbe859](https://github.com/dracut-ng/dracut-ng/commit/b1dbe859a9b6ca4bc60a0bf94ace660414207b51)) * **busybox:** * install busybox symlinks later in the generation process ([4e78a870](https://github.com/dracut-ng/dracut-ng/commit/4e78a8705e19562f5659e352612e50905c4be12a)) * install busybox symlinks manually ([95ba0327](https://github.com/dracut-ng/dracut-ng/commit/95ba03270eb3297103cba276c2925ecc1b762926)) * **crypt:** * include systemd-cryptsetup module when needed ([8907ba12](https://github.com/dracut-ng/dracut-ng/commit/8907ba124e9dcd57049c2ccb4fd20b98b3bd83c2)) * install dm_crypt module in non-hostonly mode as well ([59af2fff](https://github.com/dracut-ng/dracut-ng/commit/59af2fff515539e4b47ddc955d0c61a3829c85c4)) * **dracut:** * --list-modules should imply --no-kernel as well ([bd7736e9](https://github.com/dracut-ng/dracut-ng/commit/bd7736e9823d3be580d6320e2cefad97d0b33edd)) * don't apply aggressive strip to kernel modules ([a1c51af1](https://github.com/dracut-ng/dracut-ng/commit/a1c51af1bf5809a8f6deb246ef6ae3f25608d6a3)) * do not add all lib subdirs to `LD_LIBRARY_PATH` with `--sysroot` ([d0c82322](https://github.com/dracut-ng/dracut-ng/commit/d0c82322ce1b44e72539b6dd537711afb68f081e)) * ldd output borked with `--sysroot` ([e0b87682](https://github.com/dracut-ng/dracut-ng/commit/e0b876823d9c608db7132cab9e5edd62543a27ae)) * re-enable extended attributes in containers ([c964a56f](https://github.com/dracut-ng/dracut-ng/commit/c964a56fde168212422fdf37ecb835dfe409f4a7)) * **dracut-fuctions.sh:** avoid reading the wrong kconfig ([d8fb0ef8](https://github.com/dracut-ng/dracut-ng/commit/d8fb0ef8d9d6c0bada3e21e7a3801e5ba9fc2cdb)) * **dracut-functions:** allow for \ in get_maj_min file path ([91b1574c](https://github.com/dracut-ng/dracut-ng/commit/91b1574c4a19be297b893791192049612467694b)) * **dracut-functions.sh:** only return block devices from get_persistent_dev ([6611c6e4](https://github.com/dracut-ng/dracut-ng/commit/6611c6e4a0166bec50cc567b708ec7265dc82682)) * **dracut-init.sh:** add module to mods_to_load before checking dependencies ([d0f8fde5](https://github.com/dracut-ng/dracut-ng/commit/d0f8fde5668cfd7fda1d15824e268b4949b4fd04)) * **dracut-install:** * use correct data type for pid ([36dc45ca](https://github.com/dracut-ng/dracut-ng/commit/36dc45ca74ba675ac6a331459d850a15fdcbb2d6)) * handle correctly sysrootdir with trailing '/' ([1c44cd71](https://github.com/dracut-ng/dracut-ng/commit/1c44cd71a87967c5d8094a3d37ab2598dbd1ef12)) * do not assume handled path starts with sysrootdir ([7bc1f538](https://github.com/dracut-ng/dracut-ng/commit/7bc1f5383df58ed93ad4827634042f92ade4b20a)) * resolve -Wextra warnings ([8de0258d](https://github.com/dracut-ng/dracut-ng/commit/8de0258d71dc5600d715d7534471e35b2b75c7be)) * refuse empty DRACUT_LDD environment variable ([a9e11447](https://github.com/dracut-ng/dracut-ng/commit/a9e1144713056248c8ca0e0e4a2f3a08a12b89b2)) * **dracut-systemd:** include systemd-cryptsetup module when needed ([e0e5424a](https://github.com/dracut-ng/dracut-ng/commit/e0e5424a7b5e387ccb70e47ffea5a59716bf7b76)) * **dracut.sh:** * exit when installing the squash loader fails ([abac41d0](https://github.com/dracut-ng/dracut-ng/commit/abac41d0fa3c69dd4dc717fedd61502affa2799e)) * use only compressor that kernel supports ([cc17951e](https://github.com/dracut-ng/dracut-ng/commit/cc17951ec350d0e3a8f95550579d4515c18a4649)) * account for the kernel being named kernel ([c520f3a4](https://github.com/dracut-ng/dracut-ng/commit/c520f3a49ddb7b7225cdac4dd3c4d9f68e7d105c)) * **fips-crypto-policies:** make it depend on fips dracut module ([a2096daf](https://github.com/dracut-ng/dracut-ng/commit/a2096dafdbfc88eed91ce34b1f4d27e7eb7ca839)) * **hwdb:** only install /etc/udev/udev.hwdb in hostonly mode ([f2b1491f](https://github.com/dracut-ng/dracut-ng/commit/f2b1491f8461c331f501680291d6ceed6c2a718e)) * **lsinitrd:** check skipcpio file directly ([2815f021](https://github.com/dracut-ng/dracut-ng/commit/2815f021fd7947364c4344da479803983ffaba25)) * **lvm:** clean up whitespace in messages ([5e9cb283](https://github.com/dracut-ng/dracut-ng/commit/5e9cb2832f5b129dbbfdd3e9c040da978e960f56)) * **man:** update description of the --gzip option ([206b5448](https://github.com/dracut-ng/dracut-ng/commit/206b54481ccc031763714052545c6e7779ea3c5e)) * **multipath:** include module with "find_multipaths strict" ([1e802f15](https://github.com/dracut-ng/dracut-ng/commit/1e802f15fee3d6402d83e0efefef8bb88c5a33e3)) * **network:** * call both check_module and module_check ([c81c9552](https://github.com/dracut-ng/dracut-ng/commit/c81c9552650971717f99118a295c3c3840da3209)) * handle '-m network' ([c4b57722](https://github.com/dracut-ng/dracut-ng/commit/c4b57722fbe65dce49105ad264dde2c2bbfc8a41)) * **nfs:** include also entries from /usr/lib/{passwd,group} ([d954e3a9](https://github.com/dracut-ng/dracut-ng/commit/d954e3a9e83c28e1509186c6a668a6f6c0bd4591)) * **nvmf:** * install (only) required nvmf modules ([3748ed4d](https://github.com/dracut-ng/dracut-ng/commit/3748ed4db5255c516cd60c2d710532d79878a498)) * require NVMeoF modules ([41332702](https://github.com/dracut-ng/dracut-ng/commit/4133270236f99d2196b2c1d05dfab76aae2f8092)) * **release:** improve commit message ([267d002c](https://github.com/dracut-ng/dracut-ng/commit/267d002cbb63a59d47a2d7273d62757f9763b4d2)) * **rescue:** make rescue always no-hostonly ([224c0091](https://github.com/dracut-ng/dracut-ng/commit/224c00914bfb4ba1dee48e094ebb137facfd5947)) * **rngd:** install system service file ([a9528201](https://github.com/dracut-ng/dracut-ng/commit/a9528201bea5182c72556731ef7944259fbe3fc8)) * **squash:** * remove cyclic dependency ([5f6b6fa4](https://github.com/dracut-ng/dracut-ng/commit/5f6b6fa4dc0b2f6a174e98f557fd595bdd92d361)) * use 99busybox instead of installing it manually ([69ebcb58](https://github.com/dracut-ng/dracut-ng/commit/69ebcb5850b5ceb27d5fd5fee6a5d2857d38b828)) * explicitly create required directories ([d23b0eea](https://github.com/dracut-ng/dracut-ng/commit/d23b0eeaa6a985b60b3a7f278f8e8fb1a63a0ae3)) * **squash-erofs:** properly exclude $squashdir ([323af181](https://github.com/dracut-ng/dracut-ng/commit/323af1817405b64a154ae1b01f5aca180a2801fa)) * **squash-lib:** harden against empty $initdir ([924e2e85](https://github.com/dracut-ng/dracut-ng/commit/924e2e85d9731b4e1d3852bc3a4a5d045024051a)) * **systemd:** * do not set unused target as the default ([982735c7](https://github.com/dracut-ng/dracut-ng/commit/982735c790cabade82f520ddda8e6c3733cb6571)) * /sbin/init is not required inside initrd ([a066b07f](https://github.com/dracut-ng/dracut-ng/commit/a066b07fbdc5cad5c3cb9873d987a432cbed14e2)) * systemd-vconsole-setup has a dependency on loadkeys ([55517460](https://github.com/dracut-ng/dracut-ng/commit/5551746088633116a28f3ded9d7003f378b6cd17)) * remove duplicate systemd cryptsetup targets ([ad520855](https://github.com/dracut-ng/dracut-ng/commit/ad520855113d99d7551a7ab6c19870736f72cbc4)) * make nologin optional ([953b48a7](https://github.com/dracut-ng/dracut-ng/commit/953b48a7e7a4057c7d694c29cc30ea993b946e55)) * move installation of libkmod to udev-rules module ([ef0972fe](https://github.com/dracut-ng/dracut-ng/commit/ef0972fe5349bdf6e821cb79a47cf412caf99059)) * **systemd-cryptsetup:** install cryptsetup-pre.target ([181e1f11](https://github.com/dracut-ng/dracut-ng/commit/181e1f116b74d1e4ee400f72f7440b78a4c4d1f1)) * **systemd-initrd:** add base as dependency ([56c84cde](https://github.com/dracut-ng/dracut-ng/commit/56c84cdece4bff04ed9db213f49d052d994df04d)) * **systemd-networkd:** * remove basename dependency ([2bb74448](https://github.com/dracut-ng/dracut-ng/commit/2bb7444850b57893a6c6c875da69109b83da5090)) * make sure default network is always last ([e1dfdaca](https://github.com/dracut-ng/dracut-ng/commit/e1dfdaca22d5074a6a3d8fcf6df080752b84803d), closes [#618](https://github.com/dracut-ng/dracut-ng/issues/618)) * **systemd-sysctl:** systemd-modules-load is not a dependency ([4fb67460](https://github.com/dracut-ng/dracut-ng/commit/4fb6746085aaceed4822bf7c8ee13193e2ef46fe)) * **systemd-udevd:** make systemd-sysctl, systemd-modules-load optional ([1de08390](https://github.com/dracut-ng/dracut-ng/commit/1de083908d5065af585c0a657c43f8ad16a19868)) * **test:** always install kernel modules ([9c79e226](https://github.com/dracut-ng/dracut-ng/commit/9c79e22694332a0e6b59f92391fe7e05919de485)) * **udev-rules:** * remove systemd-specific rules ([6243b7b6](https://github.com/dracut-ng/dracut-ng/commit/6243b7b623680aa1f431c962832a6f877b60afdb)) * move *-persistent-storage.rules to rootfs-block ([d67251aa](https://github.com/dracut-ng/dracut-ng/commit/d67251aaa5529e521e0a0ca4d28dc938a98a6226)) * install dropins for udev.conf ([bdaa4e5b](https://github.com/dracut-ng/dracut-ng/commit/bdaa4e5b0145214fa154465a92a80783a46aba9a)) * **watchdog:** change the priority of watchdog kernel modules ([0097ded1](https://github.com/dracut-ng/dracut-ng/commit/0097ded1de21f8a7f9453a5e1c03195f985a053f)) #### Performance * **systemd-initrd:** * do not depend on base module ([06074459](https://github.com/dracut-ng/dracut-ng/commit/06074459b9536a03f67bc6b6e09da0b2b510bd67)) * initrd.target is already the default ([b7b4f039](https://github.com/dracut-ng/dracut-ng/commit/b7b4f03987a0ffbd2b8ee585b84f852e512f000d)) #### Contributors - Jo Zzsi - Laszlo Gombos - Philipp Rudo - Antonio Alvarez Feijoo - Pavel Valena - Andrew Ammerlaan - Marcos Mello - Martin Wilck - Matteo Croce - Ondrej Kubik - Alexander Tsoy - Clemens Lang - David Teigland - Dorina Kovacs - Fabian Henze <1144183+flyser@users.noreply.github.com> - Fabian Vogt - Jochen Sprickerhof - Kairui Song - Lichen Liu - Mike Gilbert - Mike Schwarz - Neal Gompa - Timo Rothenpieler - Vitaly Kuznetsov dracut-ng-103 ============= New dracut modules introduced by this release: - hwdb: separate out hwdb module Notable new features: - erofs support for dmsquash-live module - install platform/chrome modules on ARM/RISC-V - force the inclusion of crypttab entries with x-initrd.attach - configuration files for common packaging options (50-hostonly.conf.example) Commits that resolve notable regressions: - perf(dracut-install): memoize find_kmod_module_from_sysfs_node - perf(dracut-install): use driver/module sysfs dirs for module name - fix(crypt): decryption when rd.luks.name is set - fix(systemd-pcrphase): make tpm2-tss an optional dependency The project builds test containers daily for the following Linux distributions: - Alpine, Arch, Debian (amd64 and arm64), Fedora (amd64 and arm64), Gentoo, openSUSE, Ubuntu, Void - These Linux distributions test dracut in various configurations (systemd/OpenRC/runit, glibc/musl, dhclient/NetworkManager/systemd-networkd). #### Features * add common config for Integrity Measurement ([5d9fe8c5](https://github.com/dracut-ng/dracut-ng/commit/5d9fe8c5020ff7e895ddfc3a88cab98d4e7a67ea)) * add additional common configs ([69e119da](https://github.com/dracut-ng/dracut-ng/commit/69e119daea14cb25fed2ed8134d628f3b233108d)) * **crypt:** force the inclusion of crypttab entries with x-initrd.attach ([61ab3386](https://github.com/dracut-ng/dracut-ng/commit/61ab3386e83a9bd219dcaa05c6499fec56d092b8)) * **debug:** add findmnt to help debugging ([41d61114](https://github.com/dracut-ng/dracut-ng/commit/41d61114e2eaca20824660aafc0ffae56d09d395)) * **dmdquash-live:** add support for using erofs ([ca5ae5d3](https://github.com/dracut-ng/dracut-ng/commit/ca5ae5d3466eec40d118fc96d450478aa6faebb6)) * **dracut:** search for zstd compressor first ([9663307c](https://github.com/dracut-ng/dracut-ng/commit/9663307ceb244ae6293e090f418f9888d6dff8bf)) * **dracut-install:** * configure if weak dep is still not supported in kmod ([77c3efa6](https://github.com/dracut-ng/dracut-ng/commit/77c3efa67e1ad724a441eb3341b3fc8a3d9684b6)) * add weak dependencies support ([8517a6be](https://github.com/dracut-ng/dracut-ng/commit/8517a6be5e20f4a6d87e55fce35ee3e29e2a1150)) * add hashmap_get_exists() ([2b13d74d](https://github.com/dracut-ng/dracut-ng/commit/2b13d74d4429c8c242a610f10b8389c7e46ff835)) * **hwdb:** separate out hwdb module ([3c5d5e39](https://github.com/dracut-ng/dracut-ng/commit/3c5d5e398e80b51527420bd9112c37536df219a5)) * **kernel-modules:** install platform/chrome modules on ARM/RISC-V ([e69e4132](https://github.com/dracut-ng/dracut-ng/commit/e69e41326241c8fa538a5c4383c16ddbab296e6f)) * **lsinitrd.sh:** support configurable initrd filenames ([7c11c8cf](https://github.com/dracut-ng/dracut-ng/commit/7c11c8cfa4d12389705f447efb130a675cf48b53)) * **multipath:** warn if included with no multipath devices and no user conf ([ae1b1003](https://github.com/dracut-ng/dracut-ng/commit/ae1b1003305f1553c057970d07a917deb255b7ef)) * **qemu:** include the virtio_crypto kernel module ([0fe20f85](https://github.com/dracut-ng/dracut-ng/commit/0fe20f85d02cd8496d27b85844307afc9523026b)) * **test:** * add erofs-utils to the containers ([e11bc8bf](https://github.com/dracut-ng/dracut-ng/commit/e11bc8bfbd86b8eddb1f4c4f75ba35b1c97fffa1)) * support V=2 without logtee ([3f005c8a](https://github.com/dracut-ng/dracut-ng/commit/3f005c8aa3436d70328a833d551a6e9a175c1332)) #### Bug Fixes * check for searched initrds to be present ([9c396ce2](https://github.com/dracut-ng/dracut-ng/commit/9c396ce29fc9e2ced6ebddbdf43fb31a672c2c37)) * rename dracut.conf.d .conf files to conf.example ([ddc9e4e9](https://github.com/dracut-ng/dracut-ng/commit/ddc9e4e922e91e0a2ea5d17035c45d8dab674b6f)) * disable SC2317 for calls by for_each_host_dev_and_slaves ([23c9d85a](https://github.com/dracut-ng/dracut-ng/commit/23c9d85a1fdcc31d175a27fd2dc3ac2789e528ef)) * quote single CTTY parameter ([61d93421](https://github.com/dracut-ng/dracut-ng/commit/61d93421aa949c9022efab37aafadb2203aba537)) * address shellcheck SC2166 ([d3802b10](https://github.com/dracut-ng/dracut-ng/commit/d3802b10b3f9d1f887546ea42b0e014c8ec76d74)) * move shellcheck SC3045 override to occurrences ([e1728ee9](https://github.com/dracut-ng/dracut-ng/commit/e1728ee9763dc9917de77dcb2d128d6363b3f05f)) * **01fips:** replace read -d that is not supported by dash ([15b94c44](https://github.com/dracut-ng/dracut-ng/commit/15b94c4403188cafc6f401f1430bd3692bd7cef8)) * **90kernel-modules:** install blk modules using symbol blk_alloc_disk ([194ef8eb](https://github.com/dracut-ng/dracut-ng/commit/194ef8ebbf113c48b97ada4981bf50e87d6b0204)) * **Dockerfile-Gentoo:** add requirements for systemd-pcrphase ([f7e19b3a](https://github.com/dracut-ng/dracut-ng/commit/f7e19b3a11a2e03c01984a13df119184a6206997)) * **TEST-35-ISCSI-MULTI:** increrase storage space ([9f183a98](https://github.com/dracut-ng/dracut-ng/commit/9f183a9815c480b92a05e7c92abef4f6281350fb)) * **TEST-40-NBD:** * disable broken tests ([eb32b30b](https://github.com/dracut-ng/dracut-ng/commit/eb32b30b73b6846048d219a7b304bc8e57c53119)) * return actual test run result from test_run() ([cfe3ce3c](https://github.com/dracut-ng/dracut-ng/commit/cfe3ce3cee04669291e7b412a1f9730a59ad8f66)) * enable serial console for test runs ([1993786f](https://github.com/dracut-ng/dracut-ng/commit/1993786f8aa183ce44705fce2a748cefdd2ed5c9)) * don't double-pass test dir to marker check ([5928c938](https://github.com/dracut-ng/dracut-ng/commit/5928c938590c69ef297d2f86dd0eb27080c0e03f)) * **TEST-NFS:** use --add instead of --modules to create test-makeroot ([0a94eab6](https://github.com/dracut-ng/dracut-ng/commit/0a94eab66d330dd3d01593fd474103e8fb9e4ad7)) * **convertfs:** * drop unused find_mount function ([04628fc4](https://github.com/dracut-ng/dracut-ng/commit/04628fc4ae37bb0f32c426e9a3661f9bb2ead1ab)) * disable SC2317 for EXIT trap function ([6668694d](https://github.com/dracut-ng/dracut-ng/commit/6668694df0895a9aa61f859b8b618a4bb65b3178)) * quote single CP_HARDLINK variable ([00ba4dae](https://github.com/dracut-ng/dracut-ng/commit/00ba4dae4e392942c9090723133f3acba1731962)) * **crypt:** decryption when rd.luks.name is set ([015a0fa6](https://github.com/dracut-ng/dracut-ng/commit/015a0fa63367f6e48fd9edd7808305877276ed7f)) * **dbus:** drop unreachable return statement ([c3764b92](https://github.com/dracut-ng/dracut-ng/commit/c3764b925ae0a9aab2a2db86a77a02e48f6a4d96)) * **dbus-daemon:** actually enable the dbus service and socket ([71f2ff50](https://github.com/dracut-ng/dracut-ng/commit/71f2ff50f55f24b4435aff6143fc3041db6f3d1d)) * **dmsquash-live:** * make sure erofs module is installed ([e52cf3c1](https://github.com/dracut-ng/dracut-ng/commit/e52cf3c128b3b818a5830b6d92e257084d34b3dc)) * quote variables ([5391fa2e](https://github.com/dracut-ng/dracut-ng/commit/5391fa2e671f3ed78e0346bd1f7de47abcb7fe73)) * **dmsquash-live-autooverlay:** quote variables ([24ab9e66](https://github.com/dracut-ng/dracut-ng/commit/24ab9e66d0421eb8441b62f5a7dad3b7e3e0324f)) * **dracut:** * microcode loading named .initramfs ([cd3f04ab](https://github.com/dracut-ng/dracut-ng/commit/cd3f04ab9d7521f59bbd7fde489584aba5db5384)) * address shellcheck SC2004 ([79e372de](https://github.com/dracut-ng/dracut-ng/commit/79e372def132818df988f821d3e60dd9137fee01)) * quote strip_cmd variable ([538689bc](https://github.com/dracut-ng/dracut-ng/commit/538689bc723f096341fbf780fd7b4ec1f023e085)) * **dracut-catimages.sh:** drop unused dwarning function ([34bf2fe4](https://github.com/dracut-ng/dracut-ng/commit/34bf2fe40308ee67a3d555cc475af230f983e958)) * **dracut-functions:** avoid awk in get_maj_min() ([ec7efd57](https://github.com/dracut-ng/dracut-ng/commit/ec7efd5701e9a1b24f2e85666d625fb1fe46ce86)) * **dracut-init:** change lookup order for rules files ([46932e33](https://github.com/dracut-ng/dracut-ng/commit/46932e33536e2223f297dc7369bd14d8b578caa3)) * **dracut-init.sh:** * clarify the error message ([f83d8f90](https://github.com/dracut-ng/dracut-ng/commit/f83d8f90a15812ea260032d05885c989665b5933)) * quote dracutbasedir variable ([5969b230](https://github.com/dracut-ng/dracut-ng/commit/5969b2306d65c231a2a6be89f1ca13862287dac3)) * **dracut-initramfs-restore.sh:** correct initrd globbing ([cc5e8d6f](https://github.com/dracut-ng/dracut-ng/commit/cc5e8d6f9ff965e91a749a653c7114cb04edb358)) * **dracut-install:** copy xattr when use clone ioctl ([3e1d0bc1](https://github.com/dracut-ng/dracut-ng/commit/3e1d0bc1df6fcc5649e38d1016f05712f634b2f5)) * **dracut-lib:** * quote _ctty variable ([22910365](https://github.com/dracut-ng/dracut-ng/commit/2291036520413379932e41ff22d704cd3397e76f)) * quote var variable ([7a277629](https://github.com/dracut-ng/dracut-ng/commit/7a277629b5c37ab5bf7a39605e8d1546c0086835)) * quote _b variable ([e4ec0d33](https://github.com/dracut-ng/dracut-ng/commit/e4ec0d3397d0f10abb69a4c91d1c6b448f986d02)) * **dracut-logger.sh:** * disable SC2317 for logger functions ([c77365ce](https://github.com/dracut-ng/dracut-ng/commit/c77365ce2c38cd9d1cd4aab27edd0fab14950ced)) * quote _dlogfd variable ([89eddc42](https://github.com/dracut-ng/dracut-ng/commit/89eddc420f00f0c1b790b960c1e5abc348b98722)) * **dracut.sh:** drop unused read_arg function ([a9ea0175](https://github.com/dracut-ng/dracut-ng/commit/a9ea01755edb4a63518234b52c25e240b4c6e1d3)) * **fips:** remove reference to kernel module zlib in fips module ([22f451d5](https://github.com/dracut-ng/dracut-ng/commit/22f451d57585cb01ee5a84ef73d104110cb7d422)) * **iscsi:** address shellcheck SC2319 ([54676c83](https://github.com/dracut-ng/dracut-ng/commit/54676c83d1101d709a958d1a87e6d8508b360c3b)) * **lsinitrd.sh:** disable SC2317 for cat functions ([f62049b2](https://github.com/dracut-ng/dracut-ng/commit/f62049b251d66c0c8f755a0a2e769cfe90b9b901)) * **lunmask:** quote LUN variable ([d20be112](https://github.com/dracut-ng/dracut-ng/commit/d20be112231d89e220f97bb4adb0b5db572bbc24)) * **lvmthinpool-monitor:** adress shellcheck SC2319 ([199f4108](https://github.com/dracut-ng/dracut-ng/commit/199f410861d2e2204ec77045fcf37a21fe31bdfe)) * **man:** clarify semantics for --kernel-cmdline ([aba502f3](https://github.com/dracut-ng/dracut-ng/commit/aba502f324b957bc625462b39748f4aca1650225)) * **mdraid:** try to assemble the missing raid device ([3fd43858](https://github.com/dracut-ng/dracut-ng/commit/3fd4385873bb82ae9f759ef5af32bf1732d298b4)) * **multipath:** * omit module if included with no multipath devices ([377d52cb](https://github.com/dracut-ng/dracut-ng/commit/377d52cb9867dc4074fe78965e1bfcdf80be14a1)) * omit module if included with no multipath devices ([4957ffa9](https://github.com/dracut-ng/dracut-ng/commit/4957ffa935ea8c393c8fed867f6051da4ca43d58)) * **net-lib:** require and install only the necessary binaries ([29609268](https://github.com/dracut-ng/dracut-ng/commit/29609268b74472cbf4ac02f83e1edd9609169de2)) * **network:** deprioritize connman for network selection ([dec4978f](https://github.com/dracut-ng/dracut-ng/commit/dec4978fa06252d69c63a5939adb6d706195fe96)) * **network-legacy:** quote bridgename variable ([bc166ece](https://github.com/dracut-ng/dracut-ng/commit/bc166ece9924793c53ac43ce7505669d5b84b829)) * **nfs:** * support rpcbind user named _rpc ([4a236f01](https://github.com/dracut-ng/dracut-ng/commit/4a236f015905f598e2976ae6f0f460ec9a567f2b)) * quote rpcpipefspath variable ([58a46715](https://github.com/dracut-ng/dracut-ng/commit/58a46715598185d0fd836847abc2fdd6408a736b)) * **release:** version lock clog ([58d4d7d6](https://github.com/dracut-ng/dracut-ng/commit/58d4d7d683cfaa1455ed3be8430613e8251cfeab)) * **rt:** use singular argument for timeout value ([e2e6579a](https://github.com/dracut-ng/dracut-ng/commit/e2e6579afa49b7878bf03327f16b2ddabd139380)) * **shell-completion:** remove hashbang from bash completions ([c50e742c](https://github.com/dracut-ng/dracut-ng/commit/c50e742c530f114c50ef9a2b63e0cc6d0150838a)) * **syslog:** quote conf variable ([28e1b17b](https://github.com/dracut-ng/dracut-ng/commit/28e1b17b750ef7d8a269fa50d7ab0e43fd7b3ebd)) * **systemd:** check for systemd-vconsole-setup.service ([5a3ad259](https://github.com/dracut-ng/dracut-ng/commit/5a3ad259aca1a0ed09dccdb0db5873cd5b94f666)) * **systemd-hostnamed:** * also enable socket units ([133978d9](https://github.com/dracut-ng/dracut-ng/commit/133978d96c9dbf02e9bfbf8214111540c6e1d6ab)) * add missing systemd-hostnamed.socket ([f25bb1e2](https://github.com/dracut-ng/dracut-ng/commit/f25bb1e2b27cb3246e6fc51a33b13775e4f4ffce)) * **systemd-networkd:** * remove default network if others were generated ([02a1ea4b](https://github.com/dracut-ng/dracut-ng/commit/02a1ea4b308aeb339dcddf90b489b7de86e12149)) * add support for proper netroot invocation ([0e1e7871](https://github.com/dracut-ng/dracut-ng/commit/0e1e78711502347412e2c0a0621773f034332499)) * this module depends on systemd ([1aa2e4ff](https://github.com/dracut-ng/dracut-ng/commit/1aa2e4ffe7e04bb57ca57bc7cd3d38a7d5d3dc33)) * **systemd-pcrphase:** * make tpm2-tss an optional dependency ([a2193b71](https://github.com/dracut-ng/dracut-ng/commit/a2193b71f7be75f719eec29faacae36ab25e9147)) * in hostonly mode do not try to include systemd-pcrphase ([96d153fe](https://github.com/dracut-ng/dracut-ng/commit/96d153fe927987ce31a1f876b7eeea6fe9cee06a)) * **test:** * run test 14 with systemd again ([43fa0c4e](https://github.com/dracut-ng/dracut-ng/commit/43fa0c4e36c78566421092c63239985806a6610c)) * reenable extended tests for Arch ([130f4dfc](https://github.com/dracut-ng/dracut-ng/commit/130f4dfce48b187944be9a0cacca794dd32428ad)) * tests needs more storage space ([96aa5073](https://github.com/dracut-ng/dracut-ng/commit/96aa5073e38622fa431daec0c7237b71670de703)) * use --add instead of --modules to create test-makeroot ([51d06540](https://github.com/dracut-ng/dracut-ng/commit/51d06540d19e4702ec61de6d2b5e2e68e8593b01)) * use `-cpu max` by default ([44f5359f](https://github.com/dracut-ng/dracut-ng/commit/44f5359fe068d4c925777cf5291d8c64894bff4b)) * **test-root:** quote _terminfodir variable ([db4ea5f3](https://github.com/dracut-ng/dracut-ng/commit/db4ea5f3cf3850432db411fab084fbc831ed043f)) * **udev-rules:** install all rules even if systemd is not installed ([df8bf213](https://github.com/dracut-ng/dracut-ng/commit/df8bf213566ed1ac886775e2d6cb935119acbf20)) * **zipl:** * quote zipl_env variable ([39b1ffa2](https://github.com/dracut-ng/dracut-ng/commit/39b1ffa2ea05cb20371bb9fc3b1bd2d386d419d3)) * quote ID_FS_TYPE variable ([34da5799](https://github.com/dracut-ng/dracut-ng/commit/34da5799512365513a4060fe41656d125d3db609)) * **znet:** quote initdir variable ([79dbd435](https://github.com/dracut-ng/dracut-ng/commit/79dbd435bc500000877765e13bea69a83724e8d2)) #### Performance * **dracut-install:** * use driver/module sysfs dirs for module name ([d71bec4a](https://github.com/dracut-ng/dracut-ng/commit/d71bec4aa444d92820e428c0629d0e75e268c815)) * memoize find_kmod_module_from_sysfs_node ([6500e954](https://github.com/dracut-ng/dracut-ng/commit/6500e95494175819b382acbac8eafcdf72fabd6d)) * preload kmod resources for quicker module lookup ([5a3f3773](https://github.com/dracut-ng/dracut-ng/commit/5a3f377300ee38a573a5a29f534e926106805bb6)) #### Contributors - Laszlo Gombos - Benjamin Drung - BtbN - Antonio Alvarez Feijoo - Brian C. Lane - Alper Nebi Yasak - Cornelius Hoffmann - Hector Martin - Jose Ignacio Tornos Martinez - Andrew Ammerlaan - Cameron Baird - Daniel McIlvaney - David Tardon - Huaxin Lu - Ian Wienand - Lidong Zhong - Louis Sautier - Paul Charlton - Pavel Valena - Timo Rothenpieler dracut-ng-102 ============= This release includes fixes for compatibility with the latest Linux kernel (v6.9), Linux firmware, and systemd (v256). New dracut modules introduced by this release: - pcmcia: factor out pcmcia support into its own module - systemd-bsod: display a blue screen which contains a message relating to a boot failure - numlock: module to turn Num Lock on - systemd-cryptsetup: factor out systemd-cryptsetup support into its own module dracut modules removed by this release: - dasd_rules: remove dasd handling consolidated in s390-tools - qeth_rules: remove qeth handling consolidated in 95znet - zfcp_rules: remove zfcp handling consolidated in s390-tools The project builds test containers daily for the following Linux distributions: - Alpine - Arch - Debian (amd64 and arm64) - Fedora (amd64 and arm64) - Gentoo - openSUSE - Ubuntu - Void These Linux distributions test dracut in various configurations (systemd/OpenRC/runit, glibc/musl, dhclient/NetworkManager/systemd-networkd). #### Performance * **crypt:** move more rules to systemd-cryptsetup ([6325af42](https://github.com/dracut-ng/dracut-ng/commit/6325af428d1436fff58b4c11a0ec6530df75114a)) * **dracut-init.sh:** stop parsing args in dracut_instmods if --silent is found ([16863113](https://github.com/dracut-ng/dracut-ng/commit/168631130cfe6b8993272d833f764c96377b526f)) * **dracut-systemd:** check for systemd binary ([51d0257b](https://github.com/dracut-ng/dracut-ng/commit/51d0257be63269d5018d284208d8148c8c7958dc)) * **drm:** group dracut_instmods calls ([80f2caf4](https://github.com/dracut-ng/dracut-ng/commit/80f2caf4f5ee47a708b5e4bd65c28e3f8ff1b9c8)) * **systemd:** * remove duplicate rules ([d6ba849b](https://github.com/dracut-ng/dracut-ng/commit/d6ba849bb6234ff11fe840ff5c7c327f7c8492f6)) * remove duplicate rules ([45a65df3](https://github.com/dracut-ng/dracut-ng/commit/45a65df352f5460c74cc3af71562b62b1cb47429)) * remove duplicate rules ([db20908c](https://github.com/dracut-ng/dracut-ng/commit/db20908cbbcf2779372e05d7d42162e83da86f12)) * remove duplicate rules ([fb75d4a8](https://github.com/dracut-ng/dracut-ng/commit/fb75d4a862a04c235e46bf9a9d8ce918bcda0a9a)) * remove duplicate rules ([6c5520df](https://github.com/dracut-ng/dracut-ng/commit/6c5520dff67a63df4ee735ab4f618d3faaf869d9)) * **systemd-udevd:** remove duplicate rules ([28846382](https://github.com/dracut-ng/dracut-ng/commit/28846382bf7d76b92cf6004345a982b4ae973f8a)) #### Bug Fixes * /etc/modprobe.d --> /run/modprobe.d ([424717af](https://github.com/dracut-ng/dracut-ng/commit/424717af8e0a86dac7a9898bf161f04e35abd2c2)) * crypt-gpg-lib.sh ([1ca38f04](https://github.com/dracut-ng/dracut-ng/commit/1ca38f0476a7b0267a51f812b04f52de1453429e)) * module-setup.sh missing stty ([1af35319](https://github.com/dracut-ng/dracut-ng/commit/1af353193dbc4e5f23dc64746bbde4c0685c98b8)) * network-manager should include kernel-network-modules ([cabd38d8](https://github.com/dracut-ng/dracut-ng/commit/cabd38d8c375fafe13edc26c5ed908b60b44d8d3)) * clean Makefile rule ([b89a0fb2](https://github.com/dracut-ng/dracut-ng/commit/b89a0fb2b082b582289a6a8d46b9e0d200924d14)) * **01systemd-ldconfig:** install ldconfig.real ([125bb0a8](https://github.com/dracut-ng/dracut-ng/commit/125bb0a81e08d28f5c8a516a7e6cc8563de9fabb)) * **35-network-manager:** let the kernel generate a UUID for /etc/machine-id ([1e2b5c30](https://github.com/dracut-ng/dracut-ng/commit/1e2b5c305e79ac6998d4d59f64c6dee285214057)) * **90kernel-modules:** add psmouse for some Fujitsu laptops ([343ce3bb](https://github.com/dracut-ng/dracut-ng/commit/343ce3bbb947e4f7bb31542203b8fc68147f5add)) * **Dockerfile-Gentoo:** * resolve glibc/libxcrypt conflict ([b6b8cf3e](https://github.com/dracut-ng/dracut-ng/commit/b6b8cf3e1ca6e5964c02910695e22c296bcea458)) * pull in virtual/pkgconfig ([4d5e9079](https://github.com/dracut-ng/dracut-ng/commit/4d5e90798f1b12343ad884dc53ecec846eaaa956)) * add --deep, --autounmask-continue, and depclean ([b182af73](https://github.com/dracut-ng/dracut-ng/commit/b182af730c75732ab49aad545e95002ffb19c674)) * **base:** * add support for rd.udev.log_level ([a471ca60](https://github.com/dracut-ng/dracut-ng/commit/a471ca601b2ae6d924dab0603dbf275cb360a6ff)) * install /etc/udev/udev.conf in hostonly mode only ([2ab9ecce](https://github.com/dracut-ng/dracut-ng/commit/2ab9eccee3352e8ce8a94842ff6ab496c6654166)) * log the full udev database in rdsosreport ([3fc15986](https://github.com/dracut-ng/dracut-ng/commit/3fc15986518aea030a6a850ae779750110320276)) * **configure:** resolve regression for crosscompiling ([25dabef1](https://github.com/dracut-ng/dracut-ng/commit/25dabef1dab4612e31be84af3e262dc187ec4158)) * **cpio:** eliminate compile time warning ([18788930](https://github.com/dracut-ng/dracut-ng/commit/1878893054ec175ce2493cecf6ea81727519eceb)) * **crypt:** * unlock encrypted devices by default during boot ([2339acfa](https://github.com/dracut-ng/dracut-ng/commit/2339acfaeee60d6bb26a1103db2e53bc8f9cb2d1)) * add systemd-ask-password dependency if systemd is used ([caafea4e](https://github.com/dracut-ng/dracut-ng/commit/caafea4e80305306d5aa8cd7540698a1932629dc)) * **dmsquash-live:** * do not check ISO md5 if image filesystem ([c6906fea](https://github.com/dracut-ng/dracut-ng/commit/c6906fea4df28428aa889c7bb8197689ae8107ee)) * use load_fstype to load driver for filesystems ([541ae946](https://github.com/dracut-ng/dracut-ng/commit/541ae946b2fb715ed6d88b32dce97bd3ad30c599)) * update documentation ([d2d41a36](https://github.com/dracut-ng/dracut-ng/commit/d2d41a36d86aca3deb05fe1be41bd06576c13d3f)) * **dracut:** * microcode loading ([16573680](https://github.com/dracut-ng/dracut-ng/commit/16573680d1b6cfba2147a41ab9c5309b7d91a71e)) * bsdcpio compatibility ([572afed1](https://github.com/dracut-ng/dracut-ng/commit/572afed17595f45daab98670975aea78e81ff9b1)) * add support for RISC-V EFI ([136a9a10](https://github.com/dracut-ng/dracut-ng/commit/136a9a101f142f24567bd345c8d3a388f8a75b32)) * move hooks directory from /usr/lib to /var/lib ([a45048b8](https://github.com/dracut-ng/dracut-ng/commit/a45048b80c27ee5a45a380052a6d29ab1925f7f9), closes [#2588](https://github.com/dracut-ng/dracut-ng/issues/2588)) * **dracut-fuctions.sh:** correct wrong regex pattern for LVM dm devices ([4c2f756f](https://github.com/dracut-ng/dracut-ng/commit/4c2f756f8fda68e6a89e47ca187695431d1baee0)) * **dracut-init.sh:** * force to perform the actual action ([ffeb32b2](https://github.com/dracut-ng/dracut-ng/commit/ffeb32b2d2caecc2111bfd93b6919dc4f09d3c2d)) * handle decompress with `--sysroot` ([91cdd57f](https://github.com/dracut-ng/dracut-ng/commit/91cdd57f519f90c5c31741616f90c262cf90700c)) * **dracut-install:** * release memory allocated for regular expressions ([d93bac05](https://github.com/dracut-ng/dracut-ng/commit/d93bac05471b82bb38b94af6fa81ef0337e9e2c9)) * continue parsing if ldd prints "cannot be preloaded" ([ace9e1b5](https://github.com/dracut-ng/dracut-ng/commit/ace9e1b58c09e1e91621ad2219f7a96b7edbbd38)) * **dracut-lib:** only remove initqueue/finished scripts, not the hook dir ([e8257deb](https://github.com/dracut-ng/dracut-ng/commit/e8257debcd42c7640ad0e3b9ab4c5306794776ec), closes [#2620](https://github.com/dracut-ng/dracut-ng/issues/2620)) * **dracut-systemd:** * include systemd-ask-password module ([0bfe0867](https://github.com/dracut-ng/dracut-ng/commit/0bfe0867dae9f60ec316f4b90bd0b3ea9f2a027c)) * replace `rd.udev.log-priority` with `rd.udev.log_level` ([c1275d87](https://github.com/dracut-ng/dracut-ng/commit/c1275d878cc6f6dac5b59a2024e6b5cc777dd6c7)) * **dracut.sh:** * include efi mountpoint for hostonly ([4a6a4ac6](https://github.com/dracut-ng/dracut-ng/commit/4a6a4ac6a92dbbcd6edeb3ca4d9148d90ac3423d)) * don't unset LD_PRELOAD ([1eff6933](https://github.com/dracut-ng/dracut-ng/commit/1eff6933fb3a38cd03ac64785dc62afbc8e5b480)) * do not add device if find_block_device fails ([0f6c46aa](https://github.com/dracut-ng/dracut-ng/commit/0f6c46aa66a1dc9582d3ec5e18ed56b55e970ce8)) * make uki's reproducible ([aabb5a41](https://github.com/dracut-ng/dracut-ng/commit/aabb5a4106295c6d3234215ab30f8dc2fb93eed7)) * omit compressed kernel modules from find searching exec files ([ad36b61e](https://github.com/dracut-ng/dracut-ng/commit/ad36b61ec1a26714fbe3049435eff7199ffea5e0)) * **fips:** remove /dev/{random,urandom} pre-creation ([5beda2ea](https://github.com/dracut-ng/dracut-ng/commit/5beda2ea009046c1398ea5af868cc5743beb0f01)) * **github:** add the recently introduced modules to the labeler ([5957f5c5](https://github.com/dracut-ng/dracut-ng/commit/5957f5c5950fa6415369ce91fdc362710e7689a6)) * **i18n:** handle keymap includes with `--sysroot` ([5b714d25](https://github.com/dracut-ng/dracut-ng/commit/5b714d25e1750132429005d289c81522aa2ae8d5)) * **install.d:** * prevent failure when kernel-install command is not `add` ([6fec7d39](https://github.com/dracut-ng/dracut-ng/commit/6fec7d3936d25bbfb15ee7362fd0a9499644bc32)) * correctly install pre-genned image and die if no args ([8388ad14](https://github.com/dracut-ng/dracut-ng/commit/8388ad149c698c951089606352fdb0cdcaaf40c9)) * simplify and use what kernel-install gives us ([d4015538](https://github.com/dracut-ng/dracut-ng/commit/d40155385d060f8d8608fa8a4931e2e42ddc3a8f)) * **iscsi:** do not add host's runtime iscsi configure files in initrd ([292e79e8](https://github.com/dracut-ng/dracut-ng/commit/292e79e88c6c6a53af33abe840b1571879001ba6)) * **man:** further clarify live-image overlay types & RAM usage ([5fa405dd](https://github.com/dracut-ng/dracut-ng/commit/5fa405dd1f705f035ba91350a2b0799ddbd87893)) * **memstrack:** move the console warning to be a comment ([ee1c37e3](https://github.com/dracut-ng/dracut-ng/commit/ee1c37e31e5d14f35cfab3353547ee1177d1c9e0)) * **multipath:** explicitly check if `hostonly_cmdline` is `yes` ([c262ec6d](https://github.com/dracut-ng/dracut-ng/commit/c262ec6d1c065b3c0b00ce864f2ea7c849d13b9d)) * **numlock:** * use the same shebang as other dracut modules ([67987959](https://github.com/dracut-ng/dracut-ng/commit/679879590f4cb428e79c1a28a8b77357dd6bae1a)) * use the same shebang as other dracut modules ([efa02688](https://github.com/dracut-ng/dracut-ng/commit/efa0268881df36824c72020e6f8b8966cc189375)) * **nvmf:** move /etc/nvme/host{nqn,id} requirement to hostonly ([54cd6479](https://github.com/dracut-ng/dracut-ng/commit/54cd647932c42e5520a8bcdd3e5882210e4603c5)) * **release:** dracut --> dracut-ng for NEWS.md ([6fb8fc8b](https://github.com/dracut-ng/dracut-ng/commit/6fb8fc8b70d20b82bfcda99d9da193e16d5f315b)) * **systemd:** explicitly install some libs that will not be statically included ([04b362d7](https://github.com/dracut-ng/dracut-ng/commit/04b362d713235459cff1f370efb4cd5e36e4a358), closes [#2642](https://github.com/dracut-ng/dracut-ng/issues/2642)) * **systemd-ask-password:** * no graphical output in aarch64 ([4cc962aa](https://github.com/dracut-ng/dracut-ng/commit/4cc962aa0989c53822f4bd6c5431488c7707124e)) * resolve regression ([25c5cfa2](https://github.com/dracut-ng/dracut-ng/commit/25c5cfa2ca70a4b76fafa7a12ebb87b51256adba)) * **systemd-cryptsetup:** add potentially needed modules to generic initrd ([9179ade8](https://github.com/dracut-ng/dracut-ng/commit/9179ade8a0e33a0c6ef951073f3b89790ee5eda0)) * **systemd-initrd:** * systemd based initrd needs journald and tmpfiles ([860b35c3](https://github.com/dracut-ng/dracut-ng/commit/860b35c38ea8764e75aed3d5fca8b811b026f2a6)) * only included if another module depends on it ([6d3e69ac](https://github.com/dracut-ng/dracut-ng/commit/6d3e69ac40afd2e4b61b2fc244671a417ea8b03d)) * add systemd-udevd dependency ([8910f8bb](https://github.com/dracut-ng/dracut-ng/commit/8910f8bbeaedf2b55c788490080290be4a122114)) * **systemd-journald:** add systemd dependency ([06e4a854](https://github.com/dracut-ng/dracut-ng/commit/06e4a854700e6353771aa8c13379f4f541dc53ee)) * **systemd-networkd:** * drop networkctl as it has a dependency on dbus ([7a1519bf](https://github.com/dracut-ng/dracut-ng/commit/7a1519bfc6bd96691e7df2c6a655f9fd1a0b5e77)) * dbus is not a mandatory dependency ([6f764a1d](https://github.com/dracut-ng/dracut-ng/commit/6f764a1db8a40fe484682c38ef649abc333150c5)) * **systemd-sysext:** handle confexts and correct extensions search path ([30da2173](https://github.com/dracut-ng/dracut-ng/commit/30da2173e25cf445d52e30456f6938230efd97b1)) * **systemd-udevd:** add systemd-sysctl dependency ([2c866733](https://github.com/dracut-ng/dracut-ng/commit/2c866733bff45c8cba4efdc3fae26eb98ac9f546)) * **test:** * add support for thin volumes in the Gentoo container ([6fc87f5c](https://github.com/dracut-ng/dracut-ng/commit/6fc87f5c664788d1715cca49d1b327611625144f)) * fixup Gentoo CI ([8bcd077d](https://github.com/dracut-ng/dracut-ng/commit/8bcd077d5eb5a811cb34b0d307a5d886ecddca60)) * remove ib700wdt kernel module from tests ([2526a92e](https://github.com/dracut-ng/dracut-ng/commit/2526a92e9867e1800875b9889de5739c8930381d)) * do not omit dracut modules for initramfs.testing ([5cb42481](https://github.com/dracut-ng/dracut-ng/commit/5cb42481e8738b6a173e0ecacdf722b772188336)) * fixup Gentoo CI ([3b9054a4](https://github.com/dracut-ng/dracut-ng/commit/3b9054a404bdf15ab92a35d7b8d58841d31c905e)) * **znet:** append to udev rules so each rd.znet_ifname is effective ([22f51730](https://github.com/dracut-ng/dracut-ng/commit/22f51730860a1715c9420d066aea691bfa03a81e)) #### Features * **90dm:** close crypt devices using cryptsetup ([fba8622f](https://github.com/dracut-ng/dracut-ng/commit/fba8622fdd06540bd2a62262e945fe66392a26d3), closes [#204](https://github.com/dracut-ng/dracut-ng/issues/204)) * **90systemd-cryptsetup:** socket key files ([80480a73](https://github.com/dracut-ng/dracut-ng/commit/80480a731aabec11a1e72f08725a47c63c45632d)) * **dasd:** minimize dasd handling consolidated in s390-tools ([36e1f884](https://github.com/dracut-ng/dracut-ng/commit/36e1f88417557d5b031a490dfc810a3c9d7d5f64)) * **dasd_mod:** minimize dasd handling consolidated in s390-tools ([2397c479](https://github.com/dracut-ng/dracut-ng/commit/2397c4797a426b7dd936e6ea1910c647f38461b5)) * **dasd_rules:** remove dasd handling consolidated in s390-tools ([72c945ca](https://github.com/dracut-ng/dracut-ng/commit/72c945cad0961312cecbba62fcf2df8972909230)) * **dracut.sh:** make initramfs-${kernel}.img filename configurable ([28820e20](https://github.com/dracut-ng/dracut-ng/commit/28820e20532890b9b0cf816ce1b527c582a1f3b3)) * **ifcfg:** minimize s390-specific network configuration aspects ([457e66e6](https://github.com/dracut-ng/dracut-ng/commit/457e66e679b780ec4de58b87237f29eeed548e08)) * **lsinitrd.sh:** * print stored dracut cmdline ([d10455ad](https://github.com/dracut-ng/dracut-ng/commit/d10455ad1a0d4c3f2c00f5ec7aabace8487aee6d)) * enable unpacking files from squash-root.img ([9b12ef98](https://github.com/dracut-ng/dracut-ng/commit/9b12ef98a8fdf2b8611fe82f96560c690bb5d2ad)) * **numlock:** add module to turn Num Lock on ([60b44261](https://github.com/dracut-ng/dracut-ng/commit/60b442614de207bb7107743ec15261b17b550c41)) * **pcmcia:** factor out pcmcia support into its own module ([4b21d5f7](https://github.com/dracut-ng/dracut-ng/commit/4b21d5f740b9f0ae5c8843713543ae62ec42b225)) * **qeth_rules:** remove qeth handling consolidated in 95znet ([198a86c2](https://github.com/dracut-ng/dracut-ng/commit/198a86c2c7fdd39446d785afa1917ccb4727809d)) * **systemd-bsod:** dracut module for systemd-bsod ([d7ab919e](https://github.com/dracut-ng/dracut-ng/commit/d7ab919eaa6d820545ca73549e1ce87f8c00aefb)) * **systemd-cryptsetup:** new module for systemd-cryptsetup ([649e37bc](https://github.com/dracut-ng/dracut-ng/commit/649e37bcd5ac46d5ac440b80297370c07ee7e1a8)) * **systemd-pcrphase:** include systemd-pcrphase if dependencies are met ([c5cbdaf3](https://github.com/dracut-ng/dracut-ng/commit/c5cbdaf3050f46c446fe736032ae872376f6d365)) * **tpm2-tss:** add tpm2.target and systemd-tpm2-generator ([edd870ed](https://github.com/dracut-ng/dracut-ng/commit/edd870eda138bb9fe617f3e71b524dcf7d631e65)) * **zfcp:** minimize zfcp handling consolidated in s390-tools ([7745a81a](https://github.com/dracut-ng/dracut-ng/commit/7745a81afd85a437d4ec9bf023efa942cd5ca109)) * **zfcp_rules:** remove zfcp handling consolidated in s390-tools ([b5a35f9d](https://github.com/dracut-ng/dracut-ng/commit/b5a35f9d9bad1958e9c5433d8e2b167d4bb83195)) * **znet:** use zdev for consolidated device configuration ([658a21ac](https://github.com/dracut-ng/dracut-ng/commit/658a21ac276b8d7aba950c5ad7c3f8132681512b)) #### Contributors - Laszlo Gombos - Steffen Maier - Antonio Alvarez Feijoo - Andrew Ammerlaan - Daniel Winzen - Federico Vaga - Kamil Szczęk - dalto8 <57767042+dalto8@users.noreply.github.com> - farfalleflickan <6597735+farfalleflickan@users.noreply.github.com> - Andrew Gunnerson - Anton Lundin - Bernhard Rosenkraenzer - Frederick Grose <4335897+FGrose@users.noreply.github.com> - Manuel Fombuena - Nick Rosbrook - Reilly Brogan - Thierry Bultel - Tomas Bzatek - Tomasz Paweł Gajc - Valentin David - Vitaly Kuznetsov - Wenchao Hao dracut-ng-101 ============= #### Bug Fixes Release 101 resolves a regression introduced by release 100 - https://github.com/dracut-ng/dracut-ng/issues/130 . * **dracut.sh:** revert: "do not add device if find_block_device returns" ([0885d6b2](https://github.com/dracut-ng/dracut-ng/commit/0885d6b2bb9d449f8a4e4f89ded3b619338df28d)) * **dmsquash-live:** update documentation ([d2d41a36](https://github.com/dracut-ng/dracut-ng/commit/d2d41a36d86aca3deb05fe1be41bd06576c13d3f)) * **dracut-install:** continue parsing if ldd prints "cannot be preloaded" ([ace9e1b5](https://github.com/dracut-ng/dracut-ng/commit/ace9e1b58c09e1e91621ad2219f7a96b7edbbd38)) * **dracut-systemd:** replace `rd.udev.log-priority` with `rd.udev.log_level` ([c1275d87](https://github.com/dracut-ng/dracut-ng/commit/c1275d878cc6f6dac5b59a2024e6b5cc777dd6c7)) * **dracut.sh:** omit compressed kernel modules from find searching exec files ([ad36b61e](https://github.com/dracut-ng/dracut-ng/commit/ad36b61ec1a26714fbe3049435eff7199ffea5e0)) * improve Gentoo container ([76963537](https://github.com/dracut-ng/dracut-ng/commit/76963537edcfbad21c5fa096834e982564653808)) #### Contributors - Antonio Alvarez Feijoo - Laszlo Gombos dracut-ng-100 ============= Release 100 of dracut-ng serves as a drop-in replacement for the original dracut project. This release marks a significant milestone in our commitment to providing an alternative, community-driven solution for creating an initramfs image. The original dracut project is no longer actively maintained (its last tagged release dates back to 2022). Forking allows the community to take ownership of the project and address maintenance issues independently. This release includes fixes for compatibility with the latest Linux kernel (v6.8), Linux firmware, and systemd (v255). A new dracut module named net-lib has been added to enhance networking support. Support for new Linux kernel modules have been added to support new devices, including the Surface Laptop 4 and MacBook Pro. The project builds test containers daily for the following Linux distributions: Arch Linux, Debian, Fedora, Gentoo, openSUSE, and Ubuntu, in various configurations (systemd, OpenRC, glibc, musl). All enabled integration tests have passed at the time of this release. #### Bug Fixes * wait 12 hours before halt on media check fail ([faa3db78](https://github.com/dracut-ng/dracut-ng/commit/faa3db78b58554710e81ef95cceab68a1d52311e)) * do not use modprobe --all ([5850486f](https://github.com/dracut-ng/dracut-ng/commit/5850486fbc3e7d6550fadf21d8e060c236214e9f)) * **45ifcfg:** mark as deprecated and strictly opt-in ([79e1def5](https://github.com/dracut-ng/dracut-ng/commit/79e1def5ab9a19fdb9a5cc33c4893e49a7a10b67)) * **90kernel-modules:** * add surface_aggregator_registry for Surface Laptop 4 ([8cc89664](https://github.com/dracut-ng/dracut-ng/commit/8cc8966491830072f75a918c51533bea11211253)) * add intel_lpss_pci for MacBook Pro 2017 ([f0526fde](https://github.com/dracut-ng/dracut-ng/commit/f0526fdea993d7e1ffa612c93656c77b41eb0509)) * **90multipath:** drop unneeded dependencies from configure service ([9ac195c1](https://github.com/dracut-ng/dracut-ng/commit/9ac195c11c1f38dc6f0389d99fb3e76509c2e1c4)) * **Makefile:** release is now just made out of a git sha ([71109aed](https://github.com/dracut-ng/dracut-ng/commit/71109aed43420eaba7e2168ae7b8d48c8a1078de)) * **TEST-62-SKIPCPIO:** test always skipped due to buggy `test_check` ([5b5d395a](https://github.com/dracut-ng/dracut-ng/commit/5b5d395a6b4d9118c077102b5bbd74748e601a4e)) * **base:** correct handling of quiet in loginit ([49b9c219](https://github.com/dracut-ng/dracut-ng/commit/49b9c2196a6a282cdb9c24738b2ab27d9a67134c)) * **caps:** return 1 if binary requirements are not met ([243be951](https://github.com/dracut-ng/dracut-ng/commit/243be951958b9111c50b98eae399f610a5a07a99)) * **check_live_ram:** increase /run tmpfs size, if needed ([e12ad733](https://github.com/dracut-ng/dracut-ng/commit/e12ad7330f9db547014eeeec37aeab779461bc30)) * **configure:** misleading error if C compiler is not installed ([4980bad3](https://github.com/dracut-ng/dracut-ng/commit/4980bad34775da715a2639b736cba5e65a8a2604)) * **dmsquash-live:** * use the overlay size with thin provisioning ([2e025eb2](https://github.com/dracut-ng/dracut-ng/commit/2e025eb2105d8f8c67b07b0140915566873e12f0)) * handle relative pathspec ([0c6d257f](https://github.com/dracut-ng/dracut-ng/commit/0c6d257f9c7d62eb449d71789f4f68414ba97aa2)) * **dracut:** correct regression with multiple `rd.break=` options ([3d727a7d](https://github.com/dracut-ng/dracut-ng/commit/3d727a7d92cc916634369c8fa5fd97b4444d5aa7)) * **dracut-init.sh:** do not print by default if a modules is not installed ([d73cc24e](https://github.com/dracut-ng/dracut-ng/commit/d73cc24e112c01aa701a96a7b8a58adce78409e7)) * **dracut-initramfs-restore.sh:** do not set selinux labels if disabled ([4d594210](https://github.com/dracut-ng/dracut-ng/commit/4d594210d6ef4f04a9dbadacea73e9461ded352d)) * **dracut-install:** file created without restricting permissions ([3439d139](https://github.com/dracut-ng/dracut-ng/commit/3439d139616196f0cd0af2e6244acf6c5f85621f)) * **dracut-lib:** use poweroff instead of halt ([0ca14da6](https://github.com/dracut-ng/dracut-ng/commit/0ca14da655b688f29e4c05d98d9e2c2f63bdf59b)) * **dracut-systemd:** use `DRACUT_VERSION` instead of `VERSION` ([a2c64222](https://github.com/dracut-ng/dracut-ng/commit/a2c64222cfba73a36dbb87e970e71e717e7cafb0)) * **dracut-util:** do not call `strcmp` if the `value` argument is NULL ([b5fb6e04](https://github.com/dracut-ng/dracut-ng/commit/b5fb6e049e1fcb465f9371cefeedcfecce7a8d53)) * **dracut.sh:** * recognize kernel file in /boot named vmlinux too ([f2dfc257](https://github.com/dracut-ng/dracut-ng/commit/f2dfc2576dc66ec27ee1b8fde7c129622e8373aa)) * do not add device if `find_block_device` returns an error ([18abcc53](https://github.com/dracut-ng/dracut-ng/commit/18abcc53df27be26d312cefc416bae9d97c6860a), closes [#2592](https://github.com/dracut-ng/dracut-ng/issues/2592)) * skip README for AMD microcode generation ([9df35524](https://github.com/dracut-ng/dracut-ng/commit/9df355243c26ec7079e51eef15768fe21a8afdca), closes [#2541](https://github.com/dracut-ng/dracut-ng/issues/2541)) * **github:** update format of labeler ([de8ac630](https://github.com/dracut-ng/dracut-ng/commit/de8ac6300d115a05d467dbb6b9a7c2599a2d306f)) * **i18n:** * silence spurious setfont stderr warning ([27f31c03](https://github.com/dracut-ng/dracut-ng/commit/27f31c037d97433698232976274e2acfac91523e)) * handle symlinked keymap ([1f73bc8b](https://github.com/dracut-ng/dracut-ng/commit/1f73bc8b5bf4f19a805c2fefecf3e8bd2b59b17d)) * **install:** handle new -Walloc-size for GCC 14 ([23b9ec22](https://github.com/dracut-ng/dracut-ng/commit/23b9ec22503fee6b3a3590c5753c086e1fb94910)) * **livenet:** * split `imgsize` calculation to avoid misleading error message ([4649b4c6](https://github.com/dracut-ng/dracut-ng/commit/4649b4c673cd74258e4ed9a1c3c6c553d9d02e44)) * check also `content-length` from live image header ([6289d5f4](https://github.com/dracut-ng/dracut-ng/commit/6289d5f4348a291f70d8fc105de2fa2c1b5291f4)) * propagate error code ([61a00cf8](https://github.com/dracut-ng/dracut-ng/commit/61a00cf8fec39e931a81f6ff0af4dfd62e308646)) * **man:** rd.break parameter can be specified multiple times ([5a99e671](https://github.com/dracut-ng/dracut-ng/commit/5a99e671f6d81de75bec71f1832444137559957d)) * **net-lib:** add a new dracut module called net-lib ([5e1fec16](https://github.com/dracut-ng/dracut-ng/commit/5e1fec1688a6b1cbcb4bea27a77710ae60c0d2f1)) * **overlayfs:** * to allow overlay on top of network device (nfs) ([bedde0f1](https://github.com/dracut-ng/dracut-ng/commit/bedde0f15708303f9907ed8a0d9e217c98e3bf07)) * allow hostonly ([929e3160](https://github.com/dracut-ng/dracut-ng/commit/929e3160102761a2e0a471d0a5cf0a0ac7ac663d)) * split overlayfs mount in two steps ([bddffeda](https://github.com/dracut-ng/dracut-ng/commit/bddffedae038ceca263a904e40513a6e92f1b558)) * **pcsc:** * add --disable-polkit to pcscd.service ([2689123c](https://github.com/dracut-ng/dracut-ng/commit/2689123c55bd2b43e7e2dba3e6bb93621a541916)) * add opensc load module file ([882e9335](https://github.com/dracut-ng/dracut-ng/commit/882e9335934a86f88ba3b0cb7800a0d2c004b6a2)) * **pkcs11:** delete trailing dot on libcryptsetup-token-systemd-pkcs11.so ([1c762c0d](https://github.com/dracut-ng/dracut-ng/commit/1c762c0da6ed2bb6fa44d5e0968605cc4d45361c)) * **plymouth:** return 1 if binary requirements are not met ([edb14009](https://github.com/dracut-ng/dracut-ng/commit/edb140094e7144834c9d53652fbacdfb3053ab72)) * **release:** * maintain dracut.html in the source tree ([7b05aa8b](https://github.com/dracut-ng/dracut-ng/commit/7b05aa8b9eee5d665bfd010950bf01ee03e0fb12)) * dracutdevs/dracut --> dracut-ng/dracut-ng ([8906474b](https://github.com/dracut-ng/dracut-ng/commit/8906474b4116190f45b5871079a826934e51f2e6)) * **resume:** * include in hostonly mode if resume= on cmdline ([d2ff89e2](https://github.com/dracut-ng/dracut-ng/commit/d2ff89e24479f1b8c2a21613632a4beb58c2a182)) * add new systemd-hibernate-resume.service ([b73b5e0f](https://github.com/dracut-ng/dracut-ng/commit/b73b5e0fc94355efcff908ac1779fb187216484e), closes [#2513](https://github.com/dracut-ng/dracut-ng/issues/2513)) * **rootfs-block:** remove support for [no]readonlyroot and fastboot ([469935fc](https://github.com/dracut-ng/dracut-ng/commit/469935fcca330c215009937eedbfb0dc15d533be)) * **systemd-255:** handle systemd-pcr{phase -> extend} rename ([b63e90ab](https://github.com/dracut-ng/dracut-ng/commit/b63e90ab4e34b35ba0ce009992b0fc019eca3761)) * **systemd-journald:** add systemd-sysusers dependency ([4971f443](https://github.com/dracut-ng/dracut-ng/commit/4971f443726360216a4ef3ba8baea258a1cd0f3b)) * **systemd-repart:** correct undefined $libdir ([1586af09](https://github.com/dracut-ng/dracut-ng/commit/1586af098fb17f7565d1699953e4e4b536304089)) * **test:** running tests no longer requires to be root ([3dad8237](https://github.com/dracut-ng/dracut-ng/commit/3dad82379aaa0afc05dbe717b1ab958ac7e9cf23)) * **udev-rules:** remove legacy persistent network device name rule ([898ce135](https://github.com/dracut-ng/dracut-ng/commit/898ce1359ccd54fdb366749127f825dc384d9efa)) * **zfcp_rules:** correct shellcheck regression when parsing ccw args ([5d2bda46](https://github.com/dracut-ng/dracut-ng/commit/5d2bda46f4e75e85445ee4d3bd3f68bf966287b9)) #### Features * **dracut.sh:** protect `push_host_devs` function ([7b54d2fb](https://github.com/dracut-ng/dracut-ng/commit/7b54d2fbbfb02c0f4e3d27dc76fb6679f6f31cd4)) * **kernel-modules:** * Install SPMI modules on ARM/RISC-V ([9491c285](https://github.com/dracut-ng/dracut-ng/commit/9491c2852501fab5d0000a095706ac6469cbfdf1)) * add Qualcomm IPC router to enable USB ([dd9a4bc1](https://github.com/dracut-ng/dracut-ng/commit/dd9a4bc1b13a0cc8abac980bc3cceffb67111e64)) * **network:** include 98-default-mac-none.link if it exists ([b7f09500](https://github.com/dracut-ng/dracut-ng/commit/b7f0950097b19092434836ad6708187d5d0351bd)) #### Contributors - Laszlo Gombos - Antonio Alvarez Feijoo - Benjamin Drung - Henrik Gombos - Jan Macku - Manuel Fombuena - Sam James - Adam Williamson - Andrew Ammerlaan - Benjamin Marzinski - Bernhard M. Wiedemann - Brian Harring - Daniel P. Berrangé - David Cassany - Dusty Mabe - Frederick Grose - Icenowy Zheng - Ihno Krumreich - Jeremy Linton - Jonathan Lebon - Lukas Nykryn - Neal Gompa - Thomas Blume - gregory-lee-bartholomew - innovara dracut-060 ========== #### Performance * **dracut-install:** * don't strdup() environment block ([efd4ca27](https://github.com/dracutdevs/dracut/commit/efd4ca271f15530d7264d2c87a104284e20b28aa)) * don't reallocate {src,dst}path in hmac_install() ([77226cb4](https://github.com/dracutdevs/dracut/commit/77226cb412822dc7614037c6d9225d98e64d4a55)) * don't strdup() excessively for dracut_install() ([a20556f0](https://github.com/dracutdevs/dracut/commit/a20556f0e51249e501aeb87eb5a337a15db52253)) * stat() w/unused buf -> access(F_OK) in dracut-install ([e7ed8337](https://github.com/dracutdevs/dracut/commit/e7ed8337bb9fec0283af5dc745450394ba649a03)) * multiple single-character strstr()s -> strpbrk() ([751a110f](https://github.com/dracutdevs/dracut/commit/751a110f29f07cb41246c09784c63bb26bb708c6)) #### Bug Fixes * codespell ([ddf63231](https://github.com/dracutdevs/dracut/commit/ddf6323145d50d33a897687474c73770328bf757)) * make iso-scan trigger udev events ([7b530f26](https://github.com/dracutdevs/dracut/commit/7b530f26368d723dcc34fb67d687c60009b06412), closes [#2183](https://github.com/dracutdevs/dracut/issues/2183)) * shellcheck 0.8.0 ([88fe9205](https://github.com/dracutdevs/dracut/commit/88fe9205de49c12ed8eaac2ca227a72830750955)) * shellcheck 0.8.0 ([08b63a25](https://github.com/dracutdevs/dracut/commit/08b63a25296d689186c6343f96e764bf893367cb)) * **99base:** adjust to allow mksh as initrd shell ([a0d14d3b](https://github.com/dracutdevs/dracut/commit/a0d14d3bc691b318507c01708bc67d9e3b9d5109)) * **Makefile:** * remove leftover rpm build rules ([f5cc202e](https://github.com/dracutdevs/dracut/commit/f5cc202e998eb22bda98920b8eeeb0f027ca0b6e)) * no longer upload to kernel.org ([ffc766d2](https://github.com/dracutdevs/dracut/commit/ffc766d23d9175673f722a3c81e7609496167845)) * execute command -v instead of which ([4235c035](https://github.com/dracutdevs/dracut/commit/4235c035ff1abad0c22125c26cab813c42b29da0)) * **base:** do not quote $CLINE in the `set` command ([8b951d20](https://github.com/dracutdevs/dracut/commit/8b951d20d409b3647c85a9c6d064ccb15cdb5fe7)) * **bluetooth:** * make bluetooth rules more strict ([dfa408c9](https://github.com/dracutdevs/dracut/commit/dfa408c9de7cd0b0af6099b6f1e0cce2e70ec467)) * add missing files ([e84d65c5](https://github.com/dracutdevs/dracut/commit/e84d65c5b0191582e26fe9cc150d460652b34b33)) * include it if Appearance matches the value assigned for keyboard ([8079ceaf](https://github.com/dracutdevs/dracut/commit/8079ceafcac910d0c061830769866710c3e889a8)) * warn user instead of including it by default ([0ecb0388](https://github.com/dracutdevs/dracut/commit/0ecb038832038523a27f989d0eb82b45fb67861c)) * **btrfs:** * do not require module via cmdline when --no-kernel ([7ed765dd](https://github.com/dracutdevs/dracut/commit/7ed765dd23e4c5616c82d1cbf8b4dbceaafc7647)) * add missing cmdline function ([2b47a2ef](https://github.com/dracutdevs/dracut/commit/2b47a2efe91ab8be480925c04388200a3666812c)) * **crypt:** add missing libraries ([c5dca3d6](https://github.com/dracutdevs/dracut/commit/c5dca3d68915cef077fda2bc5292e12f82cf6dd6)) * **crypt-gpg:** do not use always --card-status ([e3e8108e](https://github.com/dracutdevs/dracut/commit/e3e8108eb75247249ec05eaba943c3f48637c04b)) * **dmsquash-live:** * allow other fstypes ([4000a1ec](https://github.com/dracutdevs/dracut/commit/4000a1ecff208479254be8ce88de826099e2b685)) * restore compatibility with earlier releases ([0e780720](https://github.com/dracutdevs/dracut/commit/0e780720efe6488c4e07af39926575ee12f40339)) * live:/dev/* ([93339444](https://github.com/dracutdevs/dracut/commit/93339444361303c15e26b6ff5cea6ef99ad0b3e0)) * **dmsquash-live-autooverlay:** specify filesystemtype when it is already known ([179e1a99](https://github.com/dracutdevs/dracut/commit/179e1a992fc2b74d55a600bef152d5df43802104)) * **dracut-functions:** avoid calling grep with PCRE (-P) ([67591e88](https://github.com/dracutdevs/dracut/commit/67591e8855006eb02aa0ffab7349ab770e471473)) * **dracut-functions.sh:** convert mmcblk to the real kernel module name ([a62e895d](https://github.com/dracutdevs/dracut/commit/a62e895db9510f0fc4c47ee81b1436096eca4d64)) * **dracut-init.sh:** * `module_check` method ignores `forced` option ([6c9f403f](https://github.com/dracutdevs/dracut/commit/6c9f403f1c219b8e2ff62011bfcc1b5e254b411a)) * use the local _ret variable ([1b53bb62](https://github.com/dracutdevs/dracut/commit/1b53bb6297d83940b52e806c01030e8f5035d9f2)) * correct check in `is_qemu_virtualized` function ([3e2f685e](https://github.com/dracutdevs/dracut/commit/3e2f685ecb4a968d5cd889803d5a248dab89473a)) * correct typo in comment ([1aafcab9](https://github.com/dracutdevs/dracut/commit/1aafcab935b7e84cea8fc3f084b6935f87b2b8a5)) * **dracut-initramfs-restore.sh:** handle /etc/machine-id empty or uninitialized ([260883d9](https://github.com/dracutdevs/dracut/commit/260883d96f33e7aced3d00c85d0ebffcec1385a1)) * **dracut-install:** * protect against broken links pointing to themselves ([32f6f364](https://github.com/dracutdevs/dracut/commit/32f6f364ddeb706bf8741f2895d60022aee264e7)) * prevent possible infinite recursion with suppliers ([131822e2](https://github.com/dracutdevs/dracut/commit/131822e26d76a3ce2028e9a545be2af066805629)) * continue parsing if ldd prints "cannot execute binary file" ([9a531ca0](https://github.com/dracutdevs/dracut/commit/9a531ca044e3cfe9b670e7e4d59a7bae5bafec1e)) * **dracut-lib.sh:** remove successful finished initqueue scripts ([07af8d58](https://github.com/dracutdevs/dracut/commit/07af8d58745a121052cab49c70a476f02996da1e)) * **dracut-systemd:** * rootfs-generator cannot write outside of generator dir ([86c8a5a7](https://github.com/dracutdevs/dracut/commit/86c8a5a7c2573645e67537fb9975efab808d42c9)) * check and create generator dir outside of inner function ([acfa793b](https://github.com/dracutdevs/dracut/commit/acfa793b5cc035ebd36b0c5ce97ba2fd89e5745c)) * do not hardcode the systemd generator directory ([a7c04716](https://github.com/dracutdevs/dracut/commit/a7c04716a5e528d86135bf87745054f7cbd54469)) * remove unused argument ([eb75861c](https://github.com/dracutdevs/dracut/commit/eb75861c2a1c05eb142616da1891a7fa5a2a34e1)) * **dracut.sh:** * remove microcode check based on CONFIG_MICROCODE_[AMD|INTEL] ([6c80408c](https://github.com/dracutdevs/dracut/commit/6c80408c8644a0add1907b0593eb83f90d6247b1)) * exit if resolving executable dependencies fails ([b2c6b584](https://github.com/dracutdevs/dracut/commit/b2c6b584e2227e68f54c8843925dcb73aefe87ac)) * shellcheck warning SC1004 ([dbdab2d8](https://github.com/dracutdevs/dracut/commit/dbdab2d87fa49c7fdd08b274d8a21e6046360cad)) * use gawk for strtonum ([33a66ed0](https://github.com/dracutdevs/dracut/commit/33a66ed04bdc30eccb172a0cd6dcc36d9d74f825)) * also prevent fsfreeze for tmpfs ([09d3ec16](https://github.com/dracutdevs/dracut/commit/09d3ec1648822d84e95b274b60cb51b80e8f49f9)) * correct path for UEFI stub on split-usr systems ([c1588995](https://github.com/dracutdevs/dracut/commit/c1588995ae0d9f984ad08f2d466f7a09646c6517)) * silence the output of hardlinking files by default ([2a26eec5](https://github.com/dracutdevs/dracut/commit/2a26eec5cc1f384f71226066f13db89f92913f28)) * handle imagebase for uefi ([6178a9d8](https://github.com/dracutdevs/dracut/commit/6178a9d83ffad67fa371cef2ff3f5bbb337bc8b7)) * handle /etc/machine-id empty or uninitialized ([97fe0976](https://github.com/dracutdevs/dracut/commit/97fe09769d6a86492c39e0368f088f54f7c0fa6e)) * use dynamically uefi's sections offset ([f32e95bc](https://github.com/dracutdevs/dracut/commit/f32e95bcadbc5158843530407adc1e7b700561b1)) * kmoddir does not handle trailing / ([1ddcb137](https://github.com/dracutdevs/dracut/commit/1ddcb137ea2a4d79491ff94f1f7802dcaa7ac381)) * handle sbsign errors for UEFI builds ([a6dd5bfb](https://github.com/dracutdevs/dracut/commit/a6dd5bfb9a514a3bf650cc1e8d4311c05e9b968c)) * handle out of space error for UEFI builds ([8602df70](https://github.com/dracutdevs/dracut/commit/8602df705879100be17e93fe56f5cbeb6216248f)) * --sysroot option broken if global variables not set in conf ([6f4a5c90](https://github.com/dracutdevs/dracut/commit/6f4a5c90ab993d2559720c2d4023d99ad43df00a)) * correct --help and --version exit codes ([cda6b00a](https://github.com/dracutdevs/dracut/commit/cda6b00abce0e68e353ab929b86cfaf45c3dc1c8)) * **fido2:** libfido2.so depends on libz.so ([15970768](https://github.com/dracutdevs/dracut/commit/1597076887c6744b9ec69c0ac44a1134fd700700)) * **fips:** * move fips-boot script to pre-pivot ([d777dd3d](https://github.com/dracutdevs/dracut/commit/d777dd3dab50c2e383c00751fae5d9593339315f)) * only unmount /boot if it was mounted by the fips module ([ab26ad2c](https://github.com/dracutdevs/dracut/commit/ab26ad2c2ab4a5884e392951998d40829f130387)) * do not blindly remove /boot ([1fabbb64](https://github.com/dracutdevs/dracut/commit/1fabbb6412b70bdd1aac5279b90b9a23a267ffc5)) * **fs-lib:** remove quoting form the first argument of the e2fsck call ([9aa332ca](https://github.com/dracutdevs/dracut/commit/9aa332cad7196b6e05b9e2f1810dc54bb38ed2ac)) * **github:** exempt issues in a milestone ([c8a703aa](https://github.com/dracutdevs/dracut/commit/c8a703aaa7bbfe4f078fef5a4318243db059b87b)) * **install:** do not undef _FILE_OFFSET_BITS ([70aeb4c1](https://github.com/dracutdevs/dracut/commit/70aeb4c1a56027bc2fe5570c080d96625b377c94)) * **install.d:** * do not create initramfs if the supplied image is UKI ([b2af8c8b](https://github.com/dracutdevs/dracut/commit/b2af8c8bcfc72802e02e2c0adc2eed9279101624)) * respect even more kernel-install vars, plus style fixes ([17b8649e](https://github.com/dracutdevs/dracut/commit/17b8649eb931f3f4990ac8184fe23fc257df6fa5)) * respect more kernel-install env variables ([a037634a](https://github.com/dracutdevs/dracut/commit/a037634ad71711d29828214830ebdade0c449dbc)) * **integrity:** do not require ls ([a804945f](https://github.com/dracutdevs/dracut/commit/a804945f27a0ccc2f69ae694599b1afec2afe8b1)) * **iscsi:** * prefix syntax for static iBFT IPv6 addresses ([c3b65a49](https://github.com/dracutdevs/dracut/commit/c3b65a493a635a3f85f9e65c4337cd4c144ff8fc)) * install 8021q module unconditionally ([aa5d9526](https://github.com/dracutdevs/dracut/commit/aa5d9526eca23f642fd623d2c857fd8f9930b83d)) * **kernel-modules:** * add interconnect drivers ([afb5717e](https://github.com/dracutdevs/dracut/commit/afb5717e67727d49fae0d2a1a4169e5b247387f4)) * add UFS drivers ([89269d23](https://github.com/dracutdevs/dracut/commit/89269d239f0539b7bd4339ba98a0d1b188b59962)) * use modalias info in get_dev_module() ([87a76dbb](https://github.com/dracutdevs/dracut/commit/87a76dbb578aff473e690857d1b714eacd92b9ec)) * **load_fstype:** avoid false positive searchs ([10cf8e46](https://github.com/dracutdevs/dracut/commit/10cf8e46f43a7a2094e4d861c1296db6af0e0fa1)) * **lsinitrd.sh:** * handle /etc/machine-id empty or uninitialized ([971b302d](https://github.com/dracutdevs/dracut/commit/971b302d70fbbfac3b6047654b7dc7ceeb1c17e7)) * handle filenames with special characters ([1f84ff88](https://github.com/dracutdevs/dracut/commit/1f84ff882fe272ef0185a284eee82e89735c833d)) * **lvmthinpool-monitor:** activate lvm thin pool before extend its size ([e9b47742](https://github.com/dracutdevs/dracut/commit/e9b4774239989257999053033fc92cded7803896)) * **man:** * add missing initrd-root-device.target to flow chart ([f11e8fff](https://github.com/dracutdevs/dracut/commit/f11e8fffc2db1f6f02d09207a1edbf1d898249d7)) * remove duplicate entry ([6af3fcfd](https://github.com/dracutdevs/dracut/commit/6af3fcfd7f699ec4bb3f1e9ac71b7a9ebb9804b3)) * **modsign:** load keys to correct keyring ([b7ef1302](https://github.com/dracutdevs/dracut/commit/b7ef1302715bead649625666f92eff434082de1f)) * **multipath:** remove dependency on multipathd.socket ([297525c5](https://github.com/dracutdevs/dracut/commit/297525c5c0781e13c4bf86aa42e81b9f166802ad)) * **network:** * IPv6: don't wait for RA for static IPv6 assignments ([726d56ca](https://github.com/dracutdevs/dracut/commit/726d56ca0a23e5a39de5f809da2d20ce7985d437)) * don't assume prefix length 64 by default ([7ff255a4](https://github.com/dracutdevs/dracut/commit/7ff255a4488f63cf84179d4572f44fe3a1bd29ec)) * **network,dbus:** improve dependency checking ([3f8f115a](https://github.com/dracutdevs/dracut/commit/3f8f115a27b2bb63f0893262b6c951a187bac8ef)) * **network-legacy:** * typo ([e2f961a2](https://github.com/dracutdevs/dracut/commit/e2f961a2bd7b5f5cbff6394d6be6eace15e236b7)) * always include af_packet ([b074216b](https://github.com/dracutdevs/dracut/commit/b074216be93dc4512b76fcd6b77a727aef11b22b)) * **network-manager:** add "After" dependency on dbus.service ([d8a9a73d](https://github.com/dracutdevs/dracut/commit/d8a9a73df9688989b5e47469e74ad5aa666a5bfb)) * **nvmf:** * support /etc/nvme/config.json ([f07117d6](https://github.com/dracutdevs/dracut/commit/f07117d68d07d52aa4ce8b4b2549a0cb716b7f4b)) * install 8021q module unconditionally ([902f3a8f](https://github.com/dracutdevs/dracut/commit/902f3a8f84643e4249b9bbb2e81d1b13eaf35364)) * **plymouth:** remove /etc/system-release dependency ([d6cef3f2](https://github.com/dracutdevs/dracut/commit/d6cef3f28e15a834284786c79f108b7c42481f96)) * **release:** maintain dracut-version.sh in the source tree ([b4e23ce4](https://github.com/dracutdevs/dracut/commit/b4e23ce4238821b0c2dd3c846da45f9cfeb57954)) * **resolve-deps:** check the existing file—not the source ([5ac581ef](https://github.com/dracutdevs/dracut/commit/5ac581ef66dd8f1939e771419824137aebbc8f66)) * **systemd:** * add new systemd-tmpfiles-setup-dev-early.service ([7528d84d](https://github.com/dracutdevs/dracut/commit/7528d84de84d9c1fb7d5f54712c692600e21b044)) * do not include systemd-random-seed.service ([925febf8](https://github.com/dracutdevs/dracut/commit/925febf89d54c0bef9e3c8fda3b8e5b1f8ba30cd)) * **systemd-ac-power:** correct systemd-ac-power binary path ([df2458a6](https://github.com/dracutdevs/dracut/commit/df2458a6b8aec70e74757ea7ae35f672a99ddc17)) * **systemd-journald:** do not include systemd-journal-flush.service ([eff2a939](https://github.com/dracutdevs/dracut/commit/eff2a9398120b29fd869eec991410e254d0dcbb8)) * **systemd-networkd:** * correct typos in override paths ([f0dc7ec9](https://github.com/dracutdevs/dracut/commit/f0dc7ec96b81fec100a5ab948c12846b2b9910e6)) * add missing conf files and services ([71e391eb](https://github.com/dracutdevs/dracut/commit/71e391ebdc8f5d88447db1b6d475c813d82d5ffb)) * **systemd-pcrphase:** only include systemd-pcrphase-initrd.service ([cd6f683d](https://github.com/dracutdevs/dracut/commit/cd6f683d634970112a29867137431d0d57f8c957)) * **systemd-resolved:** correct typo in override path ([2d083021](https://github.com/dracutdevs/dracut/commit/2d083021910f0633035a056e0541549efffec896)) * **systemd-timedated:** correct typo in override path ([765e69ce](https://github.com/dracutdevs/dracut/commit/765e69ce4d88a4ef6c1028cc117b3f233a285f0e)) * **systemd-tmpfiles:** do not include systemd-tmpfiles-clean.timer ([1ef00735](https://github.com/dracutdevs/dracut/commit/1ef00735ae4fa19684598a8f7868e8b36b6bf5fe)) * **systemd-udevd:** add missing override paths ([570b9d40](https://github.com/dracutdevs/dracut/commit/570b9d405116c9763266aa2e88ea0a2460c734ba)) * **test:** * only use QEMU machine q35 on x86 ([f29e428b](https://github.com/dracutdevs/dracut/commit/f29e428bdb3068e25150bc9591a961bd2df66442)) * use bash for jobs -r parameter ([9a18f133](https://github.com/dracutdevs/dracut/commit/9a18f1335fcab1eb84fedc45e450851d093335aa)) * rename test 60 ([3d7c0ffb](https://github.com/dracutdevs/dracut/commit/3d7c0ffbd65c8d5c9fef559a51a2405a28c6f6a0)) * improve test 60 ([5e846cb1](https://github.com/dracutdevs/dracut/commit/5e846cb1320e32db1e3d200743f8fc08732d4c9e)) * remove leftover link file from server rootfs ([8f44740f](https://github.com/dracutdevs/dracut/commit/8f44740f2c234ddb275e0a11e23d45e3678eb4a0)) * assign fixed address to bridge ([9fb64d96](https://github.com/dracutdevs/dracut/commit/9fb64d96ab7a7e19a7940e56e9bc0da863b46386)) * bump DHCP timeout to 30 seconds ([462d9b92](https://github.com/dracutdevs/dracut/commit/462d9b9254d4386e9eac267547ee4e8cd2487c3d)) * remove check on dhclient support for --timeout ([da959483](https://github.com/dracutdevs/dracut/commit/da959483333c6ab83e4cdef837130eacec6b35d7)) * adapt multinic test for new NetworkManager versions ([d3993c7d](https://github.com/dracutdevs/dracut/commit/d3993c7dabdd37c54a991c6ad9ea38365598d16a)) * **udev-rules:** * remove firmware.rules ([7310a641](https://github.com/dracutdevs/dracut/commit/7310a641e227aae446684baeb48f878c3299ff9f)) * remove old eudev specific rule ([6d554d9b](https://github.com/dracutdevs/dracut/commit/6d554d9b98333372aeb20fd153a42c8171979825)) * remove old redhat specific rule ([d648bf80](https://github.com/dracutdevs/dracut/commit/d648bf805a27cbf1920f0437606c9ffb2684ec18)) * remove old edd_id extra rules ([6a33e677](https://github.com/dracutdevs/dracut/commit/6a33e677aca49dd81826949b61acb945d672ba84)) * remove old debian specific rules ([1edc41af](https://github.com/dracutdevs/dracut/commit/1edc41af979e1c1097be082c357f7a4895fbbad2)) * **url-lib.sh:** nfs_already_mounted() with trailing slash in nfs path ([966b6cec](https://github.com/dracutdevs/dracut/commit/966b6cec1bebd91ddd0f85c357f7ab57d3213f51)) * **virtiofs:** add virtio_pci kernel module to virtiofs ([07b49a3e](https://github.com/dracutdevs/dracut/commit/07b49a3ed79a792cede7e6ee21be29aba07168bc)) #### Features * **Makefile:** allow setting dracut version via environment variables ([31c4d284](https://github.com/dracutdevs/dracut/commit/31c4d284017044b72ddea767c4d35d6d70473984)) * **dracut:** * add --sbat option to add sbat policy to UKI ([fffeaded](https://github.com/dracutdevs/dracut/commit/fffeadedf2170563cb7c0e0cb06994b0878ed455)) * use log level indicator in console output ([ae88e029](https://github.com/dracutdevs/dracut/commit/ae88e029c6ad20248d229bebd7e8f10d3d094988)) * **dracut-init.sh:** * do not print by default if an udev rule is skipped ([aa20bbb5](https://github.com/dracutdevs/dracut/commit/aa20bbb5b1c78963331fb6261763ea4c51ebc04f)) * specify if a module cannot be found or cannot be installed ([a10078a5](https://github.com/dracutdevs/dracut/commit/a10078a5c3ce9adf309962634e71ae6e186f2621)) * **dracut-install:** add fw_devlink suppliers as module dependencies ([3de4c731](https://github.com/dracutdevs/dracut/commit/3de4c7313260fb600507c9b87f780390b874c870)) * **fips:** add progress messages ([68d0653e](https://github.com/dracutdevs/dracut/commit/68d0653e35f79e78b75a71c122c091ba4f4d5759)) * **install.d:** allow using dracut in combination with ukify ([16645633](https://github.com/dracutdevs/dracut/commit/166456331d55cdc23946c11315dc2c88aab15911)) * **kernel-modules:** driver support for macbook keyboards ([df381b7e](https://github.com/dracutdevs/dracut/commit/df381b7e0cd95f78e40ac70f0f3c96a2fa8dd189)) * **livenet:** add memory size check depending on live image size ([52351cfa](https://github.com/dracutdevs/dracut/commit/52351cfa049a9594d539e6a5337d591e8039ab80)) * **lsinitrd:** notify user on missing compressor ([1300a930](https://github.com/dracutdevs/dracut/commit/1300a930e76dbb380c7840760207296a1e58364c)) * **lvm:** always include all drivers that LVM can use ([a109c612](https://github.com/dracutdevs/dracut/commit/a109c6123ffa8506379b73a4b1aeee4d0b67866d)) * **network-wicked:** remove module ([9dbbebb1](https://github.com/dracutdevs/dracut/commit/9dbbebb1339d1c3dc8e6b8835a6edbc95c66e2fe)) * **nvmf:** add code for parsing the NBFT ([b490f6f7](https://github.com/dracutdevs/dracut/commit/b490f6f7d7cf1c322b47af4e44d7f238612fb260)) * **resume:** also consider resume= in the cmdline as enabling hibernation ([e3a7112b](https://github.com/dracutdevs/dracut/commit/e3a7112bef794e2f2dd741ec2c74fa9cb9117651), closes [#924](https://github.com/dracutdevs/dracut/issues/924)) * **systemd:** install systemd-executor ([bee1c482](https://github.com/dracutdevs/dracut/commit/bee1c4824a8cd47ce6c01892a548bdc07b1fa678)) * **systemd-creds:** introducing the systemd-creds module ([48c2cb45](https://github.com/dracutdevs/dracut/commit/48c2cb457b1472d09453be130797bc6e0e194f7c)) * **systemd-rfkill:** remove module ([c4e6eaf9](https://github.com/dracutdevs/dracut/commit/c4e6eaf9c61616a2f27ef6e91cc787888afecde4)) * **test:** nfs_fetch_url test into nfs test ([8f9ad068](https://github.com/dracutdevs/dracut/commit/8f9ad06873eb50754611ece2c18a0cd0b22336c0)) #### Contributors - Antonio Alvarez Feijoo - Henrik Gombos - Laszlo Gombos - Benjamin Drung - Beniamino Galvani - Martin Wilck - наб - Adrien Thierry - Frederick Grose - Andrew Ammerlaan - Pavel Valena - Frantisek Sumsal - Jóhann B. Guðmundsson - Tao Liu - “Masahiro - 0x5c - Andrew Halaney - Daniel McIlvaney - David Disseldorp - Dmitry Klochkov - Emanuele Giuseppe Esposito - John Meneghini - Khem Raj - LinkTed - Lubomir Rintel - Michal Koutný - Michał Zegan - Mike Gilbert - Sam James - Sergio E. Nemirowski - Thomas Blume - Tianhao Chai - Valentin Lefebvre - Vitaly Kuznetsov - keentux - lilinjie dracut-059 ========== #### Bug Fixes * **NEWS.md:** add missing entries ([794ce5e3](https://github.com/dracutdevs/dracut/commit/794ce5e3ee55f1b78be32873a054aed422346f4c)) #### Contributors - Jóhann B. Guðmundsson dracut-058 ========== #### Bug Fixes * **90kernel-modules:** * MMC and NVMe on kernels 6.0+ ([e0d57a8f](https://github.com/dracutdevs/dracut/commit/e0d57a8f5b15847a7fbae2ed3df29ec2c5d25ec7)) * add (nonstandard) NVMe drivers ([415e5519](https://github.com/dracutdevs/dracut/commit/415e5519d19e24d123378710abe47a2df2b22e7b)) * **90multipath:** * use RemainAfterExit=yes for multipathd-configure.service ([2334031a](https://github.com/dracutdevs/dracut/commit/2334031a890a1101c78f986681236c76ba806d91)) * create `/etc/multipath` only ([0940be90](https://github.com/dracutdevs/dracut/commit/0940be905843e93111e96c0d70c56389240fbc04)) * **Makefile:** reduce the number of shell invocations ([ad7d5bc8](https://github.com/dracutdevs/dracut/commit/ad7d5bc8ea181ef805f65ae690681ebe5ba29bbe)) * **base:** * do not require chroot inside initramfs ([51813371](https://github.com/dracutdevs/dracut/commit/518133714b769160448a51c512d5e152ea6332da)) * remove grep dependency ([240a1d34](https://github.com/dracutdevs/dracut/commit/240a1d34bd5d98fb8a7d75cd1053d8abf1c73f64)) * **dbus-broker:** add missing sockets.target.wants/dbus.socket ([7ed04618](https://github.com/dracutdevs/dracut/commit/7ed0461810602bfbd4d5492fc9ed82f15e57fa9f)) * **dmsquash-live:** * add support for NFS ([8caaad4f](https://github.com/dracutdevs/dracut/commit/8caaad4fc2d75982eb87f5ebc72a4c276986f756)) * check kernel for built-in squashfs drivers ([922c9e28](https://github.com/dracutdevs/dracut/commit/922c9e28ed87815cf6ae0b5ee911ff0ef616d1b0)) * run checkisomd5 on correct device ([c8f819e6](https://github.com/dracutdevs/dracut/commit/c8f819e6c1c38e525e4b491b4215a939ee6e00df)) * **dmsquash-live-ntfs:** remove unnecessary command ([e78f71b9](https://github.com/dracutdevs/dracut/commit/e78f71b9da29828ee4cd8444d4841ee127ef8614)) * **dmsquash-live-root:** check kernel for built-in `overlay` drivers ([d0cd7cd3](https://github.com/dracutdevs/dracut/commit/d0cd7cd38711b5425777c3b1595dbf4288beaa23)) * **dracut:** * allow to set persistent policy based on /dev/mapper device names ([9cc7ceec](https://github.com/dracutdevs/dracut/commit/9cc7ceec1e9b4028d1a72bf51f9ea488d7ca11ac)) * shellcheck regression in DRACUT_INSTALL calls ([097dd367](https://github.com/dracutdevs/dracut/commit/097dd367bbd61da1577a182c535c5aacdfd07031)) * replace invalid lzo command with lzop for LZO compression ([b2d7561b](https://github.com/dracutdevs/dracut/commit/b2d7561b98d08c7e4018aa22dc36dc1242e50f09)) * typo error 'aggresive' -> 'aggressive' ([e4f1dbcc](https://github.com/dracutdevs/dracut/commit/e4f1dbcc0061113cb58e555724f76a7243788236)) * **dracut-functions.sh:** * check_kernel_module should follow dracutsysrootdir ([6c42d378](https://github.com/dracutdevs/dracut/commit/6c42d378abe528ee6f10c8272080eec5f3f44acb)) * suppress findmnt error msg if /etc/fstab not exist ([e9ed44c8](https://github.com/dracutdevs/dracut/commit/e9ed44c8864445d85018e31064cd888c358f1daf)) * **dracut-init:** make require_kernel_modules ignore no kernel build ([d460941b](https://github.com/dracutdevs/dracut/commit/d460941b51d0178683b9098e62ad57e43fb71011)) * **dracut-init.sh:** * instmods: wrong variable name ([b12ee558](https://github.com/dracutdevs/dracut/commit/b12ee558f5660073ad26415794570188e8a427b0)) * add missing hostonly code in the inst_multiple function ([e2fdb30b](https://github.com/dracutdevs/dracut/commit/e2fdb30b56305aed9d3be32f394352c7c3fdbcef)) * correct dracut-install source path ([72b700e3](https://github.com/dracutdevs/dracut/commit/72b700e3cb8a0d74033e6e20b2435d9254b36efe)) * propagate the result code returned by dracut-install ([d2f6f445](https://github.com/dracutdevs/dracut/commit/d2f6f445edb5de033d52ece0e982db38ac2614e2)) * **dracut-initramfs-restore.sh:** * initramfs detection not working ([481b87fa](https://github.com/dracutdevs/dracut/commit/481b87fa7a82be54663071ad9ad76c34e378ddc7)) * hide unpack errors ([4f20ae26](https://github.com/dracutdevs/dracut/commit/4f20ae2620a9067270fe3e5f191ada6bff7b0ec1)) * **dracut-install:** * use stripped kernel module path as hash key ([2f791b40](https://github.com/dracutdevs/dracut/commit/2f791b401b287f67f2421452b5f82cdb5285a637)) * do not try to copy files from the root directory ([ebbcf97d](https://github.com/dracutdevs/dracut/commit/ebbcf97dc7267f47ae568909305bcb05de2876b4)) * correctly waitpid() for cp ([13736c50](https://github.com/dracutdevs/dracut/commit/13736c50c797d63ab75468ded17bc7935d7f1f94)) * convert_abs_rel: return valid path on error ([06d31617](https://github.com/dracutdevs/dracut/commit/06d316171cd5e0e86c21006f93776ba9f49087cc)) * **dracut-logger.sh:** this fixes the dlog_init check for /dev/log ([6b592f58](https://github.com/dracutdevs/dracut/commit/6b592f581c1a5ec489acee95779867e0485770fd)) * **dracut-systemd:** run systemctl daemon-reload after remove_hostonly_files ([e1058b07](https://github.com/dracutdevs/dracut/commit/e1058b07ea2acb1bdb2d52f778639e093b1ed8a6)) * **dracut.sh:** * split drivers_dir check ([d32d221e](https://github.com/dracutdevs/dracut/commit/d32d221efd77dcc0afa1d39230f7bdc2958ffca5)) * use DRACUT_ARCH instead of `uname -m` ([a86aea65](https://github.com/dracutdevs/dracut/commit/a86aea65186b47ac210a3947c966311bb5371aeb)) * make omit-drivers option do exact match for names ([444944ab](https://github.com/dracutdevs/dracut/commit/444944ab37c2446adf07dd163225707e90aabef3)) * correct wrong systemd variable paths ([b9dc999f](https://github.com/dracutdevs/dracut/commit/b9dc999f87a477af53e379d7fb1053d13d6dbe88)) * remove duplicate "dracut:" string in logger functions ([8410ee22](https://github.com/dracutdevs/dracut/commit/8410ee22903403cd673a22692a084125c835cbe9)) * do not fail on irregular files ([b72d0d7f](https://github.com/dracutdevs/dracut/commit/b72d0d7f9be53c1ad04f132daf0297aff7581e9c)) * **dracut.spec:** tpm2-tools is required for crypt module to work ([8abffe7c](https://github.com/dracutdevs/dracut/commit/8abffe7cca2e210e15c618beeffe7450be357f73)) * **drm:** add video drivers needed on hyper-v and similar ([85149b85](https://github.com/dracutdevs/dracut/commit/85149b85961aa535a3c61d492cd3594794e5cc3f)) * **github:** yml syntax and commit message for dependabot ([32f6dd1d](https://github.com/dracutdevs/dracut/commit/32f6dd1d5f0b7c24bda8bf950df176a0791045cb)) * **i18n:** * do not fail if FONT in /etc/vconsole.conf has the file extension ([e1de5bd2](https://github.com/dracutdevs/dracut/commit/e1de5bd2d711df2c6814a3c3ab8472cdb4de9101)) * add required includes for keymaps ([fe8fa2b0](https://github.com/dracutdevs/dracut/commit/fe8fa2b0cadbb33e27c8dd8b5851548dcd65835c)) * **install.d:** add --verbose if KERNEL_INSTALL_VERBOSE=1 ([846a8453](https://github.com/dracutdevs/dracut/commit/846a845375b8a9ea48741079d523e6b464950ea7)) * **integrity:** * do not enable EVM if there is no key ([90585c62](https://github.com/dracutdevs/dracut/commit/90585c624af15ba0abb7f32b0c2afc2b122dd019)) * remove unused variable ([9d1004a4](https://github.com/dracutdevs/dracut/commit/9d1004a4e9883ecabdca478a809efb5501a1e47a)) * **iscsi:** don't install the module if kernel doesn't support iscsi ([7917d797](https://github.com/dracutdevs/dracut/commit/7917d7976ded6384433ef8fb2ce1905f0a76358e)) * **kernel-modules:** * add sysctl to initramfs to handle modprobe files ([33679fff](https://github.com/dracutdevs/dracut/commit/33679fff5deb733f9dfe8d005066ac98e107c083)) * always include nvmem driver on nvmem_on_arm ([bc965cd8](https://github.com/dracutdevs/dracut/commit/bc965cd8890013a6362733d217c18756134bbcdf)) * **load_fstype:** use $1 if $2 is missing ([401158e5](https://github.com/dracutdevs/dracut/commit/401158e58c47b2e1278a47b9cd236f501cfe2732)) * **lsinitrd.sh:** * add a missing path to image ([e877be69](https://github.com/dracutdevs/dracut/commit/e877be69b41199ee4384ccb6352754bb9edfbba4)) * correct skipcpio source path ([5eb996a9](https://github.com/dracutdevs/dracut/commit/5eb996a9936a87918a4320963a8681975ed86be4)) * **lvm:** drop dm-eventd binary and libs from initramfs ([7d3184e4](https://github.com/dracutdevs/dracut/commit/7d3184e430823f7eee4acee87576acdcf02746c2)) * **man:** * correct typo ([699e3945](https://github.com/dracutdevs/dracut/commit/699e39458962bc1a06a096f24ad86ffb87e8779e)) * dracut.cmdline.7: clarify "rd.nvmf.discover=fc,auto" ([a90efdd7](https://github.com/dracutdevs/dracut/commit/a90efdd704271dab6717329e88b3a1c9e850d23b)) * dracut.cmdline(7): correct syntax for rd.nonvmf ([4b69e63b](https://github.com/dracutdevs/dracut/commit/4b69e63b7414567a03e8da79acc2efe32e0a6a94)) * point man pages to github.com instead of kernel.org ([d6d55584](https://github.com/dracutdevs/dracut/commit/d6d555845e53dca0b083d59c8cedf465e6b70b71)) * correct typo ([7fa0094c](https://github.com/dracutdevs/dracut/commit/7fa0094c0087a827a22f30ec62f03f243b000bf3)) * **multipath:** install multipathd.socket ([02e646fc](https://github.com/dracutdevs/dracut/commit/02e646fc7ec91e1fbaa0f2097f35781ae41da937)) * **network:** * check if ip command fails ([52d14607](https://github.com/dracutdevs/dracut/commit/52d14607d18d99c0c2c3242a64561b1af6a332d1)) * two bugs which cause minutes long boot times ([1d6f42c8](https://github.com/dracutdevs/dracut/commit/1d6f42c8a4029380c2147018e64fb7ebc9e175e7)) * avoid double brackets around IPv6 address ([2c26b703](https://github.com/dracutdevs/dracut/commit/2c26b703223bb65822954264bcd6ca7934c98b4a)) * don't use same ifname multiple times ([f4e9ea87](https://github.com/dracutdevs/dracut/commit/f4e9ea879f38bea92069e9397028caa5d81e5aee)) * **network-legacy:** * check if dhclient has --timeout option ([23654c50](https://github.com/dracutdevs/dracut/commit/23654c50b003612d1b6e4b09c0bde7dd88239fd8)) * correct wrong local network configuration path ([2eb733cc](https://github.com/dracutdevs/dracut/commit/2eb733cc11c09358b79e2c73218953f5bb64da93)) * **network-manager:** * always install the library plugins directory ([429f9de1](https://github.com/dracutdevs/dracut/commit/429f9de1c767c816301097a42cec762dc82d67da)) * correct wrong local network configuration path ([744c6de5](https://github.com/dracutdevs/dracut/commit/744c6de5cde38d012f93bc53f9076bf9c37b8b72)) * **nfs,virtiofs:** check kernel for builtin fs drivers ([78cafe46](https://github.com/dracutdevs/dracut/commit/78cafe465d972ed52cc9d847c9895716a5f44e7e)) * **nvmf:** * run cmdline hook before parse-ip-opts.sh ([a65fab69](https://github.com/dracutdevs/dracut/commit/a65fab69662d3adf52eb968411f59ebc5a173f7c)) * avoid calling "exit" in a cmdline hook ([a93968b0](https://github.com/dracutdevs/dracut/commit/a93968b07567a654d18b8ef2144337d803186eca)) * make sure "rd.nvmf.discover=fc,auto" takes precedence ([556ef46a](https://github.com/dracutdevs/dracut/commit/556ef46aa96650d72b2fd850a09fa04dff64bbb8)) * don't use "finished" queue for autoconnect ([e93e4652](https://github.com/dracutdevs/dracut/commit/e93e46520dd89a7357a15441ab6b141ff9ff9aeb)) * don't create did-setup file ([03921ec0](https://github.com/dracutdevs/dracut/commit/03921ec09e95ea49f89ae307dcca4e2e3d1bc6d6)) * no need to load the nvme module ([a3cf4ec9](https://github.com/dracutdevs/dracut/commit/a3cf4ec92202df43adf368c7fdd12e35d304a0e4)) * don't try to validate network connections in cmdline hook ([b3ff3f3f](https://github.com/dracutdevs/dracut/commit/b3ff3f3fbce6878a754332cd4a05374e5e1156c8)) * nvme list-subsys prints the address using commas as separator ([9664e98b](https://github.com/dracutdevs/dracut/commit/9664e98b5db603567d42d4d0c6e6ea1bd3d5bf24)) * **shell-completion:** add missing -p and --parallel options ([b30a00c2](https://github.com/dracutdevs/dracut/commit/b30a00c2a2815517e79eeaeef5f76fd6f923e61f)) * **skipcpio:** ignore broken pipe ([aa0369a4](https://github.com/dracutdevs/dracut/commit/aa0369a4a31764fde06214358b0774fb1095af01)) * **squash:** build ld cache for squash loader ([bc1b23c2](https://github.com/dracutdevs/dracut/commit/bc1b23c29202023dd7852f4c3e3e97aaaf94da92)) * **systemd:** * add missing modprobe@.service ([928252a1](https://github.com/dracutdevs/dracut/commit/928252a145ca44627ba5873e01245eabe246992f)) * set right permissions for the machine-id file ([da55e266](https://github.com/dracutdevs/dracut/commit/da55e2663499f6218d28783076c5449a9a6b8ec9)) * **systemd-coredump:** correct systemd-coredump binary path ([4b931bfb](https://github.com/dracutdevs/dracut/commit/4b931bfb4f594834d06787b3506c4a0ddbbe48ac)) * **systemd-hostnamed:** * add missing dbus-org.freedesktop.hostname1.service ([4fca292b](https://github.com/dracutdevs/dracut/commit/4fca292b957c8ec256111442ba0db4e539442ac8)) * correct sysusers configuration ([a540c95b](https://github.com/dracutdevs/dracut/commit/a540c95bbf9496f7b9d6e86aa5080173d73dff78)) * **systemd-networkd:** typo in systemd-networkd.socket local conf path ([d4732be8](https://github.com/dracutdevs/dracut/commit/d4732be87782016c2699fbf980d63ac366819942)) * **systemd-timedated:** add missing dbus-org.freedesktop.timedate1.service ([b3d219b4](https://github.com/dracutdevs/dracut/commit/b3d219b475c8f695ccfb8b741282583da710befa)) * **systemd-timesyncd:** typo in systemd-time-wait-sync.service local conf path ([e3ec51e1](https://github.com/dracutdevs/dracut/commit/e3ec51e128135d56c3995d87ca2a4ff65b253391)) * **test:** remove unnecessary setup steps ([22ab7979](https://github.com/dracutdevs/dracut/commit/22ab79794852eced9caaccd8763332b870e97032)) * **virtiofs:** * make shebangs work on split-usr systems ([27b316df](https://github.com/dracutdevs/dracut/commit/27b316df1f001949675fbeddaeab6ff56bc449d2)) * ismounted has a dependency on the base module ([c73e7b99](https://github.com/dracutdevs/dracut/commit/c73e7b99db8c759d89236d0791145d6919abd2bc)) * **zipl:** remove trailing spaces from zipl boot device name ([b4de9ee1](https://github.com/dracutdevs/dracut/commit/b4de9ee107742c8b0b8a86dcc22aa4fd366b068e)) #### Features * **dmsquash-live:** * add support for dash ([862ba526](https://github.com/dracutdevs/dracut/commit/862ba52683834f87722cae7a6692a59d09271ec3)) * add new dmsquash-live-autooverlay module ([a3c67d27](https://github.com/dracutdevs/dracut/commit/a3c67d27e75223bb45df19f850d246ced9a09938)) * **dracut-init.sh:** * introduce a new helper require_kernel_modules ([d3a5e631](https://github.com/dracutdevs/dracut/commit/d3a5e6312a84b29bcb10fd5d28e1314f1acbc78f)) * add inst_libdir_dir() helper ([cc669250](https://github.com/dracutdevs/dracut/commit/cc669250affa0176ed2bba866d8e933fb0668f4c)) * **dracut-install:** convert_abs_rel: canonicalise parent of from, too ([53dd6a9b](https://github.com/dracutdevs/dracut/commit/53dd6a9bbb0eb91dea0e56bec556bf865a920b2e), closes [#1781](https://github.com/dracutdevs/dracut/issues/1781)) * **dracut.sh:** * populate uefi_cmdline if no other cmdline is given ([1157143d](https://github.com/dracutdevs/dracut/commit/1157143d67b02ccf95602ae082f6fbfd1a20f342)) * pass engine flag to sbsign allowing use with hardware devices ([897e5eff](https://github.com/dracutdevs/dracut/commit/897e5effe08f15de6b20099caeda7bc1167b7026)) * **fs-lib:** fsck_single can now handle PARTLABEL and PARTUUID ([d40617f7](https://github.com/dracutdevs/dracut/commit/d40617f720ce7d895be4f6297ac4342d4492c39a)) * **github:** automating dependency updates ([bdddfd56](https://github.com/dracutdevs/dracut/commit/bdddfd561f38469b3f51d7e6af196ff1f190e2a2)) * **kernel-modules:** exclude USB drivers in strict hostonly mode ([7debf540](https://github.com/dracutdevs/dracut/commit/7debf540ca69d9171cb86b4752c882bac997c26e)) * **multipath:** install tmpfiles.d config file ([cf31fcf8](https://github.com/dracutdevs/dracut/commit/cf31fcf804be4dc0fa31885f5185a59b6012cdf4)) * **nvmf:** set rd.neednet=1 if tcp records encountered ([cf8986af](https://github.com/dracutdevs/dracut/commit/cf8986af7d9a3ce73f330de23d5312f924acea34)) * **overlayfs:** * add new overlayfs module to dracut.spec ([b55563f6](https://github.com/dracutdevs/dracut/commit/b55563f635fb8aad5e141c4fa5d3e486dc2b0b60)) * add a new module called overlayfs ([40dd5c90](https://github.com/dracutdevs/dracut/commit/40dd5c90e0efcb9ebaa9abb42a38c7316e9706bd)) * **qemu:** add efi_secret driver ([8194f72a](https://github.com/dracutdevs/dracut/commit/8194f72af2e9b6ab3cdb01412381023b0a58c852)) * **squash:** use require_kernel_modules for better module checking ([d4a9d6b4](https://github.com/dracutdevs/dracut/commit/d4a9d6b4c006a375e0b89396251e8ad1aecc0b16)) * **systemd:** install systemd-sysroot-fstab-check ([23684e4a](https://github.com/dracutdevs/dracut/commit/23684e4a2bb024595ad63d9f49d83b4693537110)) * **systemd-pcrphase:** introducing the systemd-pcrphase module ([d345ca2e](https://github.com/dracutdevs/dracut/commit/d345ca2efd5e017be5cc80cfc96137a7f0bee425)) * **systemd-portabled:** introducing the systemd-portabled module ([03babd95](https://github.com/dracutdevs/dracut/commit/03babd95e28bc884e87fd0885edafb2ee91f8935)) * **systemd-pstore:** introducing the systemd-pstore module ([758f2e69](https://github.com/dracutdevs/dracut/commit/758f2e69374d7865bf55a74ee218a1d52df20123)) * **test:** add new module to share code between tests ([f5689b42](https://github.com/dracutdevs/dracut/commit/f5689b42bdb9dfcb0f1b610d7db845ceac985061)) * **test-makeroot:** add new module to share code between tests ([54b963ca](https://github.com/dracutdevs/dracut/commit/54b963ca35a3a4cc8bcdb35e5e9ebb74af09191e)) * **test-root:** add new module to share code between tests ([b17a3103](https://github.com/dracutdevs/dracut/commit/b17a3103a516b5a45af954b1e2969a5256fffebc)) #### Performance * **90kernel-modules:** use awk instead of shell monster ([77ac95d9](https://github.com/dracutdevs/dracut/commit/77ac95d9091afcfdbd1fe0372389613914dd1bc6)) * **dracut-install:** * convert_abs_rel: don't allocate target parent realpath ([d2648f6d](https://github.com/dracutdevs/dracut/commit/d2648f6dd8277c3d9a0b8d05ca66a212da47070e)) * strdup()+[dirlen]=0 => strndup ([e7d6a1e3](https://github.com/dracutdevs/dracut/commit/e7d6a1e30c34134d27c0ae921b7d18525ddf3dea)) * **dracut.sh:** do not mkdir $initdir/lib/dracut within a loop ([8d46cc01](https://github.com/dracutdevs/dracut/commit/8d46cc01a95afc6902e8c86a795db082622a3c74)) #### Contributors - Laszlo Gombos - Antonio Alvarez Feijoo - Martin Wilck - Kairui Song - Marcos Mello - наб - David Tardon - Jóhann B. Guðmundsson - Matt Coleman - Pavel Valena - Alberto Planas - Brian C. Lane - Jonathan Lebon - Lukas Nykryn - keentux - Cole Robinson - Daan De Meyer - Frederick Grose <4335897+FGrose@users.noreply.github.com> - Frederick Grose - Hari Bathini - Henrik Gombos - Jeremy Linton - Kenneth D'souza - Laura Hild - Mike Gilbert - Mikhail Novosyolov - Neal Gompa - Scott Moser - Tao Liu - Tianhao Chai - gombi - joamonwx - runsisi - tupper dracut-057 ========== #### Bug Fixes * **10i18n:** * stop leaking shell options ([f3441cc7](https://github.com/dracutdevs/dracut/commit/f3441cc7c577554dde04a9fe90638f779bb0a411)) * stop leaking shell options ([35064768](https://github.com/dracutdevs/dracut/commit/35064768ebf14d3ec6bf3f7df52580fb4920ea3d)) * **Makefile:** use of potentially unset variable ([1354d633](https://github.com/dracutdevs/dracut/commit/1354d6339a2e603fe0787bc028f9e7e1d49cbf82)) * **bluetooth:** * accept compressed firmwares in inst_multiple ([09a1e5af](https://github.com/dracutdevs/dracut/commit/09a1e5afd2eaa7f8e9f3beaf8a48283357e7fea0)) * nullglob should not be needed ([36aaa74f](https://github.com/dracutdevs/dracut/commit/36aaa74f3641d375cb435298864fad1945444893)) * make $dbussystem/bluetooth.conf optional ([a38d9ec0](https://github.com/dracutdevs/dracut/commit/a38d9ec0320f3819a3b70dc5bb59f6d2fc570149)) * **configure:** check for SYS-gettid during configure ([0ef40d88](https://github.com/dracutdevs/dracut/commit/0ef40d88124fe67726b8b5d8321dce064c727447)) * **connman:** copy netroot.sh from the network module and install it ([f6d83f9f](https://github.com/dracutdevs/dracut/commit/f6d83f9f5cd4850468f26048f8eed015dc2bd0e0)) * **crypt:** add missing is_keysource parameter to cryptroot-ask ([6c11a8fc](https://github.com/dracutdevs/dracut/commit/6c11a8fcee08c297a34bd5c5215a7a29d3529b85)) * **dmsquash-live:** * mount live device with the correct type ([08ed7b2d](https://github.com/dracutdevs/dracut/commit/08ed7b2d0035eaa699c139bc9719f90190f6ffc1)) * permanent overlay on the same drive as LiveCD .iso ([9a884b3a](https://github.com/dracutdevs/dracut/commit/9a884b3afce1ebc8c6a6e5f62594ce708486a826)) * **dracut:** default to correct firmware search paths ([95aeed89](https://github.com/dracutdevs/dracut/commit/95aeed8975dd5a2af782ec986f2af6176b585c59)) * **dracut-functions.sh:** correct wrong comment ([0afa840e](https://github.com/dracutdevs/dracut/commit/0afa840e111e63da14edcb655886734b45d61c4b)) * **dracut-initramfs-restore.sh:** * unpack uncompressed initrd as last option ([46886956](https://github.com/dracutdevs/dracut/commit/46886956211f8a436e2e9f81fc4972d2a297c3a3)) * check if SELINUXTYPE is set ([24d8f35b](https://github.com/dracutdevs/dracut/commit/24d8f35b9c162f42c58abd27fe9c75bbf76cbfe7)) * **dracut-install:** * copy files preserving ownership attributes ([9ef73b6a](https://github.com/dracutdevs/dracut/commit/9ef73b6ad08c19c3906564e5a15c7908ed9a81c8)) * do not fail when SOURCE is optional and missing ([bd1a5ca9](https://github.com/dracutdevs/dracut/commit/bd1a5ca9ae9e347061e67e51be29335ab074ad95)) * **dracut-systemd:** * drop misleading man page reference ([77c28b30](https://github.com/dracutdevs/dracut/commit/77c28b3020b7dede848d8282151f609d80905b05)) * correct service dependencies ([85fdff12](https://github.com/dracutdevs/dracut/commit/85fdff1212e708d335f035926f3c2a6b87bb1c3c)) * **dracut.cmdline.7:** {=> must} also be specified ([27071e9a](https://github.com/dracutdevs/dracut/commit/27071e9a0e7928bccc45469eb659cdafb20f134b)) * **dracut.sh:** * format usage and add missing options ([9bef7109](https://github.com/dracutdevs/dracut/commit/9bef71094eba84a9eac161fc45386ccd73bd2b34)) * always check that MACHINE_ID is not empty ([527fdfa1](https://github.com/dracutdevs/dracut/commit/527fdfa1517b7f010afa049fe6add71e4c916cdd)) * avoid calling dfatal before dracut-logger is sourced ([012d7db2](https://github.com/dracutdevs/dracut/commit/012d7db27da7416471ed49ee2ca666ab95837f47)) * add missing default output file paths ([28ef3bc6](https://github.com/dracutdevs/dracut/commit/28ef3bc6a6f1efcd8d8c16228a6dee9d563342e7)) * add missing --libdirs usage ([352e5917](https://github.com/dracutdevs/dracut/commit/352e59173152f13b242c598a735243f0f2850ff1)) * drop restorecon call ([33859892](https://github.com/dracutdevs/dracut/commit/3385989266ddb1c0685f9f7501f1835e9ce49730)) * error exporting sysctl variables ([4c355d05](https://github.com/dracutdevs/dracut/commit/4c355d05587b0432a6dc551b8693dbdc51a07962)) * **dracut.spec:** add connman module ([d0c6ab21](https://github.com/dracutdevs/dracut/commit/d0c6ab21d906cc5b0e05e1107c48baffcbedb02c)) * **fedora.conf:** vi binary is missing ([48541362](https://github.com/dracutdevs/dracut/commit/485413627f04fdc0c5c29958ce437718b262a99c)) * **github:** remove packit ([8fd37d20](https://github.com/dracutdevs/dracut/commit/8fd37d20f4b7cc08ee0970e0249aac4cd5b47a4e)) * **ifcfg:** avoid calling unavailable dracut-logger functions ([7103c4bc](https://github.com/dracutdevs/dracut/commit/7103c4bce9240d5896a0d207c216e0f6270ad2e8)) * **install:** restore musl support ([ce55a85e](https://github.com/dracutdevs/dracut/commit/ce55a85ed5d902c19d75895508856f96ec2ceb1a)) * **integrity:** do not display any error if there is no IMA certificate ([f63f411d](https://github.com/dracutdevs/dracut/commit/f63f411d52df613936082d646ab072447b8b9d7f)) * **iscsi:** * do not exit in handle_netroot() if discovery failed ([319dc7fe](https://github.com/dracutdevs/dracut/commit/319dc7fe10585a19d1a051f8ad1ba0190f86ff1f)) * remove unneeded iscsi NOP-disable code ([a33a8df4](https://github.com/dracutdevs/dracut/commit/a33a8df43d33c9bdf85d7a5b7392585129a690f5)) * **kernel-network-modules:** allow specifying empty --hostonly-nics ([ab6f5733](https://github.com/dracutdevs/dracut/commit/ab6f57339ad77b5bc116400f7b66580745bfc563)) * **lsinitrd.sh:** * always check that MACHINE_ID is not empty ([d6343146](https://github.com/dracutdevs/dracut/commit/d6343146c1db69fc724ca666a5d9321af7fd0d46)) * add missing default paths ([49ea6c42](https://github.com/dracutdevs/dracut/commit/49ea6c42db7180eec5ba57e082a38d116f2d17a5)) * **lvm:** * add missing grep requirement ([79f9d9e1](https://github.com/dracutdevs/dracut/commit/79f9d9e1c29a9c8fc046ab20765e5bde2aaa3428)) * ignore expected error message from lvm config ([7e03d81f](https://github.com/dracutdevs/dracut/commit/7e03d81fe3df932558d2b7280fa57da24ba955c0)) * **man:** * add missing default paths ([ffc1985c](https://github.com/dracutdevs/dracut/commit/ffc1985cb26894c50487b7db2703e8715a4a7537)) * add missing --libdirs section ([a90dbd95](https://github.com/dracutdevs/dracut/commit/a90dbd958b19778044047f17559449fffdb94cc2)) * **network-manager:** avoid calling unavailable dracut-logger functions ([b7059aef](https://github.com/dracutdevs/dracut/commit/b7059aef5962aad1dc8d96a0f600105a40867380)) * **nfs:** * give /run/rpcbind ownership to rpc user ([d6159343](https://github.com/dracutdevs/dracut/commit/d615934311e25146bb37943bf1385a19dfdbd9e8)) * require and install needed binaries ([0e4df7a3](https://github.com/dracutdevs/dracut/commit/0e4df7a39dda388dc71ff6f749c8197cba4442b9)) * **nvmf:** * deprecate old nvmf cmdline options ([e405501e](https://github.com/dracutdevs/dracut/commit/e405501e23462d151bba252133f4a6179bf79cf0)) * set executable bit on nvmf-autoconnect.sh ([25a92885](https://github.com/dracutdevs/dracut/commit/25a92885a9519701cc480298c2b082e2e2bf5ebe)) * **plymouth:** hide dpkg-architecture stderr messages ([42e9d188](https://github.com/dracutdevs/dracut/commit/42e9d1889298c3d8badfb6f95e16e048ad83a1f6)) * **resume:** correct call to block_is_netdevice function ([a7a4b76c](https://github.com/dracutdevs/dracut/commit/a7a4b76c4ad5794f5f8a24ecd5b495f1512d05f7)) * **shell-completion:** add missing options ([1199f990](https://github.com/dracutdevs/dracut/commit/1199f990bb93b4e6bd56fa3df050b17fc7e6c378)) * **systemd-coredump:** add systemd-sysusers dependency ([ce82e969](https://github.com/dracutdevs/dracut/commit/ce82e969f8faaccbb57be178833ef4e39f01cdf9)) * **systemd-journald:** remove duplicate entry in inst_multiple ([d3ab2061](https://github.com/dracutdevs/dracut/commit/d3ab20615ef94370e43b042d913d5f787dd52430)) * **systemd-timesyncd:** add systemd-sysusers dependency ([28b6adcb](https://github.com/dracutdevs/dracut/commit/28b6adcb27fb5240c01f7d41511ce02597aa27bd)) * **test:** * dmsquash-live test without an iso ([6ee2baf3](https://github.com/dracutdevs/dracut/commit/6ee2baf314fc6aa3bb88ca52d11c9f599223eb77)) * remove stale comments ([b3ab3037](https://github.com/dracutdevs/dracut/commit/b3ab3037e8b9272498ed40131f30bf1831acab73)) * add support for dpkg to pass the test on debian ([a7dfdf6a](https://github.com/dracutdevs/dracut/commit/a7dfdf6acbf7a87fd2735541f06a062126966f69)) * nullglob should not be needed ([c7b3ac2b](https://github.com/dracutdevs/dracut/commit/c7b3ac2bd115521855b3ad8ce287cb1a9afca128)) * **udev-rules:** add cdrom udev rules by default ([aebeb2ec](https://github.com/dracutdevs/dracut/commit/aebeb2ecdf76b7716fadbab8b216b8805d36a461)) #### Features * add aarch64 uefi support ([8391a993](https://github.com/dracutdevs/dracut/commit/8391a993033e212a24635dd629c167354f0834f8)) * **connman:** introduce connman support module ([f30d0351](https://github.com/dracutdevs/dracut/commit/f30d03513f357a36d2ed48a522c7ef2a46bb0c5c)) * **dracut:** * support parallel execution with --parallel ([6d923262](https://github.com/dracutdevs/dracut/commit/6d92326201014cde9ab04b90367017f875d3b991)) * add zfs detection ([9582f027](https://github.com/dracutdevs/dracut/commit/9582f02773c5115e14fe0992ec2db3935cb0e6eb)) * **dracut-install:** support ZSTD-compressed firmware with .zst suffix ([9d8387ed](https://github.com/dracutdevs/dracut/commit/ 9d8387ed803dfc3e8b97d2e415a15083774d7ac6)) * **dracut-systemd:** use Documentation= to point to man page ([42e8f17c](https://github.com/dracutdevs/dracut/commit/ 42e8f17c2481d33a3d6ba23f653c835e0cda6994)) * **gensplash:** remove module ([1befc641](https://github.com/dracutdevs/dracut/commit/1befc6416743a527824f0f2cc25471e86a6f8a79)) * **lvm:** add new module lvmthinpool-monitor ([d9812fc4](https://github.com/dracutdevs/dracut/commit/d9812fc4ae18a39c144140dd60cb03e16e0d2e06)) * **man:** add documentation for rd.luks.key.tout ([65e41b54](https://github.com/dracutdevs/dracut/commit/65e41b54600878e3e08bbe3b60f66524e1d166a8)) * **squash:** * add shell completion for --squash-compressor option ([e2aee2d4](https://github.com/dracutdevs/dracut/commit/e2aee2d436cf68c4515a381d620a963ff18dcf05)) * update the manual page for --squash-compressor ([3693bfef](https://github.com/dracutdevs/dracut/commit/3693bfef2fc252f5a4b18278c87a1076896b7fb5)) * decouple the compressor for dracut and dracut-squash ([90d9ae8c](https://github.com/dracutdevs/dracut/commit/90d9ae8ca814c26045ecea63fa15bd8959076d0d)) * **url-lib.sh:** add --retry-connrefused to default curl arguments ([90032a46](https://github.com/dracutdevs/dracut/commit/ 90032a463190ab68f20f493894f667320466082d)) * **virtiofs:** virtiofs root filesystem support ([4632f799](https://github.com/dracutdevs/dracut/commit/4632f799954c18eb8f655efe05b1e6ce30246828)) #### Contributors - Antonio Alvarez Feijoo - Laszlo Gombos - Pavel Valena - David Tardon - Tao Liu - наб - German Maglione - Jóhann B. Guðmundsson - Nicolas Porcel - Zoltán Böszörményi - nkraetzschmar - Benjamin Gilbert - Coiby Xu - Conrad Hoffmann - David Teigland - James Morris - Lee Duncan - Martin Wilck - Masahiro Matsuya - Michal Hecko - Morten Linderud - Savyasachee Jha - Shreenidhi Shedi - Wenchao Hao dracut-056 ========== #### Bug Fixes * **base:** * do not change the provided UUID ([4e858741](https://github.com/dracutdevs/dracut/commit/4e858741087a5cfea891bd2c1fd51ea9b830aeaf)) * add default device choice ([e8c18c9f](https://github.com/dracutdevs/dracut/commit/e8c18c9f7f5ed94898f70e9ff5a5f94a815a2b49)) * tr needs to be installed ([dfbfd33b](https://github.com/dracutdevs/dracut/commit/dfbfd33b24524c0c10ad3594be143192f5b7da84)) * do not quote $initargs for switch_root ([f649cd10](https://github.com/dracutdevs/dracut/commit/f649cd10b2e920e9d65c532db9b9f89a7370ad99)) * repair installing dracut-util ([d7acf107](https://github.com/dracutdevs/dracut/commit/d7acf107f2ac619f73dfa29588ea9adfaf79e296)) * **bluetooth:** * make hostonly configuration files optional ([d03fb675](https://github.com/dracutdevs/dracut/commit/d03fb675d8e904c6c44de9b91814b33c45043f4f)) * dbus configuration path fixes ([34b1dd2e](https://github.com/dracutdevs/dracut/commit/34b1dd2e26c343e9000094db01a7985b6851adf1)) * **cms:** reload NetworkManager connections ([07977ee5](https://github.com/dracutdevs/dracut/commit/07977ee5c5294a5d30c1f33f292a0b31303750fb)) * **cpio:** * correct dev_t -> rmajor/rminor mapping ([acc629ab](https://github.com/dracutdevs/dracut/commit/acc629abb0d7a26f692f99e5a9cf8c8401bc6a86)) * write zeros instead of seek for padding and alignment ([0af11c5e](https://github.com/dracutdevs/dracut/commit/0af11c5ea5018a3e1049a2207a9a671049651876)) * **crypt:** remove quotes from cryptsetupopts ([e0abf88a](https://github.com/dracutdevs/dracut/commit/e0abf88a15d23fbf793cf872397016ad86aeaaa8), closes [#1528](https://github.com/dracutdevs/dracut/issues/1528)) * **crypt-gpg:** * tr needs to be installed ([a93fbc4a](https://github.com/dracutdevs/dracut/commit/a93fbc4ae00d8c6ecda67319a6425f7966609bbe)) * execute --card-status on each try ([66100936](https://github.com/dracutdevs/dracut/commit/6610093698db25fda1d584b9771da1e2c2330095)) * **dasd_rules:** * correct udev dasd rules parsing ([5de6e4d5](https://github.com/dracutdevs/dracut/commit/5de6e4d56e5206cb47f645ad1cb6d39794048c68)) * remove collect based udev rule creators ([ebafbd82](https://github.com/dracutdevs/dracut/commit/ebafbd824175e201ae9476576588a896c6b7d7eb)) * **dmsquash-live:** * option to use overlayfs on a block device root ([813577e2](https://github.com/dracutdevs/dracut/commit/813577e2ba034b448d2cf2d2857b2d20d56c0259)) * do not install systemd files when systemd is not enabled ([bf8738d3](https://github.com/dracutdevs/dracut/commit/bf8738d31ca53ad6410c46c1f9b2a4a12273b9a3)) * iso-scan requires rmdir ([e19e3890](https://github.com/dracutdevs/dracut/commit/e19e38904c054664473207d2d6ef3c53bd938867)) * correct regression introduced with shellcheck changes ([0c631efb](https://github.com/dracutdevs/dracut/commit/0c631efb10bf4ce18ec8640277bd94712950298a)) * **dmsquash-live-ntfs:** fuse3 no longer requires ulockmgr_server ([75ad2699](https://github.com/dracutdevs/dracut/commit/75ad269931eccd266a5d60ba4000d93655143e00)) * **dracut:** be more robust when using 'set -u' ([22a80629](https://github.com/dracutdevs/dracut/commit/22a80629b4bbcef02eb8fe3611ea44e253ef4c61)) * **dracut-functions.sh:** * ip route parsing ([d754e1c6](https://github.com/dracutdevs/dracut/commit/d754e1c6f081a6501cb7fdcb5caaa6c4977235af)) * get block device driver if in a virtual subsystem ([dc3b976f](https://github.com/dracutdevs/dracut/commit/dc3b976f3393d7a3fb75b349418fc8ee2c9142bd)) * **dracut-init:** unbreak a comment ([bc4f196f](https://github.com/dracutdevs/dracut/commit/bc4f196f9825029eaef7ccf525ec57f5229b2793)) * **dracut-initramfs-restore.sh:** * add missing compression options ([e86397de](https://github.com/dracutdevs/dracut/commit/e86397de24f4efa6d36e2bb5ae84b7d9ec69b72d)) * add missing default paths ([3d8e1ad2](https://github.com/dracutdevs/dracut/commit/3d8e1ad2ae1e34244ddf700beea6358c1452e05c), closes [#1628](https://github.com/dracutdevs/dracut/issues/1628)) * **dracut-install:** tweaks to get_real_file() ([1beeaf3b](https://github.com/dracutdevs/dracut/commit/1beeaf3b71aed763d5fc7a9ee044d675f8906e8c)) * **dracut-shutdown:** add cleanup handler on failure ([7ab1d002](https://github.com/dracutdevs/dracut/commit/7ab1d00227cad6f1b86ba01fdc766769faebb031)) * **dracut-systemd:** do not use Requires for vconsole-setup.service ([a7f5429c](https://github.com/dracutdevs/dracut/commit/a7f5429cb81f7ffdf9bd5684af8d36725170b756)) * **dracut.sh:** * do not ignore invalid config file or dir path ([7de9ffc0](https://github.com/dracutdevs/dracut/commit/7de9ffc0574790ecbad74b5a000ecd022d7736d4)) * check kernel zstd support early ([475497b1](https://github.com/dracutdevs/dracut/commit/475497b1bd12c006c782541124b6427cb7ef4cb7)) * check availability of configured compression ([bdac657b](https://github.com/dracutdevs/dracut/commit/bdac657bf65615438942a872491a818750735014)) * inform user about auto-selected compression method ([06d47ded](https://github.com/dracutdevs/dracut/commit/06d47ded679231e1370cc655c1df408fc865baac)) * drop pointless check for module compression method ([586d3e76](https://github.com/dracutdevs/dracut/commit/586d3e7664c00bf144becfa69dde2dbab8711d51)) * change misspelled variable name ([acfd97a9](https://github.com/dracutdevs/dracut/commit/acfd97a94385c33cd6cef4e5a37f233ea4081288)) * remove wrong $ in loop sequence ([f1245b5b](https://github.com/dracutdevs/dracut/commit/f1245b5bc13a98ef0dcc679dcef6148214e09503)) * handle symlinks appropriately while using '-i' option ([c7fbc0c8](https://github.com/dracutdevs/dracut/commit/c7fbc0c8901917baf0d1f0822568e65c6ec00d18)) * handle '-i' option to include files beginning with '.' ([f1138012](https://github.com/dracutdevs/dracut/commit/f1138012c9dc44e6614466c0a8e929fc55e4a5dd)) * **drm:** add privacy screen modules to the initrd ([14d97a6a](https://github.com/dracutdevs/dracut/commit/14d97a6a28c6172340c47c89374358aaf4e2629d)) * **fedora.conf.example:** rename misspelled variable ([9371dcab](https://github.com/dracutdevs/dracut/commit/9371dcaba3c58377428eee44bd702fae7b2ab20e)) * **fido2:** add a missing library ([4753738b](https://github.com/dracutdevs/dracut/commit/4753738b62d958955f50fb077ea21c56a8d23dc3)) * **fips:** * missing sourcing of dracut-lib ([857b17f0](https://github.com/dracutdevs/dracut/commit/857b17f090bdf575292f0bd6f5e8e3d753f6b426)) * add and remove local variables ([e8121bfd](https://github.com/dracutdevs/dracut/commit/e8121bfddda34e20db889a74d4ac6259ed182aea)) * wrong error message ([7f10c483](https://github.com/dracutdevs/dracut/commit/7f10c483b6abcc8be42cf246bbdade264be68228)) * handle s390x OSTree systems ([78557f05](https://github.com/dracutdevs/dracut/commit/78557f05a69fe718a97df85d2ed741ce10d3f806)) * **fips.sh:** repsect rd.fips.skipkernel ([5789abcb](https://github.com/dracutdevs/dracut/commit/5789abcbe05f30d556086590b786c4857d025d9d)) * **img-lib:** install rmdir ([51ce8893](https://github.com/dracutdevs/dracut/commit/51ce8893d981e90640123a7dcc3e4f3621e7d819)) * **install:** * segfault on popen error ([5c2f72f1](https://github.com/dracutdevs/dracut/commit/5c2f72f152ec319a8001d1ff0bfd1f81a9130b04)) * extend hwcaps library handling to libraries under glibc-hwcaps/ ([10ed204f](https://github.com/dracutdevs/dracut/commit/10ed204f873f454dcd15ffcc82dc3a1c781c1514)) * use size_t to avoid -Wsign-compare warning ([55468a2d](https://github.com/dracutdevs/dracut/commit/55468a2d40182de4cce5ba4ecd5dcd96be03bd4d)) * improve gettid definition ([ef0f848a](https://github.com/dracutdevs/dracut/commit/ef0f848a67fdd0a0dab135acbd1cd7fa0179a95c)) * validate return values log.c ([19537f89](https://github.com/dracutdevs/dracut/commit/19537f8943ac4106c6d4ab0e00a48a8c0a9a0519)) * rectify unused function args in log.c ([b5cf7ec7](https://github.com/dracutdevs/dracut/commit/b5cf7ec784335ec561e379f8e78f48019a344ac0)) * use wrapper for asprintf ([e2a61595](https://github.com/dracutdevs/dracut/commit/e2a61595d2c91202ff4ea69937064cd2c0d1f336)) * use unsigned int instead of unsigned ([74a41799](https://github.com/dracutdevs/dracut/commit/74a417994840f7a6119e2dee57f9a3bb4d84998b)) * reduce cppcheck warnings ([b0bf8187](https://github.com/dracutdevs/dracut/commit/b0bf8187d5cc51d5576d8d70a81677d7c9741b37)) * add a missing ret value assignment ([6a444261](https://github.com/dracutdevs/dracut/commit/6a44426162d5b1b7084b17f921799863d353f847)) * **integrity:** add support for loading multiple EVM x509 certs ([9da76af8](https://github.com/dracutdevs/dracut/commit/9da76af8e7f0f7a939b2ee44f0b4a5ce0bdd3b0b)) * **iscsi:** add support for the new iscsiadm "no-wait" (-W) command ([7374943a](https://github.com/dracutdevs/dracut/commit/7374943ae3d063f0142c969b132c4156030fda8b)) * **kernel-modules:** * add mailbox drivers for arm ([0e80ff72](https://github.com/dracutdevs/dracut/commit/0e80ff72e01d28e7e92d3adbf98ec40bdbdc37fe)) * detect block device's hardware driver ([c86f4d28](https://github.com/dracutdevs/dracut/commit/c86f4d286000d1e76fd405560b4114537e2cbbff)) * add blk_mq_alloc_disk and blk_cleanup_disk to blockfuncs ([b292ce72](https://github.com/dracutdevs/dracut/commit/b292ce7295f18192124e64e5ec31161d09492160)) * add more modules on RISC-V ([3cc9f1c1](https://github.com/dracutdevs/dracut/commit/3cc9f1c10c67dcdb5254e0eb69f19e9ab22abf20)) * add isp1760 USB controller ([15398458](https://github.com/dracutdevs/dracut/commit/15398458685d376fef56b1bf6fe09ae7c68324c1)) * add Type-C USB drivers for generic initrd ([a1287c62](https://github.com/dracutdevs/dracut/commit/a1287c627f28b16b1b066b7c256549b832bd98de)) * **kernel-modules-extra:** handle zstd module extension ([b3d2dcb7](https://github.com/dracutdevs/dracut/commit/b3d2dcb71e7af8f605f5f66041ed3c801333e5f1)) * **lvm:** * restore setting LVM_MD_PV_ACTIVATED ([164e5ebb](https://github.com/dracutdevs/dracut/commit/164e5ebb1199ea3e3d641ce402d8257f0055a529)) * replace --partial option ([97543cca](https://github.com/dracutdevs/dracut/commit/97543cca48dfde849396f11c83f9c320e1b91c46)) * **man:** default value of rd.retry was increased to 180 seconds ([4855242c](https://github.com/dracutdevs/dracut/commit/4855242ce5cb586afd2eebd91df57ce1d28ae6b5)) * **mdraid:** allow UUID comparison for more than one UUID ([d364ce83](https://github.com/dracutdevs/dracut/commit/d364ce8334fef96f48492bd0fb3b7deac37bbb66)) * **memstrack:** drop bash runtime requirement ([35822f39](https://github.com/dracutdevs/dracut/commit/35822f39970b369301e0ff54436d5714dd996896)) * **mksh:** requires printf ([f806a628](https://github.com/dracutdevs/dracut/commit/f806a628aa9aec548e425e81b6ea4ab6f5db26f6)) * **multipath:** * check if mpathconf is available ([4318533e](https://github.com/dracutdevs/dracut/commit/4318533e1493bfab622b64efc1b799426c812c26)) * drop ExecStop= setting from service unit ([9491e599](https://github.com/dracutdevs/dracut/commit/9491e599282d0d6bb12063eddbd192c0d2ce8acf)) * get config. dir from configuration ([2e3c5444](https://github.com/dracutdevs/dracut/commit/2e3c5444d271cb8f05955858b8fdc367c4ea5c48)) * **multipathd.service:** * drop dependencies on iscsi and iscsid ([6246da40](https://github.com/dracutdevs/dracut/commit/6246da400fa7f527a1ff1c620bf85ac9f6644508)) * adapt to upstream multipath-tools unit file ([a247d2bc](https://github.com/dracutdevs/dracut/commit/a247d2bc0d4c6d37a2ea4f3da98dd7902bb37385)) * remove dependency on systemd-udev-settle ([371b338a](https://github.com/dracutdevs/dracut/commit/371b338a5f19d40ff4c3216dc0f27f9a00cf4e22)) * **network:** * consistent use of "$gw" for gateway ([3f2c76bb](https://github.com/dracutdevs/dracut/commit/3f2c76bb1456941a28d3333569d2bf18f8624617)) * wrong test of wicked unit ([22e68307](https://github.com/dracutdevs/dracut/commit/22e683077a686b592da55e1d247b31f65c95d481)) * add errors and warnings when network interface does not exist ([79389352](https://github.com/dracutdevs/dracut/commit/7938935267dd8824f074adf84c219340ad4c8db6)) * **network-manager:** * skip non-directories in /sys/class/net ([d9c3c774](https://github.com/dracutdevs/dracut/commit/d9c3c77437d91d7d66369a3ef701ffc5e501346d)) * disable tty output if the console is not usable ([f6e6be24](https://github.com/dracutdevs/dracut/commit/f6e6be245d0cda14d90a0442b688c8dca1410a2e)) * show output on console only with rd.debug enabled ([e07b7ad0](https://github.com/dracutdevs/dracut/commit/e07b7ad0e7f5dbb8024336f3075610b3b74ffb2e)) * write DHCP filename option to dhcpopts file ([38320fce](https://github.com/dracutdevs/dracut/commit/38320fce56a8d83b79d6c970c491a454ba9de213)) * check for nm-initrd-generator in both /usr/{libexec,lib} ([5ee7e249](https://github.com/dracutdevs/dracut/commit/5ee7e249b8cc74461122ccd7efe954b3402c23da)) * ensure safe content of /tmp/dhclient."$ifname".dhcpopts ([e509c638](https://github.com/dracutdevs/dracut/commit/e509c638e68a8e3cae446d1a4f9f86e3aa6e7a99)) * include nm-daemon-helper binary ([0e590531](https://github.com/dracutdevs/dracut/commit/0e5905315e92dfc095f543fd73db6190db533217)) * don't pull in systemd-udev-settle ([a0f12fb6](https://github.com/dracutdevs/dracut/commit/a0f12fb6a09b09f35ab28753d7c4461c10a8b562)) * support teaming under NM+systemd ([a97d2ced](https://github.com/dracutdevs/dracut/commit/a97d2cedcf65a9a2fbff2591171f0163c7d3cb46)) * pull in network.target in nm-initrd.service ([a97d6e2b](https://github.com/dracutdevs/dracut/commit/a97d6e2b13146783831b166ec5e8b33b29c514b0)) * **network-wicked:** multiple path corrections ([d3b5bc17](https://github.com/dracutdevs/dracut/commit/d3b5bc17ebadfe8922d1144b3dfd5435d0ecc71a)) * **nvmf:** validate_ip_conn ([655c65e6](https://github.com/dracutdevs/dracut/commit/655c65e6ced00e7a80c41e96c5f6fe108da07839)) * **qeth_rules:** check the existence of /sys/devices/qeth/*/online beforehand ([6c71ba41](https://github.com/dracutdevs/dracut/commit/6c71ba4121ae64ccd13fefba68ca327ac623810f)) * **resume:** * resume using /usr/lib64/suspend ([c4593734](https://github.com/dracutdevs/dracut/commit/c459373448d24760d15e22fde7c6f811c7891376)) * check for presence of /sys/power/resume ([0b977906](https://github.com/dracutdevs/dracut/commit/0b97790626bff3579755b38f78a9c524a075cfcc)) * **rootfs-block:** make the base module dependency explicit ([3326e4c9](https://github.com/dracutdevs/dracut/commit/3326e4c957d0499495d9e91182fc574b960ace86)) * **s390_rules:** drop collect installation ([f905c3a7](https://github.com/dracutdevs/dracut/commit/f905c3a72c975cf6006f266755cc91229132c739)) * **shutdown:** be robust against forced shutdown ([b9ba3c8b](https://github.com/dracutdevs/dracut/commit/b9ba3c8bb8f0f1328cd1ffaa8dbf64585b28c474)) * **skipcpio:** * calculate and use CPIO_MAGIC_LEN ([3fb8723c](https://github.com/dracutdevs/dracut/commit/3fb8723ce0066b4ba92f6dbfc4373a66d1f551c4)) * improve error checking ([f6d16b6b](https://github.com/dracutdevs/dracut/commit/f6d16b6bbd5b8b7ac238c3d2148bebf4e91140a2)) * **squash:** * apply FIPS and libpthread workaround ([5ab18dee](https://github.com/dracutdevs/dracut/commit/5ab18dee996f0eeb2b0bfe354570e1b1af46d025)) * remove tailing '/' when installing ld.so.conf.d ([cbd85597](https://github.com/dracutdevs/dracut/commit/cbd85597e3ed6abf64ac17f431da5477eb5aefa0)) * keep ld cache under initdir ([dc21638c](https://github.com/dracutdevs/dracut/commit/dc21638c3f0acbb54417f3bfb6294ad5514bf2db)) * create relative symlinks ([a2b6be44](https://github.com/dracutdevs/dracut/commit/a2b6be44792b68218e3378a7d844b0f8527a4805)) * **systemd-sysusers:** * use split systemd sysuser configs ([fec93bb2](https://github.com/dracutdevs/dracut/commit/fec93bb22181f80056b40231fca36c422248ade0)) * override systemd-sysusers.service ([dcbe23c1](https://github.com/dracutdevs/dracut/commit/dcbe23c14d13ca335ad327b7bb985071ca442f12)) * **tpm2-tss:** * add a missing library ([c656b612](https://github.com/dracutdevs/dracut/commit/c656b612b101e4834e01f9841162e2629a7272f7)) * typo in depends() ([8b17105b](https://github.com/dracutdevs/dracut/commit/8b17105bed69ed90582a13d97d95ee19e6581365)) * **url-lib:** * SC2086: Double quote to prevent globbing and word splitting ([acb18869](https://github.com/dracutdevs/dracut/commit/acb18869e98687a3f8c172d7e7befaa5326cf67a)) * SC2046: Quote this to prevent word splitting ([ec50cec3](https://github.com/dracutdevs/dracut/commit/ec50cec3bd9169410df409e077d0487c63c2a627)) * improve ca-bundle detection ([e3bb1815](https://github.com/dracutdevs/dracut/commit/e3bb1815bbbff1a7e21b857d2ae32bc0410754d5)) * make pre-pivot hook separetely per nfs mount ([2f091b17](https://github.com/dracutdevs/dracut/commit/2f091b17075f81ff490b05d3d566d736fc32f0be)) * **usrmount:** do not empty _dev variable ([4afdcba2](https://github.com/dracutdevs/dracut/commit/4afdcba212793f136aea012b30dd7bdb5b641a5a)) * **zfcp_rules:** * correct udev zfcp rules parsing ([59252668](https://github.com/dracutdevs/dracut/commit/5925266832042f9d17a3fb7a219b83118c5b16d6)) * remove collect based udev rule creators ([d40c49a8](https://github.com/dracutdevs/dracut/commit/d40c49a8dfe203be33af8ace5f0efd07a88856f4)) #### Features * **Makefile:** cargo wrapper for dracut-cpio build ([51d21c6b](https://github.com/dracutdevs/dracut/commit/51d21c6b37b0eb8566d18d665d0197ca4d68101c)) * **cpio:** * add newc archive creation utility ([a9c67046](https://github.com/dracutdevs/dracut/commit/a9c67046431ccf5fd4f4c16c890695df388f0d38)) * add rust argument parsing library from crosvm ([94fc5026](https://github.com/dracutdevs/dracut/commit/94fc50262f5e6c28d92782dc231fbb6c61855954)) * **crypt:** * check if pkcs11 module is needed in hostonly mode ([56f4fb6c](https://github.com/dracutdevs/dracut/commit/56f4fb6cb755327c77c32f8c414a4a0e64fc933c)) * check if fido2 module is needed in hostonly mode ([d5fd030c](https://github.com/dracutdevs/dracut/commit/d5fd030cc285730e1a1b9e0e78a1e1dc4daabfe0)) * check if tpm2-tss module is needed in hostonly mode ([5d990a00](https://github.com/dracutdevs/dracut/commit/5d990a004b5ae6863f2c9a633b184c07dd73563d)) * **dracut.sh:** * add --aggresive-strip option ([67fc670a](https://github.com/dracutdevs/dracut/commit/67fc670a88ab6c97d22c6718082619c0cf850fc3)) * add "--enhanced-cpio" option for calling dracut-cpio ([afe4a6db](https://github.com/dracutdevs/dracut/commit/afe4a6dbb7df62982baab8212bba5d90010dfbac)) * check if target kernel has zstd support compiled in ([591118c5](https://github.com/dracutdevs/dracut/commit/591118c56da2bfcea060e3b7671bc87b23c0e44a)) * **fido2:** introducing the fido2 module ([049973b7](https://github.com/dracutdevs/dracut/commit/049973b708298ea0ce1ac9c869b404f4c718eff3)) * **lvm:** * only run lvchange for LV that is seen on devices ([1af46743](https://github.com/dracutdevs/dracut/commit/1af46743195422aaebcde5c508a5dd479eff51ea)) * use generated filter when none is set ([7ffc5e38](https://github.com/dracutdevs/dracut/commit/7ffc5e388bcce20785803825bdd260c3c854b34f)) * update lvm command options ([c0a54f29](https://github.com/dracutdevs/dracut/commit/c0a54f2993b1d3c2101202c274a41f925445d54b)) * **pcsc:** introducing the pcsc module ([dcaff88a](https://github.com/dracutdevs/dracut/commit/dcaff88ac942042e3db0a2bbfc1c995ec0735f38)) * **pkcs11:** * include the module in the spec file ([c5907f82](https://github.com/dracutdevs/dracut/commit/c5907f82d835d72e4dd7c473a86e872fce37d61e)) * introducing the pkcs11 module ([83ea8cf0](https://github.com/dracutdevs/dracut/commit/83ea8cf001a49356cf7814b3c08bdd1c4b4f2763)) * **spec:** add systemd-integritysetup module ([fe8df024](https://github.com/dracutdevs/dracut/commit/fe8df0240a24b9d2d60a5b0b998f82b251ede849)) * **squash:** install umount util ([563f5434](https://github.com/dracutdevs/dracut/commit/563f543424c66bf38e6cbd3f489655d45ad9b5c5)) * **systemd:** enable support for systemd compiled with ASAN ([d502d2a8](https://github.com/dracutdevs/dracut/commit/d502d2a816ba8f8329b3d8616bd2a7e82a0ad21f)) * **systemd-integritysetup:** introducing the systemd-integritysetup module ([33cf47a6](https://github.com/dracutdevs/dracut/commit/33cf47a60870cc290bd5b59c9cf87c54ad37051f)) #### Contributors - Antonio Alvarez Feijoo - David Disseldorp - Martin Wilck - Jóhann B. Guðmundsson - Shreenidhi Shedi - David Teigland - Beniamino Galvani - Thomas Blume - Kairui Song - Laszlo Gombos - Renaud Métrich - Dusty Mabe - Masahiro Matsuya - Alexander Wenzel - Andre Russ - Cornelius Hoffmann - David Tardon - Frantisek Sumsal - Harald Hoyer - José María Fernández - Kairui Song - Peter Robinson - Pingfan Liu - Tony Asleson - Zoltán Böszörményi - Adrien Thierry - Alexander Tsoy - Andreas Schwab - Andrey Sokolov - Brandon Sloane - Charles Rose - Coiby Xu - Dan Horák - Dirk Müller - Glenn Morris - Hans de Goede - Hari Bathini - Henrik Gombos - Jonathan Lebon - LinkTed - Lubomir Rintel - Luca BRUNO - Lukas Nykryn - Matthias Berndt - Mike Gilbert - Pavel Valena - Stefan Berger - Thomas Haller - Tomasz Paweł Gajc - Zbigniew Jędrzejewski-Szmek - joshuacov1 - lapseofreason dracut-055 ========== #### Bug Fixes * **base:** * add missing `str_replace` to `dracut-dev-lib.sh` ([148e420b](https://github.com/dracutdevs/dracut/commit/148e420be5b5809aa8d5033f47477573bbbf3e60)) * split out `dracut-dev-lib.sh` ([c08bc810](https://github.com/dracutdevs/dracut/commit/c08bc8109d4c43beacfa4bcdc20a356102da6d02)) * **bash:** minor cleanups ([9355cb8e](https://github.com/dracutdevs/dracut/commit/9355cb8ea5024533210067373657dc337d63ecb9)) * **dash:** minor cleanups ([f4ea5f87](https://github.com/dracutdevs/dracut/commit/f4ea5f8734c4636f7d6db78da76e9525beb9a0ac)) * **dracut:** pipe hardlink output to `dinfo` ([0a6007bf](https://github.com/dracutdevs/dracut/commit/0a6007bf4f472565d2c0c205a56edea7ba3e3bc3)) * **dracut-functions:** get_maj_min without get_maj_min_cache_file set ([a277a5fc](https://github.com/dracutdevs/dracut/commit/a277a5fc7acc0a9e8d853f09671495f9d27645c1)) * **dracut-util:** print error message with trailing newline ([b9b6f0ee](https://github.com/dracutdevs/dracut/commit/b9b6f0ee5b859a562e46a8c4e0dee0261fabf74d)) * **fs-lib:** install fsck utilities ([12beeac7](https://github.com/dracutdevs/dracut/commit/12beeac741e4429146a674ef4ea9aa0bac10364b)) * **install:** * configure logging earlier ([5eb24aa2](https://github.com/dracutdevs/dracut/commit/5eb24aa21d3ee639f869c2e363b3fb0b98be552b)) * sane default --kerneldir ([c1ab3613](https://github.com/dracutdevs/dracut/commit/c1ab36139d416e580e768c29f2addf7ccbc2c612), closes [#1505](https://github.com/dracutdevs/dracut/issues/1505)) * **integrity:** require ALLOW_METADATA_WRITES to come from EVM config file ([b12d91c4](https://github.com/dracutdevs/dracut/commit/b12d91c431220488fecf7b4be82427e3560560cb)) * **mksh:** minor cleanups ([6c673298](https://github.com/dracutdevs/dracut/commit/6c673298f36990665467564e6114c9ca2530f584)) * **squash:** don't mount the mount points if already mounted ([636d6df3](https://github.com/dracutdevs/dracut/commit/636d6df3134dde1dac72241937724bc59deb9303)) * **warpclock:** minor cleanups ([7d205598](https://github.com/dracutdevs/dracut/commit/7d205598c6a500b58b4d328e824d0446276f7ced)) #### Features * **dracut.sh:** detect running in a container ([7275c6f6](https://github.com/dracutdevs/dracut/commit/7275c6f6a0f6808cd939ea5bdf1244c7bd13ba44)) * **install:** add default value for --firmwaredirs ([4cb086fa](https://github.com/dracutdevs/dracut/commit/4cb086fa2995799b95c0b25bc9a0cf72ba3868ea)) #### Contributors - Harald Hoyer - Jóhann B. Guðmundsson - Marcos Mello - Kairui Song - Lars Wendler - Stefan Berger - Tomasz Paweł Gajc dracut-054 ========== With this release dracut has undergone a major overhaul. A lot of systemd related modules have been added. The integration test suite has finally ironed out the flaky behaviour due to the parallel device probing of the kernel, which bit sometimes in the non-kvm github CI. So, if you see any `/dev/sda` in a setup script with more than two hard drives, chances are, that the script works on the wrong disk. Same goes for network interfaces. This release is also fully `shellcheck`'ed with `ShellCheck-0.7.2` and indented with `shfmt` and `astyle`. The dracut project builds test containers every day for: * `opensuse/tumbleweed-dnf:latest` * `archlinux:latest` * `fedora:rawhide` * `fedora:latest` * `fedora:33` These containers can easily be used to run the integration tests locally without root permissions via `podman`. We hope this serves as a blueprint for your distribution's CI process. More information can be found in [docs/HACKING.md](https://github.com/dracutdevs/dracut/blob/master/HACKING.md). #### Bug Fixes * make testsuite pass on OpenSuse and Arch ([8b2afb08](https://github.com/dracutdevs/dracut/commit/8b2afb08baea7fc6e15ece94e287dcc4a008bcc4)) * cope with distributions with `/usr/etc` files ([3ad3b3a4](https://github.com/dracutdevs/dracut/commit/3ad3b3a40d419c4386b2924f6ac25ab0c355d131)) * deprecate gummiboot ([5c94cf41](https://github.com/dracutdevs/dracut/commit/5c94cf41e8937b6fbb72c96bc54c84fdf224c711)) * set vimrc and emacs indention according to .editorconfig ([9012f399](https://github.com/dracutdevs/dracut/commit/9012f3996b1e5f0788f8e80dfdd5c9ab0636c355)) * correctly handle kernel parameters ([501d82f7](https://github.com/dracutdevs/dracut/commit/501d82f79675a6bf9b37e8250152515863a80236)) * remove dracut.pc on `make clean` ([d643156d](https://github.com/dracutdevs/dracut/commit/d643156d561d3aca816d75e403149db073617292)) * honor KVERSION environment in the Makefile ([d8a454a5](https://github.com/dracutdevs/dracut/commit/d8a454a537c6de95033dec7d83c622fdc46c2a4f)) * always use mkdir -p ([9cf7b1c5](https://github.com/dracutdevs/dracut/commit/9cf7b1c529442d5abd6eaec4399d4ee77b95145e)) * **dracut.sh:** * prevent symbolic links containing `//` ([de0c0872](https://github.com/dracutdevs/dracut/commit/de0c0872fc858fa9ca952f79ea9f00be17c37a4c)) * adding missing globalvars for udev ([f35d479d](https://github.com/dracutdevs/dracut/commit/f35d479d2b718da54886a66d3b7af2132215f80a)) * sysctl global variables ([3ca9aa1d](https://github.com/dracutdevs/dracut/commit/3ca9aa1d7b24b82e01d16613b86ec3be97c8a1bb)) * add global vars for modules-load ([ec4539c6](https://github.com/dracutdevs/dracut/commit/ec4539c6066edf25e52ed8e2d35c4be7ef39f729)) * omission is an addition to other omissions in conf files ([96c31333](https://github.com/dracutdevs/dracut/commit/96c313333d1a4f5e2c524a3a11c5b3aab24afc20)) * harden dracut against GZIP environment variable ([d8e47e20](https://github.com/dracutdevs/dracut/commit/d8e47e201af4646e2a82e11220ea9c993bd2ed48)) * add a missing tmpfilesconfdir global variable ([8849dd8d](https://github.com/dracutdevs/dracut/commit/8849dd8d1a74a46cb761c4d8041e4582d4686724)) * include `modules.builtin.alias` in the initramfs ([7f633747](https://github.com/dracutdevs/dracut/commit/7f6337471312486934f9592c1c7c05ed68694454)) * install all depmod relevant configuration files ([50a01dd4](https://github.com/dracutdevs/dracut/commit/50a01dd4b28471c0dfa810a705e219963bd5ec3c)) * add `modules.builtin.modinfo` to the initramfs ([87c4c178](https://github.com/dracutdevs/dracut/commit/87c4c17850e8bb982f6c07a6d3f58124bb2875de)) * search for btrfs devices from actual mount poiont ([3fdc734a](https://github.com/dracutdevs/dracut/commit/3fdc734a5cc8c0b94c1da49439181d540c8a5c43)) * **dracut-functions.sh:** * implement a cache for get_maj_min ([c3bb9d18](https://github.com/dracutdevs/dracut/commit/c3bb9d18dceed7db6d16f9c2a7f682c5934099d7)) * word splitting issue for sed in get_ucode_file ([122657b2](https://github.com/dracutdevs/dracut/commit/122657b2fedf13991597830cca4d4ddbc8038233)) * **dracut-logger.sh:** double dash trigger unknown logger warnings during run ([4fbccde5](https://github.com/dracutdevs/dracut/commit/4fbccde50456f513d388cdfd858018cd889890dc)) * **dracut-install:** * handle $LIB in ldd output parsing ([d1a36d3d](https://github.com/dracutdevs/dracut/commit/d1a36d3d80b0ed71ee814659e18a020c53cee05e)) * handle builtin modules ([2536a9ea](https://github.com/dracutdevs/dracut/commit/2536a9eaffbc9cc14c85579a2f537d3f3a1d5659)) * **base:** * suppress calls to getarg in build phase ([6feaaabc](https://github.com/dracutdevs/dracut/commit/6feaaabc221ffbf79f652cbee3eea58f02449c50)) * source hooks without exec ([8059bcb2](https://github.com/dracutdevs/dracut/commit/8059bcb2c8df4d60cc2f548d3c53db25d815a7be)) * wait_for_dev quote shell variables ([b800edd6](https://github.com/dracutdevs/dracut/commit/b800edd69817b5e46d5f240b96d3b3648267ea21)) * adding crc32c for ext3 ([61f45643](https://github.com/dracutdevs/dracut/commit/61f456435879f084a1bf2c8885eaf37070035abf)) * **crypt:** * install all crypto modules in the generic initrd ([10f9e569](https://github.com/dracutdevs/dracut/commit/10f9e569c52654ff54678a626a0f5dd14233716d)) * include cryptsetups tmpfile ([a4cc1964](https://github.com/dracutdevs/dracut/commit/a4cc196467e45f093fab7876c1c6b40798058920)) * **crypt-gpg:** * cope with different scdaemon location ([44fd1c13](https://github.com/dracutdevs/dracut/commit/44fd1c13555f2e12bb566c246948629ada27d14d)) * **dbus-broker:** * enable the service ([df1e5f06](https://github.com/dracutdevs/dracut/commit/df1e5f06a5449dcec6749baf742eac6eb1f0aa53)) * **dbus-daemon:** * only error out in install() ([ae4fbb3d](https://github.com/dracutdevs/dracut/commit/ae4fbb3db4136e6e03a1c74d05ecc2a73b916401)) * **dracut-systemd:** * don't refuse root=tmpfs when systemd is used ([a96900a8](https://github.com/dracutdevs/dracut/commit/a96900a82c3a8ec1ed2c6b2cc8862f912093fa0c)) * **examples:** remove the examples directory and reference to it ([b37c90c8](https://github.com/dracutdevs/dracut/commit/b37c90c8e00155a1f31237ae6cf91a81677c4df5)) * **fips:** * add dh and ecdh ciphers ([543b8014](https://github.com/dracutdevs/dracut/commit/543b8014fc10fc6a92ba83db0dfc994fc1d2129b)) * remove old udev version requirements ([be30d987](https://github.com/dracutdevs/dracut/commit/be30d98751cff4ace660215305e2468943a45754)) * **i18n:** * skip if data is missing ([651fe01e](https://github.com/dracutdevs/dracut/commit/651fe01e7937d86bbd471d9621581bed44f23dfa)) * **img-lib:** * ignored null byte in input ([85eb9680](https://github.com/dracutdevs/dracut/commit/85eb96802cb82ec179bd3bc429b0dad2518946c5)) * **integrity:** * properly set up EVM when using an x509 cert ([4bdd7eb2](https://github.com/dracutdevs/dracut/commit/4bdd7eb23a8187c3f19797e47eee8c672cea33ae)) * **iscsi:** * replace sed call with bash internals ([66b920c6](https://github.com/dracutdevs/dracut/commit/66b920c65143f4cac80385a51704ae9483305569)) * add iscsid.service requirements ([bb6770f1](https://github.com/dracutdevs/dracut/commit/bb6770f1a413bdc7fd570b260ee28ace1255a195)) * only rely on socket activiation ([0eb87d78](https://github.com/dracutdevs/dracut/commit/0eb87d78108aae9aa4692f1edfb33ded50e26409)) * **kernel-modules:** * optionally add /usr/lib/modules.d to initramfs ([92e6a8f8](https://github.com/dracutdevs/dracut/commit/92e6a8f87914322994387e559cf2a00b1760b301)) * add watchdog drivers for generic initrd ([3a60c036](https://github.com/dracutdevs/dracut/commit/3a60c036db7caccda95475d33c8d4ce1f615d2c8)) * **mdraid:** * remove dependency statements ([86b75634](https://github.com/dracutdevs/dracut/commit/86b756346a6b7c5cb5f6fda4d12e2a58b6144e40)) * **memstrack:** * correct dependencies ([c2ecc4d1](https://github.com/dracutdevs/dracut/commit/c2ecc4d131876383b47820a2e8d1a6f8a11716d9)) * **multipath:** * stop multipath before udev db cleanup ([3c244c7c](https://github.com/dracutdevs/dracut/commit/3c244c7ca3555b526883dc20104c469b39085cbe)) * revise multipathd-stop ([7b8c78ff](https://github.com/dracutdevs/dracut/commit/7b8c78ff43a1f8e3690969e980d3d9d1dcb00c87)) * **nbd:** * assume nbd version >= 3.8 ([6209edeb](https://github.com/dracutdevs/dracut/commit/6209edeb5c7783d94867829bf052aa53c78a1efe)) * remove old udev version requirements ([fd15dbad](https://github.com/dracutdevs/dracut/commit/fd15dbad6ebad86a3753a03f98706010f3e36cf7)) * make nbd work again with systemd ([77906443](https://github.com/dracutdevs/dracut/commit/7790644362622097aa69107920fd26b688c855d3)) * **network:** * use wicked unit instead of find_binary ([57eefcf7](https://github.com/dracutdevs/dracut/commit/57eefcf70587f06b8874a3b3cf31e9ab70c03227)) * user variable for sdnetworkd instead of path ([4982e16d](https://github.com/dracutdevs/dracut/commit/4982e16dd53dcbbcfbd3a6b59013a0d6f893f840)) * correct regression in iface_has_carrier ([36af0518](https://github.com/dracutdevs/dracut/commit/36af0518b3fe59442de206c24bbe03be6fc17095)) * **network-legacy:** * add missing options to dhclient.conf ([abfd547a](https://github.com/dracutdevs/dracut/commit/abfd547a85230a4520df65280aaf195f319df464)) * silence getargs ([60a34d8b](https://github.com/dracutdevs/dracut/commit/60a34d8b11dd50b2cd4e0e2208bd7c5e0fc48b71)) * **network-manager:** * cope with distributions not using `libexec` ([22d6863e](https://github.com/dracutdevs/dracut/commit/22d6863ef1b2eb2a22264f2bfdb2b9329ab5dfdb)) * set timeout via command line option ([8a51ee1f](https://github.com/dracutdevs/dracut/commit/8a51ee1fa61bd3da342be53e35730837afd2caad)) * run after dracut-cmdline ([4d03404f](https://github.com/dracutdevs/dracut/commit/4d03404f499064b354a58223895cc47dbb461da5)) * create /run directories ([49b61496](https://github.com/dracutdevs/dracut/commit/49b614961dc8684f8512febbf80da489909e4b7f)) * use /run/NetworkManager/initrd/neednet in initqueue ([6a37c6f6](https://github.com/dracutdevs/dracut/commit/6a37c6f6302f950df608db3fd45acf9342ee3de2)) * only run NetworkManager if rd.neednet=1 ([ac0e8f7d](https://github.com/dracutdevs/dracut/commit/ac0e8f7dcc81432311906c3fca0d4211f6a2f68c)) * nm-run.service: don't kill forked processes ([1f21fac6](https://github.com/dracutdevs/dracut/commit/1f21fac646daa46cbe184ef8ff7705842f06ba15)) * no default deps for nm-run.service ([ba4bcf5f](https://github.com/dracutdevs/dracut/commit/ba4bcf5f4f11ad624c647ddf4f566997186135e7)) * nm-lib.sh does not require bash ([3402142e](https://github.com/dracutdevs/dracut/commit/3402142e344298c8f20fc52a2b064344788f1668)) * **squash:** * post install should be the last step before stripping ([8c8aecdc](https://github.com/dracutdevs/dracut/commit/8c8aecdc63c9389038e78ee712d4809e49add5e1)) * **systemd:** * include all nss libraries ([b3bbf5fb](https://github.com/dracutdevs/dracut/commit/b3bbf5fb6a95cfb69272da0711b5c5e0c6621de9)) * include hosts and nsswitch.conf in hostonly mode ([5912f4fb](https://github.com/dracutdevs/dracut/commit/5912f4fbc036cc36b9507c16dddef1ded1556572)) * remove old systemd version requirements ([fc53987b](https://github.com/dracutdevs/dracut/commit/fc53987bec1bc71b054d99072f62c1770a44bcca)) * **systemd-hostnamed:** extra quote ([2aa65234](https://github.com/dracutdevs/dracut/commit/2aa652349ca83198581cccb516a241a8d0e1b4d9)) * **systemd-modules:** remove dependency on systemd meta module ([afef4557](https://github.com/dracutdevs/dracut/commit/afef455718db69cff3797ca1a6d8bfebd2e86ab3)) * **systemd-modules-load:** * misc repairs ([782ac8f1](https://github.com/dracutdevs/dracut/commit/782ac8f1f6b68edfe59630e9e4ac1673636f3a5e)) * **systemd-networkd:** * make systemd-networkd a proper network provider ([ea779750](https://github.com/dracutdevs/dracut/commit/ea779750c371102c04252b48f1b7d9c7ece7cf93), closes [#737](https://github.com/dracutdevs/dracut/issues/737)) * **systemd-resolved:** remove nss libraries ([12bef83c](https://github.com/dracutdevs/dracut/commit/12bef83cdaf329e3ee2cc1f282bd9c128ec0fc56)) * **systemd-sysctl:** * sysctl global variables ([02acedd0](https://github.com/dracutdevs/dracut/commit/02acedd09eb7222eaaf0f5256f3ddec26d658360)) * **systemd-sysusers:** * misc fixes and cleanup ([7359ba8a](https://github.com/dracutdevs/dracut/commit/7359ba8acab2652cfff6b845f84a936cdec30f9d)) * **systemd-udev:** use global vars instead of fixed path ([fd883a58](https://github.com/dracutdevs/dracut/commit/fd883a58d1360f0c6c32f64462fafdd7a54af1ee)) * **systemd-udevd:** add udev id program files ([562cb77b](https://github.com/dracutdevs/dracut/commit/562cb77b5a28e3f31bc6d327c7712fba661e9a27)) * **systemd-verity:** * incorrect reference to cryptsetup target ([ba92d1fc](https://github.com/dracutdevs/dracut/commit/ba92d1fcad68758004d7b1102fe1905c0f25e63e)) * re-naming module to veritysetup ([0267f3c3](https://github.com/dracutdevs/dracut/commit/0267f3c3554efd8f027afaf462347167402f5d6c)) * **tpm2-tss:** add tpm2 requirement ([8f99fada](https://github.com/dracutdevs/dracut/commit/8f99fadabea8f279a9fe28473dba424eb38f8d60)) * **udev-rules:** * remove sourcing of network link files ([69f4e7cd](https://github.com/dracutdevs/dracut/commit/69f4e7cdc3f7da24e40496b0b2f0f5022cc3376d)) * add btrfs udev rules by default ([567c4557](https://github.com/dracutdevs/dracut/commit/567c4557537fe7f477f0f54237df00ebc79e56be)) * **url-lib:** * fix passing args ([5f6be515](https://github.com/dracutdevs/dracut/commit/5f6be51595eab878314d031d9bfebe844b639302)) * **zipl:** * don't depend on grub2 ([6b499ec1](https://github.com/dracutdevs/dracut/commit/6b499ec14b3ff35d5298617b436b64563a2d8c2f)) #### Performance * disable initrd compression when squash module is enabled ([7c0bc0b2](https://github.com/dracutdevs/dracut/commit/7c0bc0b2fd167da42035020dae49af94844f053c)) #### Features * support ZSTD-compressed kernel modules ([ce9af251](https://github.com/dracutdevs/dracut/commit/ce9af251af5fca08ea206ef980005853a4dac36e)) * also restore the initramfs from /lib/modules ([33e27fab](https://github.com/dracutdevs/dracut/commit/33e27fab59db60b1ca05a0c5b8a51fccb98578e5)) * extend Makefile indent target ([e0a0fa61](https://github.com/dracutdevs/dracut/commit/e0a0fa61749152fd5bc837770a02cf22d7e02d40)) * customize .editorconfig according to shfmt ([1f621aba](https://github.com/dracutdevs/dracut/commit/1f621aba3728a621b83b3b697eae6caadae9d287)) * squash module follow --compress option ([5d05ffbd](https://github.com/dracutdevs/dracut/commit/5d05ffbd87bc27e27f517ebc3454d50729c687e6)) * **bluetooth:** implement bluetooth support in initrd ([64ee2a53](https://github.com/dracutdevs/dracut/commit/64ee2a53864576fbedabe6b18fb9aae01b999199)) * **btrfs:** add 64-btrfs-dm.rules rules ([d4caa86a](https://github.com/dracutdevs/dracut/commit/d4caa86aba35b51dc1adda3ee3a5bae677420082)) * **mkinitrd:** remove mkinitrd ([43df4ee2](https://github.com/dracutdevs/dracut/commit/43df4ee274e7135aff87868bf3bf2fbab47aa8b4)) * **nbd:** support ipv6 link local nbds ([b12f8188](https://github.com/dracutdevs/dracut/commit/b12f8188a4ffac312694ebd48a5c99ba885e6467)) * **network-manager:** run as daemon with D-Bus ([112f03f9](https://github.com/dracutdevs/dracut/commit/112f03f9e225a790cbc6378c70773c6af5e7ee34)) * **qemu:** include the virtio_mem kernel module ([f3dcb606](https://github.com/dracutdevs/dracut/commit/f3dcb60619671f2d353caaa42d38207172c8b3ba)) * **skipcpio:** speed up and harden skipcpio ([63033495](https://github.com/dracutdevs/dracut/commit/630334950c9a7a714fdf31b6ff545d804b5df2f2)) * **squash:** * use busybox for early setup if available ([90f269f6](https://github.com/dracutdevs/dracut/commit/90f269f6afe409925bad86f0bd7e9322ad9b4fb0)) * install and depmod modules seperately ([5a18b24a](https://github.com/dracutdevs/dracut/commit/5a18b24a8b9c20c98f711963ce5407ceb2f3d57b)) * **systemd-ac-power:** introducing the systemd-ac-power module ([e7407230](https://github.com/dracutdevs/dracut/commit/e74072306958262f22a9ecf10b928647ebdacf8f)) * **systemd-hostnamed:** introducing the systemd-hostnamed module ([bf273e3e](https://github.com/dracutdevs/dracut/commit/bf273e3e8632faff68fe19f9d7d7cc42e5a7c480)) * **systemd-initrd:** add initrd-usr-fs.target ([5eb73610](https://github.com/dracutdevs/dracut/commit/5eb736103d06197f37283bc27815c050adec81ea)) * **systemd-journald:** introducing the systemd-journald module ([3697891b](https://github.com/dracutdevs/dracut/commit/3697891b754493ecd6b19dbf279701bad3460fcd)) * **systemd-ldconfig:** introducing the systemd-ldconfig module ([563c434e](https://github.com/dracutdevs/dracut/commit/563c434ecba68c628344c1a684f656cdd8f9f214)) * **systemd-network-management:** introducing systemd-network-management module ([e942d86c](https://github.com/dracutdevs/dracut/commit/e942d86c9ddad19f9307d58cb2d99169f6e94edb)) * **systemd-resolved:** introducing the systemd-resolved module ([b7d3caef](https://github.com/dracutdevs/dracut/commit/b7d3caef6780305c553851169ca30b0b05b6ff31)) * **systemd-rfkill:** introducing the systemd-rfkill module ([21536544](https://github.com/dracutdevs/dracut/commit/215365441e1042793d62c4c9e146be5916ed5aeb)) * **systemd-sysext:** introducing the systemd-sysext module ([fc88af54](https://github.com/dracutdevs/dracut/commit/fc88af54134ec021be58465b52d1271453c30c55)) * **systemd-timedated:** introducing the systemd-timedated module ([1c41cc90](https://github.com/dracutdevs/dracut/commit/1c41cc90c52636e03abdf6d0c4fa0f557b7eb449)) * **systemd-timesyncd:** introducing the systemd-timesyncd module ([2257d545](https://github.com/dracutdevs/dracut/commit/2257d54583d24ca69d10b5e600b986d412a21714)) * **systemd-tmpfiles:** introducing the systemd-tmpfiles module ([2b61be32](https://github.com/dracutdevs/dracut/commit/2b61be32b890e70b1fce45d984327c27302da9bc)) * **systemd-udevd:** introducing the systemd-udevd module ([3534789c](https://github.com/dracutdevs/dracut/commit/3534789cc42331bc22cf44d26a1d04db4e010ad9)) * **systemd-verity:** introducing the systemd-verity module ([3d4dea58](https://github.com/dracutdevs/dracut/commit/3d4dea58f9821e58841d5c738b9935193c680181)) * **tpm2-tss:** introducing the tpm2-tss module ([8743b073](https://github.com/dracutdevs/dracut/commit/8743b0735692ab3f333815ba311cecdc29d45ecd)) #### Contributors - Harald Hoyer - Jóhann B. Guðmundsson - Kairui Song - Dusty Mabe - Beniamino Galvani - Mikhail Novosyolov - Renaud Métrich - Adam Alves - Daniel Molkentin - David Hildenbrand - David Tardon - Jaroslav Jindrak - Jonas Jelten - Lennart Poettering - Lev Veyde - Peter Robinson - Stefan Berger - Đoàn Trần Công Danh dracut-053 ========== #### Bug Fixes * **dracut.sh:** * unfreeze /boot on exit ([d87ae137](https://github.com/dracutdevs/dracut/commit/d87ae13721d04a8a2192d896af224ac6965caf70)) * proper return code for inst_multiple in dracut-init.sh ([d437970c](https://github.com/dracutdevs/dracut/commit/d437970c013e3287de263a1e60a117b15239896c)) * **fcoe:** * rename rd.nofcoe to rd.fcoe ([6f7823bc](https://github.com/dracutdevs/dracut/commit/6f7823bce65dd4b52497dbb94892b637fd06471a)) * rd.nofcoe=0 should disable fcoe ([805b46c2](https://github.com/dracutdevs/dracut/commit/805b46c2a81e04d69fc3af912942568516d05ee7)) * **i18n:** * get rid of `eval` calls ([5387ed24](https://github.com/dracutdevs/dracut/commit/5387ed24c8b33da1214232d57ab1831e117aaba0)) * create the keyboard symlinks again ([9e1c7f3d](https://github.com/dracutdevs/dracut/commit/9e1c7f3deadd387adaa97b189593b4ba3d7c6d5a)) * **network-manager:** * run as a service if systemd module is present ([c17c5b76](https://github.com/dracutdevs/dracut/commit/c17c5b7604c8d61dd1c00ee22d44c3a5d7d6dfee)) * rework how NM is started in debug mode ([34c73b33](https://github.com/dracutdevs/dracut/commit/34c73b339baa025dfd8916379c4d191be34a8af5)) * **drm:** skip empty modalias files in drm module setup ([c3f24184](https://github.com/dracutdevs/dracut/commit/c3f241849de6434d063ef92e6880f6b0335c1800)) dracut-052 ========== #### Features - **dracut:** - allow overriding the systemctl command for sysroot with `$SYSTEMCTL` for cross compilation - add additional global variables Variables like `dbusconfdir` or `systemdnetwork` are now exported to the individual modules as global variables. If they are not set in the distribution dracut config files, they are set via `pkg-config` - A `--no-uefi` option as been added to the CLI options to disable a default `uefi=yes` set by a configuration file. - **kernel-modules:** add modules from `drivers/memory` for arm - **network-legacy:** send dhcp in parallel on all devices via the `single-dhcp` option - **dbus:** introduce a meta module for dbus - **dbus-broker:** introduce the dbus-broker module - **dbus-daemon:** introduce the dbus-daemon module - **systemd-ask-password:** introduce the systemd-ask-password module - **systemd-coredump:** introduce the systemd-coredump module - **systemd-modules-load:** introduce the systemd-modules-load module - **systemd-repart:** introduce the systemd-repart module - **systemd-sysctl:** introduce the systemd-sysctl module - **systemd-sysusers:** introduce the systemd-sysuser module #### Bug Fixes - first round of shellcheck for all shell scripts - revise all module checks to not error out about missing dependencies - use the top-level `/efi` path to address the EFI partition - correct the squash quirk - use `find_binary` instead of other methods, because `find_binary` honors `dracutsysrootdir` - quote globbing in module-setup.sh for `inst_multiple` - move ldconfig after library workaround - do not set cmdline for uefi images unless asked - **dracut:** don't override `PATH`, if `dracutsysrootdir` is set - **dracut-functions.sh:** check kernel config from `dracutsysrootdir` - **dracut-init.sh:** make inst_libdir_file work with `dracutsysrootdir` set - **dracut-install:** allow globbing for multiple sources - **06dbus:** - do not hardcode path to dbus utils - do not hardcode path to systemd unit - **uefi** use efivars fs over the deprecated sysfs entries - **keyring** adding shared keyring mode to systemd unit `dracut-pre-pivot.service` - **35network-manager:** avoid restarting NetworkManager - **90kernel-modules:** install generic crypto modules with hostonly unset - **99squash:** use kernel config instead of modprobe to check modules - **dbus-daemon:** use uid/gid from sysroot if `dracutsysrootdir` is set - **kernel-modules:** add reset controllers for arm - **kernel-network-modules:** also install modules from mdio subdirectory - **mdraid:** - remove the `offroot` option (long deprecated) - add the grow continue service `mdadm-grow-continue` - **network-legacy:** silent the check for dhcp leaseinfo - **network-manager:** allow override network manager version - **plymouth:** install binaries with dependencies - **shutdown:** add timeout to umount calls - **watchdog:** fix dependencies in `module-setup.sh` #### Contributors - Harald Hoyer - Jóhann B. Guðmundsson - Zoltán Böszörményi - Alexey Shabalin - Daniel Molkentin - Luiz Angelo Daros de Luca - Mariusz Tkaczyk - Alexander Tsoy - Anjali Kulkarni - Beniamino Galvani - David Tardon - Javier Martinez Canillas - Kairui Song - Lukas Nykryn - Matthew Thode - Nicolas Chauvet - Nicolas Saenz Julienne - Ondrej Mosnacek - Peter Levine - Petr Pavlu - Vladius25 - Yang Liu <50459973+ly4096x@users.noreply.github.com> - foopub <45460217+foopub@users.noreply.github.com> - realtime-neil dracut-051 ========== dracut: - allow running on a cross-compiled rootfs dracutsysrootdir is the root directory, file existence checks use it. DRACUT_LDCONFIG can override ldconfig with a different one that works on the sysroot with foreign binaries. DRACUT_LDD can override ldd with a different one that works with foreign binaries. DRACUT_TESTBIN can override /bin/sh. A cross-compiled sysroot may use symlinks that are valid only when running on the target so a real file must be provided that exist in the sysroot. DRACUT_INSTALL now supports debugging dracut-install in itself when run by dracut but without debugging the dracut scripts. E.g. DRACUT_INSTALL="valgrind dracut-install or DRACUT_INSTALL="dracut-install --debug". DRACUT_COMPRESS_BZIP2, DRACUT_COMPRESS_LBZIP2, DRACUT_COMPRESS_LZMA, DRACUT_COMPRESS_XZ, DRACUT_COMPRESS_GZIP, DRACUT_COMPRESS_PIGZ, DRACUT_COMPRESS_LZOP, DRACUT_COMPRESS_ZSTD, DRACUT_COMPRESS_LZ4, DRACUT_COMPRESS_CAT: All of the compression utilities may be overridden, to support the native binaries in non-standard places. DRACUT_ARCH overrides "uname -m". SYSTEMD_VERSION overrides "systemd --version". The dracut-install utility was overhauled to support sysroot via a new option -r and fixes for clang-analyze. It supports cross-compiler-ldd from https://gist.github.com/jerome-pouiller/c403786c1394f53f44a3b61214489e6f DRACUT_INSTALL_PATH was introduced so dracut-install can work with a different PATH. In a cross-compiled environment (e.g. Yocto), PATH points to natively built binaries that are not in the host's /bin, /usr/bin, etc. dracut-install still needs plain /bin and /usr/bin that are relative to the cross-compiled sysroot. DRACUT_INSTALL_LOG_TARGET and DRACUT_INSTALL_LOG_LEVEL were introduced so dracut-install can use different settings from DRACUT_LOG_TARGET and DRACUT_LOG_LEVEL. - don't call fsfreeze on subvol of root file system - Use TMPDIR (typically /run/user/$UID) if available - dracut.sh: add check for invalid configuration files Emit a warning about possible misconfigured configuration files, where the spaces around values are missing for +="" - dracut-functions: fix find_binary() to return full path - dracut.sh: FIPS workaround for openssl-libs on Fedora/RHEL - dracut.sh: fix early microcode detection logic - dracut.sh: fix ia32 detection for uefi executables - dracut.sh: Add --version - dracut.sh: Add --hostonly-nics option - EFI Mode: only write kernel cmdline to UEFI binary - Allow $DRACUT_INSTALL to be not an absolute path - Don't print when a module is explicitly omitted (by default) - Remove uses of bash (and bash specific syntax) in runtime scripts - dracut-init.sh: Add a helper for detect device kernel modules - dracut-functions.sh: Fix check_block_and_slaves_all - dracut-functions.sh: add a helper to check if kernel module is available Documentation - dracut.cmdline.7.asc: clarify usage of `rd.lvm.vg` and `rd.lvm.lv` - dracut.conf.5.asc: document how to config --no-compress in the config - fix CI badges in README.md and fix dracut description - dracut.modules.7.asc: fix typos - dracut.modules.7.asc: fix reference to insmodpost module - Add --version to man page - Adding code of conduct - Document initqueue/online hook dracut-install: - install: also install post weak dependencies of kernel modules - install: Globbing support for resolving "firmware:" mkinitrd: - use vmlinux regex for ppc*, vmlinuz for i686 mkinitrd-suse: - fix i586 platform detection modules: 00systemd: - skip dependency add for non-existent units - add missing cryptsetup-related targets 05busybox: - simplify listing of supported utilities 06rngd: - install dependant libs too - Do not start inside container 10i18n: - i18n: Always install /etc/vconsole.conf 35network-legacy: - dhclient-script: Fix typo in output of BOUND & BOUND6 cases - simplify fallback dhcp setup 35network-manager: - ensure that nm-run.sh is executed when needed - install libnss DNS and mDNS plugins - always pull in machinery to read ifcfg files - set kernel hostname from the command line - move connection generation to a lib file 40network: - fix glob matching ipv6 addresses - net-lib.sh: support infiniband network mac addresses 45url-lib: - drop NSS if it's not in curl --version 80cms: - regenerate NetworkManager connections 90btrfs: - force preload btrfs module - Install crypto modules in 90kernel-modules 90crypt: - cryptroot-ask: no warn if /run/cryptsetup exist - install crypto modules in 90kernel-modules - try to catch kernel config changes - fix force on multiple lines - pull in remote-cryptsetup.target enablement - cryptroot-ask: unify /etc/crypttab and rd.luks.key 90dmsquash-live: - iso-scan.sh: Provide an easy reference to iso-scan device 90kernel-modules: - remove nfit from static module list (see nvdimm module) - install crypto modules in 90kernel-modules - add sg kernel module - add pci_hyperv - install block drivers more strictly - install less modules for hostonly mode - arm: add drivers/hwmon for arm/arm64 90kernel-network-modules - on't install iscsi related module (use 95iscsi) 90lvm: - remove unnecessary ${initdir} from lvm_scan.sh - fix removal of pvscan from udev rules - do not add newline to cmdline 90multipath: - add automatic configuration for multipath (adds 'rd.multipath=default' to use the default config) - install kpartx's 11-dm-parts.rules 90nvdimm: - new module for NVDIMM support 90ppcmac: - respect DRACUT_ARCH, don't exclude ppcle 90qemu-net: - in hostonly mode, only install if network is needed - install less module for strict hostonly mode 91zipl: - parse-zipl.sh: honor SYSTEMD_READY 95cifs: - pass rootflags to mount - install new softdeps (sha512, gcm, ccm, aead2) 95dasd: - only install /etc/dasd.conf if present 95dcssblk: - fix script permissions 95fcoe: - fix pre-trigger stage by replacing exit with return in lldpad.sh - default rd.nofcoe to false - don't install if there is no FCoE hostonly devices 95iscsi: - fix missing space when compiling cmdline args - fix ipv6 target discovery 95nfs: - only install rpc services for NFS < 4 when hostonly is strict - Change the order of NFS servers during the boot (next-server option has higher priority than DHCP-server itself) - install less module if hostonly mode is strict 95nvmf: - add module for NVMe-oF - add NVMe over TCP support 95resume: - do not resume on iSCSI, FCoE or NBD 95rootfs-block: - mount-root.sh: fix writing fstab file with missing fsck flag - only write root argument for block device 95zfcp: - match simplified rd.zfcp format too 95zfcp_rules: - parse-zfcp.sh: remove rule existence check 95znet: - add a rd.znet_ifname= option 98dracut-systemd: - remove memtrace-ko and rd.memdebug=4 support in dracut - remove cleanup_trace_mem calls - dracut-initqueue: Print more useful info in case of timeout - as of v246 of systemd "syslog" and "syslog-console" switches have been deprecated - don't wait for root device if remote cryptsetup active 99base: - dracut-lib.sh: quote variables in parameter expansion patterns - remove memtrace-ko and rd.memdebug=4 support in dracut - remove cleanup_trace_mem calls - see new module 99memstrack - prevent creating unexpected files on the host when running dracut 99memstrack: - memstrack is a new tool to track the overall memory usage and allocation, which can help off load the improve the builtin module memory tracing function in dracut. 99squash: - don't hardcode the squash sub directories - improve pre-requirements check - check require module earlier, and properly new modules: - nvmf - watchdog-modules - dbus - network-wicked removed modules: - stratis test suite: - use dd from /dev/zero, instead of creating files with a hole - TEST-03-USR-MOUNT/test.sh: increase loglevel - TEST-12-RAID-DEG/create-root.sh: more udevadm settle - TEST-35-ISCSI-MULTI: bump disk space - TEST-41-NBD-NM/Makefile: should be based on TEST-40-NBD not TEST-20-NFS - TEST-99: exclude /etc/dnf/* from check dracut-050 ========== dracut: - support for running on a cross-compiled rootfs, see README.cross - add support for creating secureboot signed UEFI images - use microcode found in packed cpio images - `-k/--kmodir` must now contain "lib/modules/$KERNEL_VERSION" use DRACUT_KMODDIR_OVERRIDE=1 to ignore this check - support the EFI Stub loader's splash image feature. `--uefi-splash-image ` dracut modules: - remove bashism in various boot scripts - emergency mode: use sulogin fcoe: - add rd.nofcoe option to disable the FCoE module from the command line 10i18n: - fix keymaps not getting included sometimes - use eurlatgr as default console font iscsi: - add option `rd.iscsi.testroute` multipath: - fix udev rules detection of multipath devices network: - support NetworkManager network-legacy: - fix classless static route parsing - ifup: fix typo when calling dhclient --timeout - ifup: nuke pid and lease files if dhclient failed - fix ip=dhcp,dhcp6 - use $name instead of $env{INTERFACE} (systemd-udevd regression) shutdown: - fix for non-systemd reboot/halt/shutdown commands - set selinux labels - fix shutdown with console=null lsinitrd: - list squash content as well - handle UEFI created with dracut --uefi - make lsinitrd usable for images made with Debian mkinitramfs dracut-install: - fixed ldd parsing - install kernel module dependencies of dependencies - fixed segfault for hashing NULL pointers - add support for compressed firmware files - dracut_mkdir(): create parent directories as needed. configure: - Find FTS library with --as-needed test suite: - lots of cleanups - add github actions new modules: - rngd - network-manager - ppcmac - thermal/fan control modules on PowerPC based Macs dracut-049 ========== lsinitrd: - record loaded kernel modules when hostonly mode is enabled lsinitrd $image -f */lib/dracut/loaded-kernel-modules.txt - allow to only unpack certain files kernel-modules: - add gpio and pinctrl drivers for arm*/aarch64 - add nfit kernel-network-modules: - add vlan kernel modules ifcfg/write-ifcfg.sh: - aggregate resolv.conf livenet: - Enable OverlayFS overlay in sysroot.mount generator. dmsquash-live: - Support a flattened squashfs.img - Remove obsolete osmin.img processing dracut-systemd: - Start systemd-vconsole-setup before dracut-cmdline-ask iscsi: - do not install all of /etc/iscsi unless hostonly - start iscsid even w/o systemd multipath: - fixed shutdown network: - configure NetworkManager to use dhclient mdraid: - fixed uuid handling ":" versus "-" stratis: - Add additional binaries new modules: - 00warpclock - 99squash Adds support for building a squashed initramfs - 35network-legacy the old 40network - 35network-manager alternative to 35network-legacy - 90kernel-modules-extra adds out-of-tree kernel modules testsuite: - now runs on travis - support new qemu device options - even runs without kvm now dracut-048 ========== dracut.sh: - fixed finding of btrfs devices - harden dracut against BASH_ENV environment variable - no more prelinking - scan and install "external" kernel modules - fixed instmods with zero input - rdsosreport: best effort to strip out passwords - introduce tri-state hostonly mode Add a new option --hostonly-mode which accept an parameter, so we have a tri-state hostonly mode: * generic: by passing "--no-hostonly" or not passing anything. "--hostonly-mode" has no effect in such case. * sloppy: by passing "--hostonly --hostonly-mode sloppy". This is also the default mode when only "--hostonly" is given. * strict: by passing "--hostonly --hostonly-mode strict". Sloppy mode is the original hostonly mode, the new introduced strict mode will allow modules to ignore more drivers or do some extra job to save memory and disk space, while making the image less portable. Also introduced a helper function "optional_hostonly" to make it easier for modules to leverage new hostonly mode. To force install modules only in sloppy hostonly mode, use the form: hostonly="$(optional_hostonly)" instmods dracut-install: - don't error out, if no modules were installed - support modules.softdep lsinitrd.sh: - fixed zstd file signature kernel: - include all pci/host modules - add mmc/core for arm - Include Intel Volume Management Device support plymouth: - fix detection of plymouth directory drm: - make failing installation of drm modules nonfatal - include virtio DRM drivers in hostonly initramfs stratis: - initial Stratis support crypt: - correct s390 arch to include arch-specific crypto modules - add cmdline rd.luks.partuuid - add timeout option rd.luks.timeout shutdown: - sleep a little, if a process was killed network: - introduce ip=either6 option iscsi: - replace iscsistart with iscsid qeth_rules: - new module to copy qeth rules multipath-hostonly: - merged back into multipath mdraid: - fixed case if rd.md.uuid is in ID_FS_UUID format dracut-047 ========== dracut.sh: - sync initramfs to filesystem with fsfreeze - introduce "--no-hostonly-default-device" - disable lsinitrd logging when quiet - add support for Zstandard compression - fixed relative paths in --kerneldir - if /boot/vmlinuz-$version exists use /boot/ as default output dir - make qemu and qemu-net a default module in non-hostonly mode - fixed relative symlinks - support microcode updates for all AMD CPU families - install all modules-load.d regardless of hostonly - fixed parsing of "-i" and "--include" - bump kmod version to >= 23 - enable 'early_microcode' by default - fixed check_block_and_slaves() for nvme lsinitrd.sh: - dismiss "cat" error messages systemd-bootchart: - removed i18n: - install all keymaps for a given locale - add correct fontmaps dmsquash-live: - fixed systemd unit escape systemd: - enable core dumps with systemd from initrd - fixed setting of timeouts for device units - emergency.service: use Type=idle and fixed task limit multipath: - include files from /etc/multipath/conf.d - do not fail startup on missing configuration - start daemon after udev settle - add shutdown script - parse kernel commandline option 'multipath=off' - start before local-fs-pre.target dracut-emergency: - optionally print filesystem help network: - fixed MTU for bond master - fixed race condition when wait for networks fcoe: - handle CNAs with DCB firmware support - allow to specify the FCoE mode via the fcoe= parameter - always set AUTO_VLAN for fcoemon - add shutdown script - fixup fcoe-genrules.sh for VN2VN mode - switch back to using fipvlan for bnx2fc - add timeout mechanism crypt: - add basic LUKS detached header support - escape backslashes for systemd unit names correctly - put block_uuid.map into initramfs dmraid: - do not delete partitions dasd_mod: - do not set module parameters if dasd_cio_free is not present nfs: - fix mount if IPv4 address is used in /etc/fstab - support host being a DNS ALIAS fips: - fixed creating path to .hmac of kernel based on BOOT_IMAGE - turn info calls into fips_info calls - modprobe failures during manual module loading is not fatal lunmask: - add module to handle LUN masking s390: - add rd.cio_accept dcssblk: - add new module for DCSS block devices zipl: - add new module to update s390x configuration iscsi: - no more iscsid, either iscsistart or iscsid integrity: - support loading x509 into the trusted/builtin .evm keyring - support X.509-only EVM configuration plymouth: - improve distro compatibility dracut-046 ========== dracut.sh: - bail out if module directory does not exist if people want to build the initramfs without kernel modules, then --no-kernel should be specified - add early microcode support for AMD family 16h - collect also all modaliases modules from sysfs for hostonly modules - sync initramfs after creation network: - wait for IPv6 RA if using none/static IPv6 assignment - ipv6 improvements - Handle curl using libnssckbi for TLS - fix dhcp classless_static_routes - dhclient: send client-identifier matching hardware address - don't arping for point-to-point connections - only bring up wired network interfaces (no wlan and wwan) mraid: - mdraid: wait for rd.md.uuid specified devices to be assembled crypt: - handle rd.luks.name crypt-gpg: - For GnuPG >= 2.1 support OpenPGP smartcards kernel-install: - Skip to create initrd if /etc/machine-id is missing or empty nfs: - handle rpcbind /run/rpcbind directory s390: - various fixes dmsquash-live: - add NTFS support multipath: - split out multipath-hostonly module lvmmerge: - new module, see README.md in the module directory dracut-systemd: - fixed dependencies dracut-045 ========== Important: dracut now requires libkmod for the dracut-install binary helper, which nows handles kernel module installing and filtering. dracut.sh: - restorecon final image file - fail hard, if we find modules and modules.dep is missing - support --tmpdir as a relative path - add default path for --uefi dracut-functions.sh: - fix check_vol_slaves() volume group name stripping dracut-install: - catch ldd message "cannot execute binary file" - added kernel module handling with libkmod Added parameters: --module,-m --mod-filter-path, -p --mod-filter-nopath, -P --mod-filter-symbol, -s --mod-filter-nosymbol, -S --mod-filter-noname, -N --silent --kerneldir --firmwaredirs - fallback to non-hostonly mode if lsmod fails lsinitrd: - new option "--unpack" - new option "--unpackearly" - and "--verbose" general initramfs fixes: - don't remove 99-cmdline-ask on 'hostonly' cleanup - call dracut-cmdline-ask.service, if /etc/cmdline.d/*.conf exists - break at switch_root only for bare rd.break - add rd.emergency=[reboot|poweroff|halt] specifies what action to execute in case of a critical failure - rd.memdebug=4 gives information, about kernel module memory consumption during loading dmsquash-live: - fixed livenet-generator execution flag and include only, if systemd is used - fixed dmsquash-live-root.sh for cases where the fstype of the liveimage is squashfs - fixed typo for rootfs.img - enable the use of the OverlayFS for the LiveOS root filesystem Patch notes: Integrate the option to use an OverlayFS as the root filesystem into the 90dmsquash-live module for testing purposes. The rd.live.overlay.overlayfs option allows one to request an OverlayFS overlay. If a persistent overlay is detected at the standard LiveOS path, the overlay & type detected will be used. Tested primarily with transient, in-RAM overlay boots on vfat- formatted Live USB devices, with persistent overlay directories on ext4-formatted Live USB devices, and with embedded, persistent overlay directories on vfat-formatted devices. (Persistent overlay directories on a vfat-formatted device must be in an embedded filesystem that supports the creation of trusted.* extended attributes, and must provide valid d_type in readdir responses.) The rd.live.overlay.readonly option, which allows a persistent overlayfs to be mounted read only through a higher level transient overlay directory, has been implemented through the multiple lower layers feature of OverlayFS. The default transient DM overlay size has been adjusted up to 32 GiB. This change supports comparison of transient Device-mapper vs. transient OverlayFS overlay performance. A transient DM overlay is a sparse file in memory, so this setting does not consume more RAM for legacy applications. It does permit a user to use all of the available root filesystem storage, and fails gently when it is consumed, as the available free root filesystem storage on a typical LiveOS build is only a few GiB. Thus, when booted on other- than-small RAM systems, the transient DM overlay should not overflow. OverlayFS offers the potential to use all of the available free RAM or all of the available free disc storage (on non-vfat-devices) in its overlay, even beyond the root filesystem available space, because the OverlayFS root filesystem is a union of directories on two different partitions. This patch also cleans up some message spew at shutdown, shortens the execution path in a couple of places, and uses persistent DM targets where required. dmraid: - added "nowatch" option in udev rule, otherwise udev would reread partitions for raid members - allow booting from degraded MD RAID arrays shutdown: - handle readonly /run on shutdown kernel-modules: - add all HID drivers, regardless of hostonly mode people swap keyboards sometimes and should be able to enter their disk password - add usb-storage To save the rdsosreport.txt to a USB stick, the usb-storage module is needed. - add xennet - add nvme systemd: - add /etc/machine-info - fixed systemd-escape call for names beginning with "-" - install missing drop-in configuration files for /etc/systemd/{journal.conf,system.conf} filesystems: - add support to F2FS filesystem (fsck and modules) network: - fix carrier detection - correctly set mac address for ip=...:: - fixed vlan, bonding, bridging, team logic call ifup for the slaves and assemble afterwards - add mtu to list of variables to store in override - for rd.neednet=0 a bootdev is not needed anymore - dhclient-script.sh: add classless-static-routes support - support for iBFT IPv6 - support macaddr in brackets [] (commit 740c46c0224a187d6b5a42b4aa56e173238884cc) - use arping2, if available - support multiple default gateways from DHCP server - fixup VLAN handling - enhance team support - differ between ipv6 local and global tentative - ipv6: wait for a router advertised route - add 'mtu' parameter for bond options - use 'ip' instead of 'brctl' nbd: - add systemd generator - use export names instead of port numbers, because port number based exports are deprecated and were removed. fcoe: - no more /dev/shm state copying multipath: - check all /dev/mapper devices if they are multipath devices, not only mpath* fips: - fixed .hmac installation in FIPS mode plymouth: - also trigger the acpi subsystem syslog: - add imjournal.so to read systemd journal - move start from udev to initqueue/online caps: - make it a non default module livenet: - support nfs:// urls in livenet-generator nfs: - install all nfs modules non-hostonly crypt: - support keyfiles embedded in the initramfs testsuite: - add TEST-70-BONDBRIDGETEAMVLAN - make "-cpu host" the default dracut-044 ========== creation: - better udev & systemd dir detection - split dracut-functions.sh in dracut-init.sh and dracut-functions.sh dracut-functions.sh can now be sourced by external tools - detect all btrfs devices needed - added flag file if initqueue is needed - don't overwrite anything, if initramfs image file creation failed - if no compressor is specified, try to find a suitable one - drop scanning kernel config for CONFIG_MICROCODE_*_EARLY - remove "_EARLY" from CONFIG_MICROCODE_* checks - dracut.sh: add command line option for install_i18_all --no-hostonly-i18n -> install_i18n_all=yes --hostonly-i18n -> install_i18n_all=no - --no-reproducible to turn off reproducible mode - dracut-function.sh can now be sourced from outside of dracut - dracut-init.sh contains all functions, which only can be used from within the dracut infrastructure - support --mount with just mountpoint as a parameter - removed action_on_fail support - removed host_modalias concept - do not create microcode, if no firmware is available - skip gpg files in microcode generation initramfs: - ensure pre-mount (and resume) run before root fsck - add --online option to initqueue qemu: - fixed virtual machine detection lvm: - remove all quirk arguments for lvm >= 2.2.221 dmsquash: - fixup for checkisomd5 - increase timeout for checkisomd5 - use non-persistent metadata snapshots for transient overlays. - overflow support for persistent snapshot. - use non-persistent metadata snapshots. - avoid an overlay for persistent, uncompressed, read-write live installations. multipath: - multipath.conf included in hostonly mode - install all multipath path selector kernel modules iSCSI: - use the iBFT initiator name, if found and set - iscsid now present in the initramfs - iscsistart is done with systemd-run asynchrone to do things in paralllel. Also restarted for every new interface which shows up. - If rd.iscsi.waitnet (default) is set, iscsistart is done only after all interfaces are up. - If not all interfaces are up and rd.iscsi.testroute (default) is set, the route to a iscsi target IP is checked and skipped, if there is none. - If all things fail, we issue a "dummy" interface iscsiroot to retry everything in the initqueue/timeout. network: - added DHCP RENEW/REBIND - IPv4 DHCP lease time now optional (bootp) - IPv6 nfs parsing - fixed IPv6 route parsing - rd.peerdns=0 parameter to disable DHCP nameserver setting - detect duplicate IPv4 addresses for static addresses - if interfaces are specified with its enx* name, bind the correspondent MAC to the interface name - if multiple "ip=" are present on the kernel command line "rd.neednet=1" is assumed - add options to tweak timeouts rd.net.dhcp.retry= If this option is set, dracut will try to connect via dhcp times before failing. Default is 1. rd.net.timeout.dhcp= If this option is set, dhclient is called with "-timeout ". rd.net.timeout.iflink= Wait until link shows up. Default is 60 seconds. rd.net.timeout.ifup= Wait until link has state "UP". Default is 20 seconds. rd.net.timeout.route= Wait until route shows up. Default is 20 seconds. rd.net.timeout.ipv6dad= Wait until IPv6 DAD is finished. Default is 50 seconds. rd.net.timeout.ipv6auto= Wait until IPv6 automatic addresses are assigned. Default is 40 seconds. rd.net.timeout.carrier= Wait until carrier is recognized. Default is 5 seconds. IMA: - load signed certificates in the IMA keyring, see modules.d/98integrity/README - load EVM public key in the kernel _evm keyring FCoE: fcoe: start with fcoemon instead of fipvlan dracut-043 ========== - add missing dmsquash-generator dracut-042 ========== - fixed dmsetup shutdown - new kernel command line option "rd.live.overlay.thin" This option changes the underlying mechanism for the overlay in the dmsquash module. Instead of a plain dm snapshot a dm thin snapshot is used. The advantage of the thin snapshot is, that the TRIM command is recognized, which means that at runtime, only the occupied blocks will be claimed from memory, and freed blocks will really be freed in ram. - dmsquash: Add squashfs support to rd.live.fsimg Previously rd.live.fsimg only supported filesystems residing in (compressed) archives. Now rd.live.fsimg can also be used when a squashfs image is used. This is achieved by extracting the rootfs image from the squashfs and then continue with the default routines for rd.live.fsimg. - lvm: add support for LVM system id - split up the systemd dracut module Basic systemd functionality is in 00systemd now. Switching root and the initrd.target is in 00systemd-initrd. Dracut additions to the systemd initrd are in 98dracut-systemd. - support for creating a UEFI boot executable via argument "--uefi" With an EFI stub, the kernel, the initramfs and a kernel cmdline can be glued together to a single UEFI executable, which can be booted by a UEFI BIOS. - network: split out kernel-network-modules, now in 90kernel-network-modules - support for ethernet point-to-point connections configured via DHCP - kernel-modules: install all HID drivers - dracut.pc pkg-config file - mount /dev, /dev/shm and /run noexec dracut-041 ========== - fixed the shutdown loop - fixed gzip compression for versions, which do not have --rsyncable - fixed ifcfg generation for persistent interface names - multipath: * new option to turn off multipath "rd.multipath=0" completly * preload scsi dh modules * start multipathd via systemd service - do not fail, if user pressed ESC during media check - fixed systemd-journal by symlinking /var/log to /run/initramfs/log - initrd-release moved to /usr/lib - lots of iSCSI fixes - new "rd.timeout" to specify the systemd JobTimeoutSec for devices - if $initrd/etc/cmdline.d/* has a "root=" and the kernel cmdline does not, generate a mount unit for it - increased the initqueue timeout for non systemd initramfs to 180s - $initrd/etc/cmdline.d/ hostonly files are now generated for NFS - make use of systemd-hibernate-resume, if available - fixed ldconfig parsing for hwcap output - network: add support for comma separated autoconf options like ip=eth0:auto6,dhcp - new parameter "rd.live.overlay.size" to specify the overlay for live images - changed the test suite for the new sfdisk syntax - added cache tools for dm-cache setups dracut-040 ========== - fixed dracut module dependency checks - fixed test suite dracut-039 ========== - DRACUT_PATH can now be used to specify the PATH used by dracut to search for binaries instead of the default /usr/sbin:/sbin:/usr/bin:/bin This should be set in the distribution config file /usr/lib/dracut/dracut.conf.d/01-dist.conf - add "--loginstall " and loginstall="" options to record all files, which are installed from the host fs - "rd.writable.fsimg" - support for read/write filesystem images - "rd.route" kernel command line parameter added - "--install-optional" and install_optional_items added - find plymouth pkglibdir on debian - torrent support for live images root=live:torrent://example.com/liveboot.img.torrent and generally added as a download handler - disable microcode, if the kernel does not support it - speed up ldconfig_paths() - more ARM modules - fixed inst*() functions and "-H" handling - fixed bridge setup - added --force-drivers parameter and force_drivers=+ config option to enforce driver loading at early boot time - documented "iso-scan/filename" usage in grub - various bugfixes dracut-038 ========== - "rd.cmdline=ask" will ask the user on the console to enter additional kernel command line parameters - "rd.hostonly=0" removes all "hostonly" added custom files, which is useful in combination with "rd.auto" or other specific parameters, if you want to boot on the same hardware, but the compiled in configuration does not match your setup anymore - inst* functions and dracut-install now accept the "-H" flag, which logs all installed files to /lib/dracut/hostonly-files. This is used to remove those files, if rd.hostonly is given on the kernel command line - strstr now only does literal string match, please use strglob and strglobin for globs - fixed unpacking of the microcode image on shutdown - added systemd-gpt-auto-generator - fcoe: wait for lldpad to be ready - network: handle "ip=dhcp6" - network: DCHPv6: set valid_lft and preferred_lft - dm: support dm-cache - fstab: do not mount and fsck from fstab if using systemd - break at switch_root only for bare rd.break and not for any rd.break=... - nbd: make use of "--systemd-mark", otherwise it gets killed on switch_root - fcoe-uefi: fixed cmdline parameter generation - iscsi: deprecate "ip=ibft", use "rd.iscsi.ibft[=1]" from now on - "lsinitrd -m" now only lists the dracut modules of the image - a lot of small bugfixes dracut-037 ========== - dracut: hostonly_cmdline variable and command line switch Toggle hostonly cmdline storing in the initramfs --hostonly-cmdline: Store kernel command line arguments needed in the initramfs --no-hostonly-cmdline: Do not store kernel command line arguments needed in the initramfs - dracut: --mount now understands full fstab lines - dracut now also includes drivers from the /lib/modules//updates directory - dracut: only set the owner of files to 0:0, if generated as non-root - dracut now directly writes to the initramfs file - dracut: call lz4 with the legacy flag (linux kernel does not support the new format) - systemd: rootfs-generator generates JobTimeout=0 units for the root device - systemd: added the systemd-sysctl service - systemd: add 80-net-setup-link.rules and .link files for persistent interface renaming - systemd: make dracut-shutdown.service failure non-fatal - network: various IPv6 fixes - network: DCHCP for IPv6 - network: understand ip=.....:: - network: parse ibft nameserver settings - shutdown: if kexec fails, just reboot - lvm: handle one LV at a time with lvchange - module-setup.sh: New functions require_binaries() and require_any_binary() to be used in the check() section of module-setup.sh. - a lot of small bugfixes Contributions from: Harald Hoyer Alexander Tsoy Till Maas Amadeusz Żołnowski Brian C. Lane Colin Guthrie Dave Young WANG Chao Shawn W Dunn dracut-036 ========== - fixed skipcpio signature checking dracut-035 ========== - changed dracut tarball compression to xz - new argument "--rebuild" - add lzo, lz4 compression - install: install all binaries with found in PATH - lsinitrd can now handle initramfs images with an early cpio prepended (microcode, ACPI tables) - mkinitrd-suse added as a compat stub for dracut - lvm: install thin utils for non-hostonly - resume: fix swap detection in hostonly - avoid loading unnecessary 32-bit libraries for 64-bit initrds - crypt: wait for systemd password agents - crypt: skip crypt swaps with password files - network: before doing dhcp, dracut now checks, if the link has a carrier - network: dhclient-script.sh now sets the lease time - network: include usbnet drivers - network: include all ethernet drivers - network: add rd.bootif=0 to ignore BOOTIF - i18n: introduce i18n_install_all, to install everything i18n related - support SuSE DASD configurations - support SuSE zfcp configurations - support SuSE compressed KEYMAP= setting - usrmount: always install the module, so always mount /usr from within the initramfs - test/TEST-17-LVM-THIN: new test case for lvm thin pools - "halt" the machine in systemd mode for die() dracut-034 ========== - do not run dhcp on parts of assembled network interfaces (bond, bridge) - add option to turn on/off prelinking --prelink, --noprelink do_prelink=[yes|no] - add ACPI table overriding - do not log to syslog/kmsg/journal for UID != 0 - lvm/mdraid: Fix LVM on MD activation - bcache module removed (now in bcache-tools upstream) - mdadm: also install configs from /etc/mdadm.conf.d - fixes for mdadm-3.2.6+ - mkinitrd: better compat support for SUSE - fcoe: add FCoE UEFI boot device support - rootfs-block: add support for the rootfallback= kernel cmdline option Contributions from: Thomas Renninger Alexander Tsoy Peter Rajnoha WANG Chao Harald Hoyer dracut-033 ========== - improved hostonly device recognition - improved hostonly module recognition - add dracut.css for dracut.html - do not install udev rules from /etc in generic mode - fixed LABEL= parsing for swap devices - fixed iBFT network setup - url-lib.sh: handle 0-size files with curl - dracut.asc: document debugging dracut on shutdown - if rd.md=0, use dmraid for imsm and ddf - skip empty dracut modules - removed caching of kernel cmdline - fixed iso-scan, if the loop device driver is a kernel module - bcache: support new blkid - fixed ifup udev rules - ifup with dhcp, if no "ip=" specified for the interface Contributions from: WANG Chao Colin Walters Harald Hoyer dracut-032 ========== - add parameter --print-cmdline This prints the kernel command line parameters for the current disk layout. $ dracut --print-cmdline rd.luks.uuid=luks-e68c8906-6542-4a26-83c4-91b4dd9f0471 rd.lvm.lv=debian/root rd.lvm.lv=debian/usr root=/dev/mapper/debian-root rootflags=rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered rootfstype=ext4 - dracut.sh: add --persistent-policy option and persistent_policy conf option --persistent-policy : Use to address disks and partitions. can be any directory name found in /dev/disk. E.g. "by-uuid", "by-label" - dracut now creates the initramfs without udevadm that means the udev database does not have to populated and the initramfs can be built in a chroot with /sys /dev /proc mounted - renamed dracut_install() to inst_multiple() for consistent naming - if $libdirs is unset, fall back to ld.so.cache paths - always assemble /usr device in initramfs - bash module added (disable it, if you really want dash) - continue to boot, if the main loop times out, in systemd mode - removed inst*() shell pure versions, dracut-install binary is in charge now - fixed ifcfg file generation for vlan - do not include adjtime and localtime anymore - fixed generation of zfcp.conf of CMS setups - install vt102 terminfo dracut_install() is still there for backwards compat - do not strip files in FIPS mode - fixed iBFT interface configuration - fs-lib: install fsck and fsck.ext* - shutdown: fixed killall_proc_mountpoint() - network: also wait for ethernet interfaces to setup - fixed checking for FIPS mode Contributions from: Harald Hoyer WANG Chao Baoquan He Daniel Schaal Dave Young James Lee Radek Vykydal dracut-031 ========== - do not include the resume dracut module in hostonly mode, if no swap is present - don't warn twice about omitted modules - use systemd-cat for logging on systemd systems, if logfile is unset - fixed PARTUUID parsing - support kernel module signing keys - do not install the usrmount dracut module in hostonly mode, if /sbin/init does not live in /usr - add debian udev rule files - add support for bcache - network: handle bootif style interfaces e.g. ip=77-77-6f-6f-64-73:dhcp - add support for kmod static devnodes - add vlan support for iBFT Contributions from: Harald Hoyer Amadeusz Żołnowski Brandon Philips Colin Walters James Lee Kyle McMartin Peter Jones dracut-030 ========== - support new persistent network interface names - fix findmnt calls, prevents hang on stale NFS mounts - add systemd.slice and slice.target units - major shell cleanup - support root=PARTLABEL= and root=PARTUUID= - terminfo: only install l/linux v/vt100 and v/vt220 - unset all LC_* and LANG, 10% faster - fixed dependency loop for dracut-cmdline.service - do not wait_for_dev for the root devices - do not wait_for_dev for devices, if dracut-initqueue is not needed - support early microcode loading with --early-microcode - dmraid, let dmraid setup its own partitions - sosreport renamed to rdsosreport Contributions from: Harald Hoyer Konrad Rzeszutek Wilk WANG Chao dracut-029 ========== - wait for IPv6 autoconfiguration - i18n: make the default font configurable To set the default font for your distribution, add i18n_default_font="latarcyrheb-sun16" to your /lib/dracut/dracut.conf.d/01-dist.conf distribution config. - proper handle "rd.break" in systemd mode before switch-root - systemd: make unit files symlinks - build without dash requirement - add dracut-shutdown.service.8 manpage - handle MACs for "ip=" "ip=77-77-6f-6f-64-73:dhcp" - don't explode when mixing BOOTIF and ip= - 90lvm/module-setup.sh: redirect error message of lvs to /dev/null Contributions from: Harald Hoyer Will Woods Baoquan He dracut-028 ========== - full integration of crypto devs in systemd logic - support for bridge over team and vlan tagged team - support multiple bonding interfaces - new kernel command line param "rd.action_on_fail" to control the emergency action - support for bridge over a vlan tagged interface - support for "iso-scan/filename" kernel parameter - lsinitrd got some love and does not use "file" anymore - fixed issue with noexec mounted tmp dirs - FIPS mode fixed - dracut_install got some love - fixed some /usr mounting problems - ifcfg dracut module got some love and fixes - default installed font is now latarcyrheb-sun16 - new parameters rd.live.dir and rd.live.squashimg - lvm: add tools for thin provisioning - also install non-hwcap libs - setup correct system time and time zone in initrd - s390: fixed cms setup - add systemd-udevd persistent network interface naming Contributions from: Harald Hoyer Kamil Rytarowski WANG Chao Baoquan He Adam Williamson Colin Guthrie Dan Horák Dave Young Dennis Gilmore Dennis Schridde dracut-027 ========== - dracut now has bash-completion - require bash version 4 - systemd module now requires systemd >= 199 - dracut makes use of native systemd initrd units - added hooks for new-kernel-pkg and kernel-install - hostonly is now default for fedora - comply with the BootLoaderSpec paths http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec - added rescue module - host_fs_types is now a hashmap - new dracut argument "--regenerate-all" - new dracut argument "--noimageifnotneeded" - new man page dracut.bootup - install all host filesystem drivers - use -D_FILE_OFFSET_BITS=64 to build dracut-install dracut-026 ========== - introduce /usr/lib/dracut/dracut.conf.d/ drop-in directory /usr/lib/dracut/dracut.conf.d/*.conf can be overwritten by the same filenames in /etc/dracut.conf.d. Packages should use /usr/lib/dracut/dracut.conf.d rather than /etc/dracut.conf.d for drop-in configuration files. /etc/dracut.conf and /etc/dracut.conf.d belong to the system administrator. - uses systemd-198 native initrd units - totally rely on the fstab-generator in systemd mode for block devices - dracut systemd now uses dracut.target rather than basic.target - dracut systemd services optimize themselves away - fixed hostonly parameter generation - turn off curl globbing (fixes IPv6) - modify the udev rules on install and not runtime time - enable initramfs building without kernel modules (fixed regression) - in the initqueue/timeout, reset the main loop counter, as we see new udev events or initqueue/work - fixed udev rule installation dracut-025 ========== - do not strip signed kernel modules - add sosreport script and generate /run/initramfs/sosreport.txt - make short uuid specification for allow-discards work - turn off RateLimit for the systemd journal - fixed MAC address assignment - add systemd checkisomd5 service - splitout drm kernel modules from plymouth module - add 'swapoff' to initramfs to fix shutdown/reboot - add team device support - add pre-shutdown hook - kill all processes in shutdown and report remaining ones - "--device" changed to "--add-device" and "add_device=" added for conf files - add memory usage trace to different hook points - cope with optional field #7 in /proc/self/mountinfo - lots of small bugfixes dracut-024 ========== - new dracut option "--device" - new dracut kernel command line options "rd.auto" - new dracut kernel command line options "rd.noverifyssl" - new dracut option "--kernel-cmdline" and "kernel_cmdline" option for default parameters - fixes for systemd and crypto - fix for kexec in shutdown, if not included in initramfs - create the initramfs non-world readable - prelink/preunlink in the initramfs - strip binaries in the initramfs by default now - various FIPS fixes - various dracut-install fixes dracut-023 ========== - resume from hibernate fixes - -N option for --no-hostonly - support for systemd crypto handling - new dracut module "crypt-loop" - deprecate the old kernel command line options - more documentation - honor CFLAGS for dracut-install build - multipath fixes - / is mounted according to rootflags parameter but forced ro at first. Later it is remounted according to /etc/fstab + rootflags parameter and "ro"/"rw". - support for xfs / reiserfs separate journal device - new "ro_mnt" option to force ro mount of / and /usr - root on cifs support - dracut-install: fixed issue for /var/tmp containing a symlink - only lazy resolve with ldd, if the /var/tmp partition is not mounted with "noexec" - i18n: fixed inclusion of "include" keymaps dracut-022 ========== - fixed host-only kernel module bug dracut-021 ========== - fixed systemd in the initramfs (requires systemd >= 187) - dracut-install: massive speedup with /var on the same filesystem with COW copy - dracut-install: moved to /usr/lib/dracut until it becomes a general purpose tool - new options: "rd.usrmount.ro" and "rd.skipfsck" - less mount/umount - apply "ro" on the kernel command line also to /usr - mount according to fstab, if neither "ro" or "rw" is specified - skip fsck for xfs and btrfs. remount is enough - give emergency_shell if /usr mount failed - dracut now uses getopt: * options can be position independent now!! * we can now use --option= - added option "--kver=", and the image location can be omitted # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64 - dracut.sh: for --include copy also the symbolic links - man pages: lsinitrd and mkinitrd added - network: We do not support renaming in the kernel namespace anymore (as udev does that not anymore). So, if a user wants to use ifname, he has to rename to a custom namespace. "eth[0-9]+" is not allowed anymore. !!!!! - resume: moved the resume process to the initqueue. This should prevent accidently mounting the root file system. - testsuite: add support for: make V=1 TESTS="01 20 40" check $ sudo make V=1 clean check now runs the testsuite in verbose mode $ sudo make TESTS="01 20 40" clean check now only runs the 01, 20 and 40 tests. dracut-020 ========== - changed rd.dasd kernel parameter - arm kernel modules added to kernel-modules - make udevdir systemdutildir systemdsystemunitdir global vars your distribution should ship those settings in /etc/dracut.conf.d/01-distro.conf see dracut.conf.d/fedora.conf.example - kernel modules are now only handled with /sys/modules and modules.dep - systemd fixups - mdraid: wait for md devices to be clean, before shutdown - ifup fixed for ipv6 - add PARTUUID as root=PARTUUID= parameter - fixed instmods() return code and set pipefail globally - add 04watchdog dracut module - dracut-shutdown.service: fixed ordering to be before shutdown.target - make use of "ln -r" instead of shell functions, if new coreutils is installed - network: support vlan tagged bonding - new dracut module qemu and qemu-net to install all kernel driver - fs-lib/fs-lib.sh: removed test mounting of btrfs and xfs - no more "mknod" in the initramfs!! - replaced all "tr" calls with "sed" - speedup with lazy kernel module dependency resolving - lots of speedup optimizations and last but not least - dracut-install: - new binary to significanlty speedup the installation process - dracut-functions.sh makes use of it, if installed dracut-019 ========== - initqueue/online hook - fixes for ifcfg write out - rootfs-block: avoid remount when options don't change - Debian multiarch support - virtfs root filesystem support - cope with systemd-udevd - mount tmpfs with strictatime - include all kernel/drivers/net/phy drivers - add debug_on() and debug_off() functions - add arguments for source_hook() and source_all() - cleanup hook - plymouth: get consoledev from /sys/class/tty/console/active - experimental systemd dracut module for systemd in the initramfs - install xhci-hcd kernel module - dracut: new "--mount" option - lsinitrd: new option --printsize - ARM storage kernel modules added - s390 cms conf file support - /etc/initrd-release in the initrd - vlan support - full bonding and bridge support - removed scsi_wait_scan kernel module from standard install - support rd.luks.allow-discards and honor options in crypttab - lots of bugfixes dracut-018 ========== - lvm: ignore lvm mirrors - lsinitrd: handle LZMA images - iscsi: add rd.iscsi.param - iscsi: add iscsi interface binding - new module cms to read and handle z-Series cms config files - fixed fstab.sys handling - new dracut option "--tmpdir" - new dracut option "--no-hostonly" - nbd: name based nbd connects - converted manpage and documentation source to asciidoc - write-ifcfg fixes and cleanups - ifup is now done in the initqueue - netroot cleanup - initqueue/online is now for hooks, which require network - no more /tmp/root.info - 98pollcdrom: factored out the ugly cdrom polling in the main loop - simplified rd.luks.uuid testing - removed "egrep" and "ls" calls - speedup kernel module installation - make bzip2 optional - lots of bugfixes dracut-017 ========== - a _lot_ faster than dracut-016 in image creation - systemd service dracut-shutdown.service - livenet fixes - ssh-client module install fix - root=iscsi:... fixed - lots of restructuring and optimizing in dracut-functions.sh - usrmount: honor fs_passno in /etc/fstab - renamed all shell scripts to .sh - new option "--omit-drivers" and config option "omit_drivers" - hostonly mode fixups dracut-016 ========== - fixed lsinitrd - honor binaries in sbin first - fixed usrmount module - added systemd service for shutdown - fixed terminfo on distros with /usr/share/terminfo - reload udev rules after "pre-trigger" hook - improved test suite - new parameter "--omit-drivers" and new conf param omit_drivers - "--offroot" support for mdraid - new libs: net-lib.sh, nfs-lib.sh, url-lib.sh, img-lib.sh full of functions to use in your dracut module dracut-015 ========== - hostonly mode automatically adds command line options for root and /usr - --add-fstab --mount parameters - ssh-client module - --ctty option: add job control - cleanup /run/initramfs - convertfs module - /sbin/ifup can be called directly - support kernel modules compressed with xz - s390 iscsi modules added - terminfo module - lsinitrd can handle concatened images - lsinitrd can sort by size dracut-014 ========== - new dracut arguments: --lvmconf --nolvmconf --fscks [LIST] --nofscks - new .conf options: install_items fscks nofscks - new kernel options: rd.md.ddf rd.md.waitclean plymouth.enable - dracut move from /sbin to /usr/bin - dracut modules dir moved from /usr/share/dracut to /usr/lib/dracut - profiling with "dracut --profile" - new TEST-16-DMSQUASH, test for Fedora LiveCDs - speedup of initramfs creation - ask_for_password fallback to CLI - mdraid completely switched to incremental assembly - no more cdrom polling - "switch_root" breakpoint is now very late - /dev/live is gone - /dev/root is gone - fs-lib dracut module for fscks added - xen dracut module removed - usb mass storage kernel drivers now included - usrmount dracut module added: mount /usr if found in /sysroot/etc/fstab - only include fsck helper needed for hostonly - fcoe: support for bnx2fc - support iSCSI drivers: qla4xxx, cxgb3i, cxgb4i, bnx2i, be2iscsi - fips-aesni dracut module added - add install_items to dracut.conf install_items+=" [ ...] " - speedup internal testsuite - internal testsuite: store temporary data in a temporary dir dracut-013 ========== - speedup of initramfs creation - fixed inst_dir for symbolic links - add unix kernel module dracut-012 ========== - better fsck handling - fixed wait condition for LVM volumes - fix for hardlinks (welcome Debian! :-) - shutdown bugfixes - automatic busybox symlink creation - try to mount /usr, if init points to a path in /usr - btrfs with multiple devices - "--force-add" option for dracut, to force-add dracut modules, without hostonly checks - lsinitrd also display the initramfs size in human readable form - livenet module, to mount live-isos over http - masterkey,ecryptfs,integrity security modules - initqueue/timeout queue e.g. for starting degraded raids - "make rpm" creates an rpm with an increasing release number from any git checkout - support lvm mirrors - start degraded lvm mirrors after a timeout - start degraded md raids after a timeout - getarg() now returns wildcards without file matching to the current fs - lots of bugfixes dracut-011 ========== - use udev-168 features for shutting down udev - introduce "--prefix" to put all initramfs files in e.g "/run/initramfs" - new shutdown script (called by systemd >= 030) to disassemble the root device - lots of bugfixes - new module for gpg-encrypted keys - 91crypt-gpg dracut-010 ========== - lots of bugfixes - plymouth: use /run/plymouth/pid instead of /run/initramfs/plymouth - add "/lib/firmware/updates" to default firmware path dracut-009 ========== - dracut generator - dracut-logger - xz compression - better argument handling - initramfs - hooks moved to /lib/dracut/hooks in initramfs - rd.driver.{blacklist|pre|post} accept comma separated driver list - iSCSI: iSCSI Boot Firmware Table (iBFT) support - support for /run - live image: support for generic rootfs.img (instead of ext3fs.img) - caps module - FCoE: EDD support dracut-008 ========== - removed --ignore-kernel-modules option (no longer necessary) - renamed kernel command line arguments to follow the rd. naming scheme - merged check, install, installkernel to module-setup.sh - support for bzip2 and xz compressed initramfs images. - source code beautification - lots of documentation - lsinitrd: "catinitrd" functionality - dracut: --list-modules - lvm: support for dynamic LVM SNAPSHOT root volume - 95fstab-sys: mount all /etc/fstab.sys volumes before switch_root - 96insmodpost dracut module - rd.shell=1 per default - rootfs-block:mount-root.sh add fsck - busybox shell replacements module - honor old "real_init=" - 97biosdevname dracut module dracut-007 ========== - module i18n is no longer fedora/red hat specific (Amadeusz Żołnowski) - distribution specific conf file - bootchartd support - debug module now has fsck - use "hardlink", if available, to save some space - /etc/dracut.conf can be overwritten by settings in /etc/dracut.conf.d/*.conf - gentoo splash module - --ignore-kernel-modules option - crypto keys on external devices support - bugfixes dracut-006 ========== - fixed mdraid with IMSM - fixed dracut manpages - dmraid parse different error messages - add cdrom polling mechanism for slow cdroms - add module btrfs - add btrfsctl scan for btrfs multi-devices (raid) - teach dmsquash live-root to use rootflags - trigger udev with action=add - fixed add_drivers handling - add sr_mod - use pigz instead of gzip, if available - boot from LVM mirrors and snapshots - iscsi: add support for multiple netroot=iscsi: - Support old version of module-init-tools - got rid of rdnetdebug - fixed "ip=auto6" - dracut.conf: use "+=" as default for config variables - bugfixes dracut-005 ========== - dcb support to dracut's FCoE support - add readonly overlay support for dmsquash - add keyboard kernel modules - dracut.conf: added add_dracutmodules - add /etc/dracut.conf.d - add preliminary IPv6 support - bugfixes dracut-004 ========== - dracut-lib: read multiple lines from $init/etc/cmdline - lsinitrd and mkinitrd - dmsquash: add support for loopmounted *.iso files - lvm: add rd_LVM_LV and "--poll n" - user suspend support - add additional drivers in host-only mode, too - improved emergency shell - support for compressed kernel modules - support for loading Xen modules - rdloaddriver kernel command line parameter - man pages for dracut-catimages and dracut-gencmdline - bugfixes dracut-003 ========== - add debian package modules - add dracut.conf manpage - add module 90multipath - add module 01fips - crypt: ignore devices in /etc/crypttab (root is not in there) unless rd_NO_CRYPTTAB is specified - kernel-modules: add scsi_dh scsi_dh_rdac scsi_dh_emc - add multinic support - add s390 zfcp support - add s390 dasd support - add s390 network support - fixed dracut-gencmdline for root=UUID or LABEL - do not destroy assembled raid arrays if mdadm.conf present - mount /dev/shm - let udevd not resolve group and user names - moved network from udev to initqueue - improved debug output: specifying "rdinitdebug" now logs to dmesg, console and /init.log - strip kernel modules which have no x bit set - redirect stdin, stdout, stderr all RW to /dev/console so the user can use "less" to view /init.log and dmesg - add new device mapper udev rules and dmeventd - fixed dracut-gencmdline for root=UUID or LABEL - do not destroy assembled raid arrays if mdadm.conf present - mount /dev/shm - let udevd not resolve group and user names - preserve timestamps of tools on initramfs generation - generate symlinks for binaries correctly - moved network from udev to initqueue - mount nfs3 with nfsvers=3 option and retry with nfsvers=2 - fixed nbd initqueue-finished - improved debug output: specifying "rdinitdebug" now logs to dmesg, console and /init.log - strip kernel modules which have no x bit set - redirect stdin, stdout, stderr all RW to /dev/console so the user can use "less" to view /init.log and dmesg - make install of new dm/lvm udev rules optionally - add new device mapper udev rules and dmeventd - Fix LiveCD boot regression - bail out if selinux policy could not be loaded and selinux=0 not specified on kernel command line - do not cleanup dmraids - copy over lvm.conf dracut-002 ========== - add ifname= argument for persistent netdev names - new /initqueue-finished to check if the main loop can be left - copy mdadm.conf if --mdadmconf set or mdadmconf in dracut.conf - plymouth: use plymouth-populate-initrd - add add_drivers for dracut and dracut.conf - add modprobe scsi_wait_scan to be sure everything was scanned - fix for several problems with md raid containers - fix for selinux policy loading - fix for mdraid for IMSM - fix for bug, which prevents installing 61-persistent-storage.rules (bug #520109) - fix for missing grep for md dracut-001 ========== - better --hostonly checks - better lvm/mdraid/dmraid handling - fcoe booting support Supported cmdline formats: fcoe=: fcoe=: Note currently only nodcb is supported, the dcb option is reserved for future use. Note letters in the macaddress must be lowercase! Examples: fcoe=eth0:nodcb fcoe=4A:3F:4C:04:F8:D7:nodcb - Syslog support for dracut This module provides syslog functionality in the initrd. This is especially interesting when complex configuration being used to provide access to the device the rootfs resides on. dracut-0.9 ========== - let plymouth attach to the terminal (nice text output now) - new kernel command line parameter "rdinfo" show dracut output, even when "quiet" is specified - rd_LUKS_UUID is now handled correctly - dracut-gencmdline: rd_LUKS_UUID and rd_MD_UUID is now correctly generated - now generates initrd-generic with around 15MB - smaller bugfixes dracut-0.8 ========== - iSCSI with username and password - support for live images (dmsquashed live images) - iscsi_firmware fixes - smaller images - bugfixes dracut-0.7 ========== - dracut: strip binaries in initramfs --strip strip binaries in the initramfs (default) --nostrip do not strip binaries in the initramfs - dracut-catimages Usage: ./dracut-catimages [OPTION]... [...] Creates initial ramdisk image by concatenating several images from the command line and /boot/dracut/ -f, --force Overwrite existing initramfs file. -i, --imagedir Directory with additional images to add (default: /boot/dracut/) -o, --overlaydir Overlay directory, which contains files that will be used to create an additional image --nooverlay Do not use the overlay directory --noimagedir Do not use the additional image directory -h, --help This message --debug Output debug information of the build process -v, --verbose Verbose output during the build process - s390 dasd support dracut-0.6 ========== - dracut: add --kernel-only and --no-kernel arguments --kernel-only only install kernel drivers and firmware files --no-kernel do not install kernel drivers and firmware files All kernel module related install commands moved from "install" to "installkernel". For "--kernel-only" all installkernel scripts of the specified modules are used, regardless of any checks, so that all modules which might be needed by any dracut generic image are in. The basic idea is to create two images. One image with the kernel modules and one without. So if the kernel changes, you only have to replace one image. Grub and the kernel can handle multiple images, so grub entry can look like this: title Fedora (2.6.29.5-191.fc11.i586) root (hd0,0) kernel /vmlinuz-2.6.29.5-191.fc11.i586 ro rhgb quiet initrd /initrd-20090722.img /initrd-kernel-2.6.29.5-191.fc11.i586.img /initrd-config.img initrd-20090722.img the image provided by the initrd rpm one old backup version is kept like with the kernel initrd-kernel-2.6.29.5-191.fc11.i586.img the image provided by the kernel rpm initrd-config.img optional image with local configuration files - dracut: add --kmoddir directory, where to look for kernel modules -k, --kmoddir [DIR] specify the directory, where to look for kernel modules dracut-0.5 ========== - more generic (all plymouth modules, all keyboards, all console fonts) - more kernel command line parameters (see also man dracut(8)) - a helper tool, which generates the kernel command line (dracut-gencmdline) - bridged network boot - a lot of new command line parameter dracut-0.4 ========== - bugfixes - firmware loading support - new internal queue (initqueue) initqueue now loops until /dev/root exists or root is mounted init now has the following points to inject scripts: /cmdline/*.sh scripts for command line parsing /pre-udev/*.sh scripts to run before udev is started /pre-trigger/*.sh scripts to run before the main udev trigger is pulled /initqueue/*.sh runs in parallel to the udev trigger Udev events can add scripts here with /sbin/initqueue. If /sbin/initqueue is called with the "--onetime" option, the script will be removed after it was run. If /initqueue/work is created and udev >= 143 then this loop can process the jobs in parallel to the udevtrigger. If the udev queue is empty and no root device is found or no root filesystem was mounted, the user will be dropped to a shell after a timeout. Scripts can remove themselves from the initqueue by "rm $job". /pre-mount/*.sh scripts to run before the root filesystem is mounted NFS is an exception, because it has no device node to be created and mounts in the udev events /mount/*.sh scripts to mount the root filesystem NFS is an exception, because it has no device node to be created and mounts in the udev events If the udev queue is empty and no root device is found or no root filesystem was mounted, the user will be dropped to a shell after a timeout. /pre-pivot/*.sh scripts to run before the real init is executed and the initramfs disappears All processes started before should be killed here. The behaviour of the dmraid module demonstrates how to use the new mechanism. If it detects a device which is part of a raidmember from a udev rule, it installs a job to scan for dmraid devices, if the udev queue is empty. After a scan, it removes itsself from the queue. dracut-0.3 ========== - first public version dracut-ng-dracut-ng-3e4cfdd/README.md000066400000000000000000000034661474727335100173430ustar00rootroot00000000000000# dracut-ng dracut-ng is an event driven initramfs infrastructure. [![distributions](https://repology.org/badge/tiny-repos/dracut.svg)](https://repology.org/project/dracut/versions) [![version(s)](https://repology.org/badge/latest-versions/dracut.svg)](https://repology.org/project/dracut/versions) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://dracut-ng.github.io/dracut-ng/developer/code_of_conduct.html) dracut creates an initrd image by copying tools and files from an installed system and combining it with dracut modules, usually found in /usr/lib/dracut/modules.d. # Documentation Generated documentation from this source tree is available at https://dracut-ng.github.io/ The [Wiki](https://github.com/dracut-ng/dracut-ng/wiki) is available to share information. # Releases The release tarballs are [here](https://github.com/dracut-ng/dracut-ng/releases). See [News](NEWS.md) for information about changes in the releases # Contributing Currently dracut-ng is developed on [github.com](https://github.com/dracut-ng/dracut-ng). See the developer guide at https://dracut-ng.github.io/ for information on reporting issues, contributing code via pull requests and guidelines for how to get started contributing to dracut. # Security Security is taken very seriously. Please do not report security issues in the public tracker. For guidelines on reporting security issues see the [security](https://dracut-ng.github.io/dracut-ng/developer/security.html) guide. # Chat and project interactions Chat (Matrix): - https://matrix.to/#/#dracut-ng:matrix.org See the [GitHub issue tracker](https://github.com/dracut-ng/dracut-ng/issues) for things which still need to be done. This is also the main place used for discussions. # License Licensed under the GPLv2 dracut-ng-dracut-ng-3e4cfdd/antora-playbook.yml000066400000000000000000000007231474727335100217020ustar00rootroot00000000000000--- site: title: Dracut url: https://dracut-ng.github.io content: sources: - url: . branches: HEAD start_path: doc_site ui: bundle: url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable snapshot: true supplemental_files: ./doc_site/supplemental-ui runtime: log: # In C terms, -Werror failure_level: warn asciidoc: extensions: - ./doc_site/extensions/man.js dracut-ng-dracut-ng-3e4cfdd/configure000077500000000000000000000132201474727335100177600ustar00rootroot00000000000000#!/bin/bash # We don't support srcdir != builddir echo \#buildapi-variable-no-builddir > /dev/null prefix=/usr enable_documentation=yes # if is cargo installed, let's build dracut-cpio if command -v cargo > /dev/null; then enable_dracut_cpio=yes else enable_dracut_cpio=no fi # set systemdsystemunitdir on systemd-based systems if [ -d /usr/lib/systemd/system ]; then systemdsystemunitdir=/usr/lib/systemd/system fi CC="${CC:-cc}" PKG_CONFIG="${PKG_CONFIG:-pkg-config}" # Little helper function for reading args from the commandline. # it automatically handles -a b and -a=b variants, and returns 1 if # we need to shift $3. read_arg() { # $1 = arg name # $2 = arg value # $3 = arg parameter local rematch='^[^=]*=(.*)$' if [[ $2 =~ $rematch ]]; then read -r "$1" <<< "${BASH_REMATCH[1]}" else read -r "$1" <<< "$3" # There is no way to shift our callers args, so # return 1 to indicate they should do it instead. return 1 fi return 0 } while (($# > 0)); do case "${1%%=*}" in --prefix) read_arg prefix "$@" || shift ;; --libdir) read_arg libdir "$@" || shift ;; --datadir) read_arg datadir "$@" || shift ;; --sysconfdir) read_arg sysconfdir "$@" || shift ;; --sbindir) read_arg sbindir "$@" || shift ;; --mandir) read_arg mandir "$@" || shift ;; --disable-documentation) enable_documentation=no ;; --program-prefix) read_arg programprefix "$@" || shift ;; --exec-prefix) read_arg execprefix "$@" || shift ;; --bindir) read_arg bindir "$@" || shift ;; --includedir) read_arg includedir "$@" || shift ;; --libexecdir) read_arg libexecdir "$@" || shift ;; --localstatedir) read_arg localstatedir "$@" || shift ;; --sharedstatedir) read_arg sharedstatedir "$@" || shift ;; --infodir) read_arg infodir "$@" || shift ;; --systemdsystemunitdir) read_arg systemdsystemunitdir "$@" || shift ;; --bashcompletiondir) read_arg bashcompletiondir "$@" || shift ;; --enable-dracut-cpio) enable_dracut_cpio=yes ;; --disable-dracut-cpio) enable_dracut_cpio=no ;; --configprofile) read_arg configprofile "$@" || shift ;; *) echo "Ignoring unknown option '$1'" ;; esac shift done if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 23 "; then echo "dracut needs pkg-config and libkmod >= 23." >&2 exit 1 fi if ! ${CC} -c -o /dev/null /dev/null &> /dev/null; then echo "dracut needs a C compiler (${CC} not found)." >&2 exit 1 fi cat << EOF > conftest.c #include int main() { return 0; } EOF # shellcheck disable=SC2086 ${CC} $CFLAGS $LDFLAGS conftest.c > /dev/null 2>&1 ret=$? rm -f conftest.c a.out # musl doesn't have fts.h included if test $ret -ne 0; then echo "dracut needs fts development files." >&2 exit 1 fi cat << EOF > conftest.c #include int main(void) { fts_open(0, 0, 0); return 0; } EOF found=no for lib in "-lc" "-lfts"; do # shellcheck disable=SC2086 ${CC} $CFLAGS $LDFLAGS conftest.c -Wl,$lib > /dev/null 2>&1 ret=$? if test $ret -eq 0; then FTS_LIBS="$lib" found=yes break fi done rm -f conftest.c a.out if test $found = no; then echo "dracut couldn't find usable fts library" >&2 exit 1 fi cat << EOF > conftest.c #include #include #include #ifndef SYS_gettid #error "SYS_gettid unavailable on this system" #endif #define gettid() ((pid_t) syscall(SYS_gettid)) int main(void) { return getpid() == gettid() ? 0 : -1; } EOF # shellcheck disable=SC2086 ${CC} $CFLAGS $LDFLAGS conftest.c > /dev/null 2>&1 ret=$? rm -f conftest.c a.out if test $ret -ne 0; then echo "dracut needs SYS_gettid support." >&2 exit 1 fi if test "$enable_dracut_cpio" = "yes"; then cargo --version > /dev/null ret=$? if test $ret -ne 0; then echo "dracut couldn't find cargo for dracut-cpio build" exit 1 fi fi cat << EOF > weakdep_test.c #include #include int main(void) { struct kmod_module *mod = NULL; struct kmod_list *modweak = NULL; return kmod_module_get_weakdeps(mod, &modweak); } EOF # shellcheck disable=SC2086,SC2046 ${CC} $CFLAGS $LDFLAGS weakdep_test.c $(${PKG_CONFIG} --libs libkmod) > /dev/null 2>&1 ret=$? rm -f weakdep_test.c a.out if test $ret -eq 0; then KMOD_CFLAGS_EXTRA+=" -DCONFIG_WEAKDEP" fi cat > Makefile.inc.$$ << EOF prefix ?= ${prefix} libdir ?= ${libdir:-${prefix}/lib} datadir ?= ${datadir:-${prefix}/share} sysconfdir ?= ${sysconfdir:-${prefix}/etc} sbindir ?= ${sbindir:-${prefix}/sbin} mandir ?= ${mandir:-${prefix}/share/man} enable_documentation ?= ${enable_documentation:-yes} enable_dracut_cpio ?= ${enable_dracut_cpio} bindir ?= ${bindir:-${prefix}/bin} KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 23 ") ${KMOD_CFLAGS_EXTRA} KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ") FTS_LIBS ?= ${FTS_LIBS} EOF { [[ $programprefix ]] && echo "programprefix ?= ${programprefix}" [[ $execprefix ]] && echo "execprefix ?= ${execprefix}" [[ $includedir ]] && echo "includedir ?= ${includedir}" [[ $libexecdir ]] && echo "libexecdir ?= ${libexecdir}" [[ $localstatedir ]] && echo "localstatedir ?= ${localstatedir}" [[ $sharedstatedir ]] && echo "sharedstatedir ?= ${sharedstatedir}" [[ $infodir ]] && echo "infodir ?= ${infodir}" [[ $systemdsystemunitdir ]] && echo "systemdsystemunitdir ?= ${systemdsystemunitdir}" [[ $bashcompletiondir ]] && echo "bashcompletiondir ?= ${bashcompletiondir}" [[ $configprofile ]] && echo "configprofile ?= ${configprofile}" } >> Makefile.inc.$$ mv Makefile.inc.$$ Makefile.inc dracut-ng-dracut-ng-3e4cfdd/doc_site/000077500000000000000000000000001474727335100176445ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/.gitignore000066400000000000000000000000601474727335100216300ustar00rootroot00000000000000# autogenerated by Make modules/ROOT/pages/man/ dracut-ng-dracut-ng-3e4cfdd/doc_site/antora.yml000066400000000000000000000001121474727335100216450ustar00rootroot00000000000000--- name: ROOT title: dracut-ng version: ~ nav: - modules/ROOT/nav.adoc dracut-ng-dracut-ng-3e4cfdd/doc_site/extensions/000077500000000000000000000000001474727335100220435ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/extensions/man.js000066400000000000000000000016401474727335100231550ustar00rootroot00000000000000/* Example use * * man:page[N,external] * * N: section * external: optional arg, links to external man page * */ module.exports = function(registry) { registry.inlineMacro('man', function() { var self = this self.process(function (parent, target, attrs) { let section = attrs.$positional[0] === undefined ? '' : attrs.$positional[0]; let internal = attrs.$positional[1] === undefined ? true : false const attributes = {} const content = `${target}(${section})` let url if (internal) { url = `${target}.${section}.html` } else { url = `https://manpages.ubuntu.com/man${section}/${target}.${section}.html` } return self.createInline(parent, 'anchor', content, { type: 'link', target: url, attributes }) }) }) } dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/000077500000000000000000000000001474727335100213145ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/000077500000000000000000000000001474727335100220775ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/nav.adoc000066400000000000000000000021241474727335100235120ustar00rootroot00000000000000.Dracut .Manual pages * User ** xref:man/dracut.8.adoc[] ** xref:man/dracut.conf.5.adoc[] ** xref:man/dracut.cmdline.7.adoc[] ** xref:man/lsinitrd.1.adoc[] * Developer ** xref:man/dracut.modules.7.adoc[] ** xref:man/dracut.bootup.7.adoc[] * systemd ** xref:man/dracut-cmdline.service.8.adoc[] ** xref:man/dracut-initqueue.service.8.adoc[] ** xref:man/dracut-mount.service.8.adoc[] ** xref:man/dracut-pre-mount.service.8.adoc[] ** xref:man/dracut-pre-pivot.service.8.adoc[] ** xref:man/dracut-pre-trigger.service.8.adoc[] ** xref:man/dracut-pre-udev.service.8.adoc[] ** xref:man/dracut-shutdown.service.8.adoc[] .Developer Guide * xref:developer/contributing.adoc[] * xref:developer/code_of_conduct.adoc[] * xref:developer/security.adoc[] * xref:developer/hacking.adoc[] * xref:developer/modules.adoc[] * xref:developer/compatability.adoc[] * xref:developer/reviews.adoc[] * xref:developer/bash.adoc[] * xref:developer/release.adoc[] * xref:developer/cross_compiling.adoc[] .Modules Guide * xref:modules/core.adoc[] * xref:modules/network.adoc[] * xref:modules/systemd.adoc[] * xref:modules/s390.adoc[] dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/000077500000000000000000000000001474727335100231765ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/000077500000000000000000000000001474727335100251635ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/bash.adoc000066400000000000000000000046141474727335100267350ustar00rootroot00000000000000= Bash Notes == basename Don't use `basename`, use: [,bash] ---- file=${path##*/} ---- == dirname Don't use `dirname`, use: [,bash] ---- dir=${path%/*} ---- == shopt If you set `shopt` in a function, reset to its default state with `trap`: [,bash] ---- func() { trap "$(shopt -p globstar)" RETURN shopt -q -s globstar } ---- == find, grep, print0, -0, -z Don't use `find` in `for` loops, because filenames can contain spaces. Try to use `globstar` and `nullglob` or null byte terminated strings. Instead of: [,bash] ---- func() { for file in $(find /usr/lib* -type f -name 'lib*.a' -print0 ); do echo $file done } ---- use: [,bash] ---- func() { trap "$(shopt -p nullglob globstar)" RETURN shopt -q -s nullglob globstar for file in /usr/lib*/**/lib*.a; do [[ -f $file ]] || continue echo "$file" done } ---- Or collect the filenames in an array, if you need them more than once: [,bash] ---- func() { trap "$(shopt -p globstar)" RETURN shopt -q -s globstar filenames=( /usr/lib*/**/lib*.a ) for file in "${filenames[@]}"; do [[ -f $file ]] || continue echo "$file" done } ---- Or, if you really want to use `find`, use `-print0` and an array: [,bash] ---- func() { mapfile -t -d '' filenames < <(find /usr/lib* -type f -name 'lib*.a' -print0) for file in "${filenames[@]}"; do echo "$file" done } ---- NOTE: `-d ''` is the same as `-d $'\0'` and sets the null byte as the delimiter. or: [,bash] ---- func() { find /usr/lib* -type f -name 'lib*.a' -print0 | while read -r -d '' file; do echo "$file" done } ---- or [,bash] ---- func() { while read -r -d '' file; do echo "$file" done < <(find /usr/lib* -type f -name 'lib*.a' -print0) } ---- Use the tool options for null terminated strings, like `-print0`, `-0`, `-z`, etc. == prefix or suffix array elements Instead of: [,bash] ---- func() { other-cmd $(for k in "$@"; do echo "prefix-$k"; done) } ---- do [,bash] ---- func() { other-cmd "${@/#/prefix-}" } ---- or suffix: [,bash] ---- func() { other-cmd "${@/%/-suffix}" } ---- == Join array elements with a separator char Here we have an associate array `_drivers`, where we want to print the keys separated by ',': [,bash] ---- if [[ ${!_drivers[*]} ]]; then echo "rd.driver.pre=$(IFS=, ;echo "${!_drivers[*]}")" > "${initdir}"/etc/cmdline.d/00-watchdog.conf fi ---- dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/code_of_conduct.adoc000066400000000000000000000074041474727335100311350ustar00rootroot00000000000000= Dracut Code of Conduct This code of conduct outlines our expectations for participants within the Dracut community, as well as steps for reporting unacceptable behavior. We are committed to providing a welcoming and inspiring community for all and expect our code of conduct to be honored. Anyone who violates this code of conduct may be banned from the community. == Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. == Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others`' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting == Our Responsibilities Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. == Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. == Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer responsible for enforcement Harald Hoyer link:mailto:harald@profian.com[harald@profian.com]. All complaints will be reviewed and investigated promptly and fairly and will result in a response that is deemed necessary and appropriate to the circumstances. Project maintainers are obligated to respect the privacy and security of the reporter of any incident. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. == Attribution This Code of Conduct is adapted from the https://www.contributor-covenant.org[Contributor Covenant], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/compatability.adoc000066400000000000000000000024701474727335100306570ustar00rootroot00000000000000= Compatability Expect compatibility preserved for * dracut command line options * kernel command line options * dracut module names * dracut module interface Do not expect compatibility preserved for * undocumented filenames and function names for dracut module implementations * very old dependent binary versions (including udev and systemd) Changes impacting compatibility are explained in commit messages and in the NEWS file. When possible dracut will follow a depreciation process, whereby for one releases (and one releases only) dracut will preserve compatibility to allow for migration. The compatibility promise is primary towards end users and not towards Linux distributions packaging dracut. Distribution packaging will need changes time-to-time between dracut releases (e.g. as files gets added and removed). == Dependencies Dependencies for the generated initramfs: * glibc or musl * shell (bash, dash, busybox). Some features are only supported with bash. * udev or eudev * systemd is an optional (not required) dependency == Minimal versions of important dependencies in test containers [cols="1,1"] |=== |udev/systemd (debian 12) | 252 |linux-kernel (debian 12) | 6.1 |bash (debian 12) | 5.2 |eudev (alpine/void) | 3.2.14 |busybox (alpine) | 1.37 |qemu (debian 12) | 7.2 |=== dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/contributing.adoc000066400000000000000000000025741474727335100305320ustar00rootroot00000000000000= Contributing We welcome contributions from everyone. However, please follow the following guidelines when posting a GitHub Pull Request or filing a GitHub Issue on the dracut project: By participating in this project, you agree to abide by the xref:developer/code_of_conduct.adoc[]. == Filing Issues We use GitHub Issues exclusively for tracking bugs and feature requests of dracut. We only track bugs in the two most recently released versions of dracut in the GitHub Issue tracker. If you are using an older version of dracut, please contact your distribution's bug tracker instead (see below). See GitHub Release Page for the list of most recent releases. When filing an issue, specify the dracut version you are experiencing the issue with. Also, indicate which distribution you are using. Please include an explanation how to reproduce the issue you are pointing out. For more information on Coding Style and Commit messages see xref:developer/hacking.adoc[]. == Older or downstream versions For older or downstream versions that are still supported by your distribution please use respective downstream tracker: * https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=dracut[Debian] * https://bugzilla.redhat.com/buglist.cgi?quicksearch=dracut[Fedora] * https://bugs.gentoo.org/buglist.cgi?quicksearch=dracut[Gentoo] * https://bugzilla.opensuse.org/buglist.cgi?quicksearch=dracut[openSUSE] dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/cross_compiling.adoc000066400000000000000000000034551474727335100312140ustar00rootroot00000000000000= Cross Compliation Dracut supports running against a sysroot directory that is different from the actual root (/) directory of the running system. It is most useful for creating/bootstrapping a new system that may or may not be using the same CPU architecture as the host system, i.e. building a whole Linux system with a cross-compiler framework like Yocto. The user-visible frontend change is the introduction of a new option called "-r" or "--sysroot". It expects a directory that contains the complete Linux system that has all the files (kernel drivers, firmware, executables, libraries and others) necessary to construct the initramfs. E.g: dracut --sysroot /path/to/sysroot initramfs.img kernelversion To support this, a new global variable was introduced inside dracut. This variable is called "dracutsysrootdir" and all the files installed into the initramfs image is searched relative to the sysroot directory. This variable can also be set externally to dracut without using option -r/--sysroot. There are other details that are necessary to tweak to be able to run on cross-compiled (a.k.a. foreign) binaries. dracut uses these crucial utilities during its operation: == ldd It lists dynamic library dependencies for executables or libraries == ldconfig It creates /etc/ld.so.cache, i.e. the cached information about libraries known to the system. These utilities the way they exist on the host system only work on the host system. To support cross-compiled binaries, a different ldd variant is needed that works on those binaries. One such ldd script is found at https://gist.github.com/jerome-pouiller/c403786c1394f53f44a3b61214489e6f ldconfig in GLIBC as is does support a sysroot with its -r option. Extra environment variables needed to run dracut on the sysroot are documented in the dracut(8) man page. dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/hacking.adoc000066400000000000000000000113351474727335100274220ustar00rootroot00000000000000= Dracut Developer Guidelines Please make sure to follow our xref:developer/contributing.adoc[Contribution Guidelines]. == Source Currently dracut-ng lives on github.com. * https://github.com/dracut-ng/dracut-ng.git Pull requests should be filed in this project == Code Format It is recommended, that you install a plugin for your editor, which reads in `.editorconfig`. Additionally `emacs` and `vim` config files are provided for convenience. To reformat C files use `astyle`: [,console] ---- $ astyle --options=.astylerc ---- For convenience there is also a Makefile `indent-c` target `make indent-c`. To reformat shell files use `shfmt`: [,console] ---- $ shfmt_version=3.2.4 $ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt $ chmod u+x shfmt $ ./shfmt -w -s . ---- or [,console] ---- $ GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt $ $GOPATH/bin/shfmt -w -s . ---- or if `shfmt` is already in your `PATH`, use `make indent`. Some IDEs already have support for shfmt. For convenience the `make indent` Makefile target also calls shfmt, if it is in `$PATH`. == Commit Messages Commit messages should answer these questions: What?:: a short summary of what you changed in the subject line. Why?:: what the intended outcome of the change is (arguably the most important piece of information that should go into a message). How?:: if multiple approaches for achieving your goal were available, you also want to explain why you chose the used implementation strategy. Note that you should not explain how your change achieves your goal in your commit message. That should be obvious from the code itself. If you cannot achieve that clarity with the used programming language, use comments within the code instead. The commit message is primarily the place for documenting the why. Commit message titles should follow https://www.conventionalcommits.org/en/v1.0.0/[Conventional Commits]. Format is `[optional scope]: `, where `type` is one of: * *fix*: A bug fix * *feat*: A new feature * *perf*: A code change that improves performance * *refactor*: A code change that neither fixes a bug nor adds a feature * *style*: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) * *test*: Adding missing tests or correcting existing tests * *docs*: Documentation only changes * *revert*: Reverts a previous commit * *chore*: Other changes that don't modify src or test files * *build*: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) * *ci*: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) `scope` should be the module name (without numbers) or: * *cli*: for the dracut command line interface * *rt*: for the dracut initramfs runtime logic * *functions*: for general purpose dracut functions Commit messages are checked with https://github.com/tomtom-international/commisery[Commisery]. == Testsuite === In a container [,console] ---- $ cd $ test/test.sh [CONTAINER] [TESTS] ---- with `[CONTAINER]` being one of the https://github.com/orgs/dracut-ng/packages[github `dracut-ng` containers]. Default container is `fedora`. If the container supports arm64, and the test.sh script is run on an arm64 enviroment, the test would also run using an arm64 container. Run only specific test:: e.g. only runs the 10, 20 tests inside the default container. + [,console] ---- $ TESTS="10 11" test/test.sh ---- Run all tests on `ubuntu:rolling` in quiet mode (V=0):: {empty} + [,console] ---- $ V=0 test/test.sh ubuntu:rolling ---- Run test in verbose mode (enabled for GitHub Actions):: {empty} + [,console] ---- $ V=1 test/test.sh ---- Run test in extra verbose mode (enabled for debug logging):: {empty} + [,console] ---- $ V=2 test/test.sh ---- === On bare metal For the testsuite to pass, you will have to install at least the software packages mentioned in the `test/container` Dockerfiles. Run tests:: {empty} + [,console] ---- $ make clean check ---- Run only specific test:: e.g. only runs the 10, 11 tests. + [,console] ---- $ make TESTS="10 11" clean check ---- Debug a specific test case:: {empty} + [,console] ---- $ cd TEST-01-BASIC $ make clean setup run ---- Run the test without doing the setup:: _change some kernel parameters in `test.sh`_ + [,console] ---- $ make run ---- == Documentation To build the documentation site run `make doc_site`. This will be built and published by CI on commit. The documentation site is based on https://antora.org/[Antora]. By default it will build via `npx` (install `nodejs`) or if you have Antora installed in some other way, you can set `ANTORA_BIN`. dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/modules.adoc000066400000000000000000000135401474727335100274660ustar00rootroot00000000000000= Dracut Modules == Writing modules Some general rules for writing modules: * Use one of the inst family of functions to actually install files on to the initramfs. They handle mangling the pathnames and (for binaries, scripts, and kernel modules) installing dependencies as appropriate so you do not have to. * Scripts that end up on the initramfs should be POSIX compliant. dracut will try to use /bin/dash as /bin/sh for the initramfs if it is available, so you should install it on your system -- dash aims for strict POSIX compliance to the extent possible. * Hooks MUST be POSIX compliant -- they are sourced by the init script, and having a bashism break your user's ability to boot really sucks. * Generator modules should have a two digit numeric prefix -- they run in ascending sort order. Anything in the 90-99 range is stuff that dracut relies on, so try not to break those hooks. * Hooks must have a .sh extension. * Generator modules are described in more detail later on. * We have some breakpoints for debugging your hooks. If you pass `rdbreak` as a kernel parameter, the initramfs will drop to a shell just before switching to a new root. You can pass `rdbreak=hookpoint`, and the initramfs will break just before hooks in that hookpoint run. Also, there is an attempt to keep things as distribution-agnostic as possible. Every distribution has their own tool here and it's not something which is really interesting to have separate across them. So contributions to help decrease the distro-dependencies are welcome. === Module format Most of the functionality that dracut implements are actually implemented by dracut modules. dracut modules live in `modules.d`, and have the following structure: ---- dracut_install_dir/modules.d/ 00modname/ module-setup.sh ---- `00modname`:: The name of the module prefixed by a two-digit numeric sort code. + The numeric code must be present and in the range of 00 - 99. + NOTE: Range 50 - 59 is reserved for out of tree (3rd party) dracut modules. + Modules with lower numbers are installed first. This is important because the dracut install functions (which install files onto the initrd) refuse to overwrite already installed files. This makes it easy for an earlier module to override the functionality of a later module, so that you can have a distro or system specific module override or modify the functionality of a generic module without having to patch the more generic module. `module-setup.sh`:: dracut sources this script to install the functionality that a module implements onto the initrd. For the most part, this amounts to copying files from the host system onto the initrd in a controlled manner. ==== `module-setup.sh` function API `install()`:: This function of `module-setup.sh` is called to install all non-kernel files. + dracut supplies several install functions that are specialized for different file types. Browse through `dracut-functions` for more details. + dracut also provides a `$moddir` variable if you need to install a file from the module directory, such as an initrd hook, a udev rule, or a specialized executable. `installkernel()`:: This function of `module-setup.sh` is called to install all kernel related files. `check()`:: dracut calls this function to check and see if a module can be installed on the initrd. + When called without options, check should check to make sure that any files it needs to install into the initrd from the host system are present. It should exit with a `0` if they are, and a `1` if they are not. + When called with `$hostonly` set, it should perform the same check that it would without it set, and it should also check to see if the functionality the module implements is being used on the host system. + For example, if this module handles installing support for LUKS encrypted volumes, it should return `0` if all the tools to handle encrypted volumes are available and the host system has the root partition on an encrypted volume, `1` otherwise. `depends()`:: This function should output a list of dracut modules that it relies upon. + An example would be the nfs and iscsi modules, which rely on the network module to detect and configure network interfaces. Any other files in the module will not be touched by dracut directly. You are encouraged to provide a `README` that describes what the module is for. == Hooks init has the following hook points to inject scripts: `/lib/dracut/hooks/cmdline/*.sh`:: scripts for command line parsing `/lib/dracut/hooks/pre-udev/*.sh`:: scripts to run before udev is started `/lib/dracut/hooks/pre-trigger/*.sh`:: scripts to run before the main udev trigger is pulled `/lib/dracut/hooks/initqueue/*.sh`:: runs in parallel to the udev trigger + Udev events can add scripts here with `/sbin/initqueue`. + If `/sbin/initqueue` is called with the `--onetime` option, the script will be removed after it was run. + If `/lib/dracut/hooks/initqueue/work` is created and `udev >= 143` then this loop can process the jobs in parallel to the udevtrigger. + If the udev queue is empty and no root device is found or no root filesystem was mounted, the user will be dropped to a shell after a timeout. + Scripts can remove themselves from the initqueue by `rm $job`. `/lib/dracut/hooks/pre-mount/*.sh`:: scripts to run before the root filesystem is mounted + Network filesystems like NFS that do not use device files are an exception. Root can be mounted already at this point. `/lib/dracut/hooks/mount/*.sh`:: scripts to mount the root filesystem + If the udev queue is empty and no root device is found or no root filesystem was mounted, the user will be dropped to a shell after a timeout. `/lib/dracut/hooks/pre-pivot/*.sh`:: scripts to run before latter initramfs cleanups `/lib/dracut/hooks/cleanup/*.sh`:: scripts to run before the real init is executed and the initramfs disappears + All processes started before should be killed here. dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/release.adoc000066400000000000000000000007231474727335100274350ustar00rootroot00000000000000= Conducting A Successful Release This documents contains the necessary steps to conduct a successful release. . Run `tools/release.sh` shell script . Create a new release on github (https://github.com/dracut-ng/dracut-ng/releases/new) ** Add the section from `NEWS.md` to the release. . Open a new milestone, move all unfinished issue from the previous milestone to the new one and close the released milestone (https://github.com/dracut-ng/dracut-ng/milestones) dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/reviews.adoc000066400000000000000000000056351474727335100275100ustar00rootroot00000000000000= Review Guide How to give feedback and review distribution specific changes ? Most people using Dracut has some sort of preference or biast towards a specific Linux distribution. It is common for a contributor to only test a PR on one Linux distribution and not consider other distributions. *Reviewers and maintainers are expected to challenge PR's that are not distribution agonistic.* Expect longer discussions on those PRs. This however does not mean that distribution specific PRs are automatically rejected. The project has a long history of maintaining modules for specific https://github.com/dracut-ng/dracut-ng/tree/main/modules.d/45ifcfg[distributions], https://github.com/dracut-ng/dracut-ng/blob/main/modules.d/95znet/module-setup.sh#L6[architectures], https://github.com/dracut-ng/dracut-ng/blob/main/modules.d/80cms/module-setup.sh#L31[package managers] and https://github.com/dracut-ng/dracut-ng/blob/main/modules.d/90ppcmac/module-setup.sh#L3[HW configurations]. Do * *Consider the benefit of the PR* even if the PR is distribution specific ! Would the PR lead to a lot more people using Dracut/dracut module or the PR just benefits a handful of people? Remind yourself during the review that *more Dracut users will lead to eventually more Dracut testing and more Dracut PRs and higher quality software for _all_ Linux distributions* - including _your_ preferred distribution. This happens more often than you think and it tends to be underestimated during reviews. * *Consider the cost of the PR*. Is the PR in an isolated dracut module that can be simply removed later if maintenance is a problem or the PR is adding changes in core components all over the place that is not easy to remove later ? Is the code from the PR covered by tests that would significantly reduce the maintenance cost ? Can the PR changed in a way that reduces cost even if it stays distribution specific ? Don't * No need to guess or assume things that are outside of the scope of a given PR under review. The job is not to predict the future beyond the next release. Consider if the PR would be useful for the current release or not. Comments like "If we allow this PR, that when will we stop including similar PRs" or "we do not want this PR because of some future plans that are not yet agreed by the project" are not specific and confusing and just invites further comments that are not in scope for the PR. *We have a process where we consider each PR review in isolation.* If the PR improves code that is currently in the upstream tree, it should be strongly considered. * Do not consider if the PR is useful for you personally or not. Spend time understand the benefit and the cost. You are reviewing a PR that somebody spend time to prepare for the project that is over 10 years old used by millions of users with thousands of commits from about 300 contributors. *Try to make a decision based on data and not based on emotions.* If you need more data, just ask. dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/developer/security.adoc000066400000000000000000000007321474727335100276640ustar00rootroot00000000000000= Security Issues Security is very important to us. If you discover any issue regarding security, we'd appreciate a non-public disclosure of the information, so please disclose the information responsibly by sending an email to Harald Hoyer link:mailto:harald@profian.com[harald@profian.com] and not by creating a GitHub issue. We will respond swiftly to fix verifiable security issues with the disclosure being coordinated with distributions and relevant security teams. dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/index.adoc000066400000000000000000000226161474727335100251440ustar00rootroot00000000000000= dracut {mainversion} :author: Harald Hoyer :email: harald@profian.com :revnumber: {version} :language: bash dracut is a modular tool which generates an initial image capable of loading necessary drivers and performing other configuration during early Linux boot. == The early boot environment Most Linux distributions ship a single, generic kernel image that is intended to boot a wide variety of hardware. The device drivers for this generic kernel image are included as loadable modules, as it is not practical to statically compile them all into the one kernel without making it excessively large. However, this then raises the problem of detecting and loading the device driver modules necessary to mount the root file system at boot time (or, for that matter, deducing where or what the root file system is). To further complicate matters, the root file system may be on a software RAID volume, LVM, NFS (on diskless workstations), or on an encrypted partition. All of these require special preparations to mount. Another complication is kernel support for hibernation, which suspends the computer to disk by dumping an image of the entire system to a swap partition or a regular file, then powering off. On next boot, this image has to be made accessible before it can be loaded back into memory. To avoid having to hardcode many special cases into the kernel, an initial boot stage with a temporary root file system — now dubbed early user space — is used. This root file system contains user-space helpers that do the hardware detection, module loading and device discovery necessary to get the "real" root file system mounted, which the kernel then "pivots" onto to continue the boot process. An image of this initial root file system (along with the kernel image) must be stored somewhere accessible by the Linux bootloader or the boot firmware of the computer. This is usally partition on a local disk (a _boot partition_) or perhaps remotely via a TFTP server (on systems that can boot from Ethernet). The bootloader will load the kernel and initial root file system image into memory and then start the kernel, passing in the memory address of the image. == initrd and initramfs _initrd_ and _initramfs_ are two related but different methods of creating the early user space environment. Both achieve similar goals of allowing the kernel to find the main root device, but operate differently. In short, _initrd_ is a block device image, while an _initramfs_ is a link:https://en.wikipedia.org/wiki/Cpio[cpio] archive that the kernel extracts to a link:https://www.kernel.org/doc/html/v6.6/filesystems/tmpfs.html[temporary file system] created at boot. The difference is subtle but important to many of the internal operations of kernel initalization; for more details see link:https://kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt[kernel rootfs documentation]. While the _initrd_ approach is essentially obsolete, you may still see references to it; confusingly the terms are sometimes used interchangeably. dracut creates _initramfs_ archives. == dracut's approach dracut creates an initrd image by copying tools and files from an installed system and combining it with dracut modules, usually found on an installed system in `/usr/lib/dracut/modules.d`. Unlike other implementations, dracut hard-codes as little as possible into the initramfs. To keep the time required in the initramfs as little as possible, instead of scripts hard-coded to do various things, dracut depends on on `udev` to create device nodes. When the rootfs's device node is available, we mount and carry on. Most of the initramfs generation functionality in dracut is provided by generator modules that are sourced by the main dracut script to install specific functionality into the initramfs. They live in the `modules.d` subdirectory, and use functionality provided by dracut-functions to do their work. == Mount preparations dracut's initramfs starts only with the device name of the root file system (or its UUID) and must discover everything else at boot time. A complex cascade of tasks must be performed to get the root file system mounted: * Any hardware drivers that the boot process depends on must be loaded. All kernel modules for common storage devices are packed onto the initramfs and then udev pulls in modules matching the computer's detected hardware. * On systems which display a boot `rd.splash` screen, the video hardware must be initialized and a user-space helper started to paint animations onto the display in lockstep with the boot process. * If the root file system is on NFS, dracut does then: ** Bring up the primary network interface. ** Invoke a DHCP client, with which it can obtain a DHCP lease. ** Extract the name of the NFS share and the address of the NFS server from the lease. ** Mount the NFS share. * If the root file system appears to be on a software RAID device, there is no way of knowing which devices the RAID volume spans; the standard MD utilities must be invoked to scan all available block devices with a raid signature and bring the required ones online. * If the root file system appears to be on a logical volume, the LVM utilities must be invoked to scan for and activate the volume group containing it. * If the root file system is on an encrypted block device: ** Invoke a helper script to prompt the user to type in a passphrase and/or insert a hardware token (such as a smart card or a USB security dongle). * Create a decryption target with the device mapper. dracut uses link:https://en.wikipedia.org/wiki/Udev[udev], an event-driven hotplug agent, which invokes helper programs as hardware devices, disk partitions and storage volumes matching certain rules come online. This allows discovery to run in parallel, and to progressively cascade into arbitrary nestings of LVM, RAID or encryption to get at the root file system. When the root file system finally becomes visible: * Any maintenance tasks which cannot run on a mounted root file system are done. * The root file system is mounted read-only. * Any processes which must continue running (such as the `rd.splash` screen helper and its command FIFO) are hoisted into the newly-mounted root file system. The final root file system cannot simply be mounted over /, since that would make the scripts and tools on the initial root file system inaccessible for any final cleanup tasks. On an initramfs, the initial root file system cannot be rotated away. Instead, it is simply emptied and the final root file system mounted over the top. If the systemd module is used in the initramfs, the ordering of the services started looks like xref:man/dracut.bootup.7.adoc[]. == Host v Default mode Dracut can operate in two modes host-only mode:: dracut will generate a smaller customized initramfs image which contains only whatever is necessary to boot based on examining the running system. default mode:: dracut will generate a larger, but more generic, initramfs image. This is important for generic kernels, or if you are switching hardware for an installed system. == Dracut on shutdown On a systemd driven system, the dracut initramfs is also used for the shutdown procedure. See xref:man/dracut-shutdown.service.8.adoc[] for details. == Development Issues and merge requests can be found at the GitHub development page at link:https://github.com/dracut-ng//dracut-ng[] == History dracut (pronounced: /ˈdreɪkət/) was the initial brainchild born out of late night scheme of Farce Majeure, link:https://github.com/katzj[Jeremy Katz] and link:https://lwn.net/Articles/317874/[Dave Jones] who also did the initial implementation until link:https://github.com/haraldh[Harald Hoyer] took it under his care in 2009 and continued its development from there link:https://github.com/dracut-ng/dracut-ng/commit/9371dcaba3c58377428eee44bd702fae7b2ab20e[on]. The project link:https://github.com/dracut-ng/dracut-ng/commit/ec9315e56222d38fdbfca5f8e47f05c156ce4927[started] and was link:https://lkml.org/lkml/2008/12/17/318[announced] in 2008. Some people inside Red Hat started to name their projects after cities and villages around the developer headquarters of Red Hat in Westford, Massachusetts. So, dracut is named after the town link:https://www.google.com/maps/place/Dracut,+MA,+USA[Dracut], similar to link:https://www.google.com/maps/place/Wayland,+MA,+USA[Wayland] and link:https://www.google.com/maps/place/Weston,+MA,+USA[Weston]. == Presentations * link:https://blog.linuxplumbersconf.org/2009/slides/Harald-Hoyer-dracut.pdf[Plumbers 2009 slides] * link:http://laotzu.ftp.acc.umu.se/pub/debian-meetings/2010/fosdem10/high/Dracut_a_generic_modular_initramfs_generation_tool.ogv[Talk at FOSDEM 2010] == Resources === Manual pages Documentation is most in the form of manual pages for the various dracut components. ==== User Manual Pages * xref:man/dracut.8.adoc[] * xref:man/dracut.conf.5.adoc[] * xref:man/dracut.cmdline.7.adoc[] * xref:man/lsinitrd.1.adoc[] ==== Developer Manual Pages * xref:man/dracut.modules.7.adoc[] * xref:man/dracut.bootup.7.adoc[] == License dracut is licensed under the GNU General Public License (GPL) v2; see link:https://github.com/dracut-ng/dracut-ng/blob/main/COPYING[COPYING] Parts of this documentation site are taken from work licensed under the Creative Commons Attribution/Share-Alike License. To view a copy of this license, visit link:http://creativecommons.org/licenses/by-sa/3.0/[] or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/modules/000077500000000000000000000000001474727335100246465ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/modules/core.adoc000066400000000000000000000115071474727335100264320ustar00rootroot00000000000000= Core dracut modules The organization and categories of dracut modules below are only meant for gaining better understanding of what each module does. In the dracut source code, there are no specific types or categories for dracut modules. * shell * library (usually included by other dracut modules as a dependency and not directly by user) * filesystems (kernel module and corresponding user-space utilities for a filesystem) * device (kernel module and corresponding user space utilities for a device). * kernel (only kernel modules, no user-space utilities) * utils (no kernel module, only user-space utilities) * meta (only for making decision which other modules to include) == core |=== | Module | Description | Type | base | Base module with required utilities | library | bash | https://repology.org/project/bash[bash] (bash is preferred interpreter if there more of them available) | shell | biosdevname | BIOS network device renaming | utils | btrfs | https://docs.kernel.org/filesystems/btrfs.html[btrfs] | filesystem | busybox | https://repology.org/project/busybox/[busybox] | shell | caps | drop capabilities before init | | convertfs | Merges / into /usr on next boot | | crypt | encrypted https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup[LUKS] filesystems and https://repology.org/project/cryptsetup[cryptsetup] | filesystem | crypt-gpg | https://repology.org/project/gnupg[GPG] for crypto operations and SmartCards (may requires GPG keys) | | crypt-loop | encrypted loopback devices (symmetric key) | | dash | https://repology.org/project/dash-shell/[dash] | shell | debug | debug features | | dm | device-mapper | library | dmraid | DMRAID arrays | | dmsquash-live | SquashFS images | | dmsquash-live-autooverlay | creates a partition for overlayfs usage in the free space on the root filesystem's parent block device | | dmsquash-live-ntfs | SquashFS images located in NTFS filesystems | | drm | kernel modules for https://docs.kernel.org/gpu/introduction.html[DRM] (complex graphics devices) | kernel | ecryptfs | kernel module for https://docs.kernel.org/filesystems/ecryptfs.html[ecryptfs] (stacked cryptographic filesystem) | filesystem | fips | Enforces FIPS security standard regulations | | fips-crypto-policies | crypto-policies | utils | fs-lib | filesystem tools (including fsck.* and mount) | library | fstab-sys | Arranges for arbitrary partitions to be mounted before rootfs | | hwdb | Includes hardware database | utils | i18n | Includes keymaps, console fonts, etc. | | img-lib | Includes various tools for decompressing images | library | integrity | Extended Verification Module and https://repology.org/project/ima-evm-utils[ima-evm-utils] | | kernel-modules | kernel modules for root filesystems and other boot-time devices | kernel | kernel-modules-extra | extra out-of-tree kernel modules | kernel | lvm | LVM devices | | masterkey | masterkey that can be used to decrypt other keys and https://repology.org/project/keyutils/[keyutils] | | mdraid | kernel module for https://docs.kernel.org/driver-api/md/md-cluster.html[md raid cluster], https://repology.org/project/mdadm[mdadm] | device | modsign | kernel module for https://docs.kernel.org/admin-guide/module-signing.html[signing], https://repology.org/project/keyutils/[keyutils] | | multipath | multipath devices | device | nvdimm | non-volatile DIMM devices | device | numlock | turn Num Lock on | device | overlayfs | kernel module for https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html[overlayfs] | filesystem | ppcmac | thermal for PowerPC | device | qemu | kernel modules to boot inside https://repology.org/project/qemu/[qemu] | kernel | lunmask | Masks LUN devices to select only ones which required to boot | | plymouth | show splash via https://repology.org/project/plymouth/[plymouth] | utils | pollcdrom | polls CD-ROM | | rescue | utilities for rescue mode (such as ping, ssh, vi, fsck.*) | utils | resume | resume from low-power state | | rootfs-block | mount block device as rootfs | device | securityfs | mount securityfs early | filesystem | selinux | https://docs.kernel.org/admin-guide/LSM/SELinux.html[selinux] policy | | shutdown | Sets up hooks to run on shutdown | | syslog | Includes syslog capabilites | utils | terminfo | Includes a terminfo file | utils | udev-rules | Includes udev and some basic rules | library | uefi-lib | Includes UEFI tools | library | usrmount | mounts /usr | | virtfs | virtual filesystems (https://docs.kernel.org/filesystems/9p.html[9p]) | filesystem | virtiofs | https://docs.kernel.org/filesystems/virtiofs.html[virtiofs] | filesystem | warpclock | Sets kernel's timezone and reset the system time if adjtime is set to LOCAL | | watchdog | Includes watchdog devices management; works only if systemd not in use | | watchdog-modules | kernel modules for watchdog loaded early in booting | kernel |=== dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/modules/network.adoc000066400000000000000000000023201474727335100271640ustar00rootroot00000000000000= Network dracut modules * requires IP connectivity * works with and without systemd |=== | Module | Description | cifs | https://docs.kernel.org/admin-guide/cifs/index.html[CIFS], https://repology.org/project/cifs-utils[cifs-utils] | fcoe | Adds support for Fibre Channel over Ethernet (FCoE) | fcoe-uefi | Adds support for Fibre Channel over Ethernet (FCoE) in EFI mode | iscsi | Adds support for iSCSI devices | kernel-network-modules | Includes and loads kernel modules for network devices | livenet | Fetch live updates for SquashFS images | nbd | kernel module for https://docs.kernel.org/admin-guide/blockdev/nbd.html[Network Block Device], https://repology.org/project/nbd[nbd] | network | Virtual module for network service providers | network-legacy | Includes legacy networking tools support | nfs | kernel module for https://docs.kernel.org/admin-guide/nfs/index.html[NFS], https://repology.org/project/nfs-utils[nfs-utils] | nvmf | Adds support for NVMe over Fabrics devices | qemu-net | Includes network kernel modules for QEMU environment | ssh-client | Includes https://repology.org/project/openssh[ssh and scp] clients | url-lib | Includes https://repology.org/project/curl[curl] and SSL certs |=== dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/modules/s390.adoc000066400000000000000000000003121474727335100261700ustar00rootroot00000000000000= s390(x) dracut modules |=== | Module | Description | cio_ignore | | cms | mount z/VM CMS disks on s390 | dasd | | dasd_mod | | dcssblk | | zfcp | networking | zipl | | znet | networking |=== dracut-ng-dracut-ng-3e4cfdd/doc_site/modules/ROOT/pages/modules/systemd.adoc000066400000000000000000000072651474727335100272000ustar00rootroot00000000000000= Systemd dracut modules These modules would require including a version of systemd into initramfs. |=== | Module | Description | bluetooth | Includes bluetooth devices support | dbus | Virtual module for dbus-broker or dbus-daemon | dbus-broker | | dbus-daemon | | dracut-systemd | Base systemd dracut module | fido2 | | lvmmerge | Merges lvm snapshots | lvmthinpool-monitor | Monitor LVM thinpool service | memstrack | Includes memstrack for memory usage monitoring | pcsc | Adds support for PCSC Smart cards | pkcs11 | Includes PKCS#11 libraries | rngd | Starts random generator serive on early boot | squash | Squash meta module | squash-erofs | Builds EroFS initramfs | squash-lib | Library for building Squash initramfs | squash-squashfs | Builds SquashFS initramfs | systemd | Adds systemd as early init initialization system | systemd-ac-power | https://www.freedesktop.org/software/systemd/man/systemd-ac-power.html[systemd-ac-power] | systemd-ask-password | https://www.freedesktop.org/software/systemd/man/systemd-ask-password.html[systemd-ask-password] | systemd-coredump | https://www.freedesktop.org/software/systemd/man/systemd-coredump.html[systemd-coredump] | systemd-creds | https://www.freedesktop.org/software/systemd/man/systemd-creds.html[systemd-creds] | systemd-cyptsetup | https://www.freedesktop.org/software/systemd/man/latest/systemd-cryptsetup@.service.html[systemd-cyptsetup] | systemd-hostnamed | https://www.freedesktop.org/software/systemd/man/systemd-hostnamed.html[systemd-hostnamed] | systemd-initrd | https://systemd.io/INITRD_INTERFACE/[INITRD_INTERFACE] | systemd-integritysetup | https://www.freedesktop.org/software/systemd/man/systemd-integritysetup.html[systemd-integritysetup] | systemd-journald | https://www.freedesktop.org/software/systemd/man/systemd-journald.html[systemd-journald] | systemd-ldconfig | | systemd-modules-load | https://www.freedesktop.org/software/systemd/man/systemd-modules-load.html[systemd-modules-load] | systemd-pcrphase | https://www.freedesktop.org/software/systemd/man/systemd-pcrphase.html[systemd-pcrphase] | systemd-portabled | https://www.freedesktop.org/software/systemd/man/systemd-portabled.html[systemd-portabled] | systemd-pstore | https://www.freedesktop.org/software/systemd/man/systemd-pstore.html[systemd-pstore] | systemd-repart | https://www.freedesktop.org/software/systemd/man/systemd-repart.html[systemd-repart] | systemd-resolved | https://www.freedesktop.org/software/systemd/man/systemd-resolved.html[systemd-resolved] | systemd-sysctl | https://www.freedesktop.org/software/systemd/man/systemd-sysctl.html[systemd-sysctl] | systemd-sysext | https://www.freedesktop.org/software/systemd/man/systemd-sysext.html[systemd-sysext] | systemd-sysusers | https://www.freedesktop.org/software/systemd/man/systemd-sysusers.html[systemd-sysusers] | systemd-timedated | https://www.freedesktop.org/software/systemd/man/systemd-timedated.html[systemd-timedated] | systemd-timesyncd | https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.html[systemd-timesyncd] | systemd-tmpfiles | https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html[systemd-tmpfiles] | systemd-udevd | https://www.freedesktop.org/software/systemd/man/systemd-udevd.html[systemd-udevd] | systemd-veritysetup | https://www.freedesktop.org/software/systemd/man/systemd-veritysetup.html[systemd-veritysetup] | tpm2-tss | Adds support for TPM2 devices |=== == systemd network |=== | Module | Description | systemd-network-management | Adds network management for systemd | systemd-networkd | | connman | https://repology.org/project/connman[connman] | network-manager | https://repology.org/project/networkmanager[NetworkManager] |=== dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/000077500000000000000000000000001474727335100227705ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/css/000077500000000000000000000000001474727335100235605ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/css/dracut.css000066400000000000000000000001631474727335100255540ustar00rootroot00000000000000.navbar { background: #336699; } .doc h1, .doc h2, .doc h3, .doc h4, .doc h5, .doc h6 { color: #336699; } dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/images/000077500000000000000000000000001474727335100242355ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/images/dracut.svg000066400000000000000000002105311474727335100262420ustar00rootroot00000000000000 image/svg+xml dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/partials/000077500000000000000000000000001474727335100246075ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/partials/footer-content.hbs000066400000000000000000000003541474727335100302550ustar00rootroot00000000000000
Made with ❤️ by the dracut community
This site is built with Antora.
dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/partials/head-styles.hbs000066400000000000000000000001761474727335100275330ustar00rootroot00000000000000 dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/partials/header-content.hbs000066400000000000000000000027741474727335100302170ustar00rootroot00000000000000
dracut-ng-dracut-ng-3e4cfdd/doc_site/supplemental-ui/ui.yml000066400000000000000000000000731474727335100241300ustar00rootroot00000000000000--- static_files: - images/dracut.svg - css/dracut.css dracut-ng-dracut-ng-3e4cfdd/dracut-catimages.sh000077500000000000000000000071021474727335100216270ustar00rootroot00000000000000#!/bin/bash --norc # # Copyright 2009 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # dinfo() { [[ $beverbose ]] && echo "$@" >&2 } derror() { echo "Error: $*" >&2 } usage() { # 80x25 linebreak here ^ cat << EOF Usage: $0 [OPTION]... [...] Creates initial ramdisk image by concatenating several images from the command line and /boot/dracut/ -f, --force Overwrite existing initramfs file. -i, --imagedir Directory with additional images to add (default: /boot/dracut/) -o, --overlaydir Overlay directory, which contains files that will be used to create an additional image --nooverlay Do not use the overlay directory --noimagedir Do not use the additional image directory -h, --help This message --debug Output debug information of the build process -v, --verbose Verbose output during the build process EOF } imagedir=/boot/dracut/ overlay=/var/lib/dracut/overlay while (($# > 0)); do case $1 in -f | --force) force=yes ;; -i | --imagedir) imagedir=$2 shift ;; -o | --overlaydir) overlay=$2 shift ;; --nooverlay) no_overlay=yes shift ;; --noimagedir) no_imagedir=yes shift ;; -h | --help) usage exit 1 ;; --debug) export debug="yes" ;; -v | --verbose) beverbose="yes" ;; -*) printf "\nUnknown option: %s\n\n" "$1" >&2 usage exit 1 ;; *) break ;; esac shift done outfile=$1 shift if [[ -z $outfile ]]; then derror "No output file specified." usage exit 1 fi baseimage=$1 shift if [[ -z $baseimage ]]; then derror "No base image specified." usage exit 1 fi if [[ -f $outfile && ! $force ]]; then derror "Will not override existing initramfs ($outfile) without --force" exit 1 fi if [[ ! $no_imagedir && ! -d $imagedir ]]; then derror "Image directory $overlay is not a directory" exit 1 fi if [[ ! $no_overlay && ! -d $overlay ]]; then derror "Overlay $overlay is not a directory" exit 1 fi if [[ ! $no_overlay ]]; then ofile="$imagedir/90-overlay.img" dinfo "Creating image $ofile from directory $overlay" type pigz &> /dev/null && gzip=pigz || gzip=gzip ( cd "$overlay" || return 1 find . | cpio --quiet -H newc -o | $gzip -9 > "$ofile" ) fi if [[ ! $no_imagedir ]]; then for i in "$imagedir/"*.img; do [[ -f $i ]] && images+=("$i") done fi images+=("$@") dinfo "Using base image $baseimage" cat -- "$baseimage" > "$outfile" for i in "${images[@]}"; do dinfo "Appending $i" cat -- "$i" >> "$outfile" done dinfo "Created $outfile" exit 0 dracut-ng-dracut-ng-3e4cfdd/dracut-functions.sh000077500000000000000000000752641474727335100217200ustar00rootroot00000000000000#!/bin/bash # # functions used by dracut and other tools. # # Copyright 2005-2009 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # export LC_MESSAGES=C # is_func # Check whether $1 is a function. is_func() { [[ "$(type -t "$1")" == "function" ]] } # Generic substring function. If $2 is in $1, return 0. strstr() { [[ $1 == *"$2"* ]]; } # Generic glob matching function. If glob pattern $2 matches anywhere in $1, OK strglobin() { [[ $1 == *$2* ]]; } # Generic glob matching function. If glob pattern $2 matches all of $1, OK # shellcheck disable=SC2053 strglob() { [[ $1 == $2 ]]; } # returns OK if $1 contains literal string $2 at the beginning, and isn't empty str_starts() { [ "${1#"$2"*}" != "$1" ]; } # returns OK if $1 contains literal string $2 at the end, and isn't empty str_ends() { [ "${1%*"$2"}" != "$1" ]; } trim() { local var="$*" var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters printf "%s" "$var" } # find a binary. If we were not passed the full path directly, # search in the usual places to find the binary. find_binary() { local _delim local _path local l local p [[ -z ${1##/*} ]] || _delim="/" if [[ $1 == *.so* ]]; then for l in $libdirs; do _path="${l}${_delim}${1}" if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &> /dev/null; }; then printf "%s\n" "${_path}" return 0 fi done _path="${_delim}${1}" if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &> /dev/null; }; then printf "%s\n" "${_path}" return 0 fi fi if [[ $1 == */* ]]; then _path="${_delim}${1}" if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then printf "%s\n" "${_path}" return 0 fi fi for p in $DRACUT_PATH; do _path="${p}${_delim}${1}" if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then printf "%s\n" "${_path}" return 0 fi done [[ -n $dracutsysrootdir ]] && return 1 type -P "${1##*/}" } ldconfig_paths() { $DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2> /dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq } # Version comparison function. Assumes Linux style version scheme. # $1 = version a # $2 = comparison op (gt, ge, eq, le, lt, ne) # $3 = version b vercmp() { local _n1 read -r -a _n1 <<< "${1//./ }" local _op=$2 local _n2 read -r -a _n2 <<< "${3//./ }" local _i _res for ((_i = 0; ; _i++)); do if [[ ! ${_n1[_i]}${_n2[_i]} ]]; then _res=0 elif ((${_n1[_i]:-0} > ${_n2[_i]:-0})); then _res=1 elif ((${_n1[_i]:-0} < ${_n2[_i]:-0})); then _res=2 else continue fi break done case $_op in gt) ((_res == 1)) ;; ge) ((_res != 2)) ;; eq) ((_res == 0)) ;; le) ((_res != 1)) ;; lt) ((_res == 2)) ;; ne) ((_res != 0)) ;; esac } # Create all subdirectories for given path without creating the last element. # $1 = path mksubdirs() { # shellcheck disable=SC2174 [[ -e ${1%/*} ]] || mkdir -m 0755 -p -- "${1%/*}" } # Function prints global variables in format name=value line by line. # $@ = list of global variables' name print_vars() { local _var _value for _var in "$@"; do eval printf -v _value "%s" \""\$$_var"\" [[ ${_value} ]] && printf '%s="%s"\n' "$_var" "$_value" done } # normalize_path # Prints the normalized path, where it removes any duplicated # and trailing slashes. # Example: # $ normalize_path ///test/test// # /test/test normalize_path() { # shellcheck disable=SC2064 trap "$(shopt -p extglob)" RETURN shopt -q -s extglob local p=${1//+(\/)//} printf "%s\n" "${p%/}" } # convert_abs_rel # Prints the relative path, when creating a symlink to from . # Example: # $ convert_abs_rel /usr/bin/test /bin/test-2 # ../../bin/test-2 # $ ln -s $(convert_abs_rel /usr/bin/test /bin/test-2) /usr/bin/test convert_abs_rel() { local __current __absolute __abssize __cursize __newpath local -i __i __level set -- "$(normalize_path "$1")" "$(normalize_path "$2")" # corner case #1 - self looping link [[ $1 == "$2" ]] && { printf "%s\n" "${1##*/}" return } # corner case #2 - own dir link [[ ${1%/*} == "$2" ]] && { printf ".\n" return } IFS=/ read -r -a __current <<< "$1" IFS=/ read -r -a __absolute <<< "$2" __abssize=${#__absolute[@]} __cursize=${#__current[@]} while [[ ${__absolute[__level]} == "${__current[__level]}" ]]; do ((__level++)) if ((__level > __abssize || __level > __cursize)); then break fi done for ((__i = __level; __i < __cursize - 1; __i++)); do if ((__i > __level)); then __newpath=$__newpath"/" fi __newpath=$__newpath".." done for ((__i = __level; __i < __abssize; __i++)); do if [[ -n $__newpath ]]; then __newpath=$__newpath"/" fi __newpath=$__newpath${__absolute[__i]} done printf -- "%s\n" "$__newpath" } # get_fs_env # Get and the ID_FS_TYPE variable from udev for a device. # Example: # $ get_fs_env /dev/sda2 # ext4 get_fs_env() { [[ $1 ]] || return unset ID_FS_TYPE ID_FS_TYPE=$(blkid -u filesystem -o export -- "$1" \ | while read -r line || [ -n "$line" ]; do if [[ $line == "TYPE="* ]]; then printf "%s" "${line#TYPE=}" exit 0 fi done) if [[ $ID_FS_TYPE ]]; then printf "%s" "$ID_FS_TYPE" return 0 fi return 1 } # get_maj_min # Prints the major and minor of a device node. # Example: # $ get_maj_min /dev/sda2 # 8:2 get_maj_min() { local _majmin local _out if [[ $get_maj_min_cache_file ]]; then _out="$(grep -m1 -oE "^${1//\\/\\\\} \S+$" "$get_maj_min_cache_file" | grep -oE "\S+$")" fi if ! [[ "$_out" ]]; then _majmin="$(stat -L -c '%t:%T' "$1" 2> /dev/null)" _out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")" if [[ $get_maj_min_cache_file ]]; then echo "$1 $_out" >> "$get_maj_min_cache_file" fi fi echo -n "$_out" } # get_devpath_block # get the DEVPATH in /sys of a block device get_devpath_block() { local _majmin _i _majmin=$(get_maj_min "$1") for _i in /sys/block/*/dev /sys/block/*/*/dev; do [[ -e $_i ]] || continue if [[ $_majmin == "$(< "$_i")" ]]; then printf "%s" "${_i%/dev}" return 0 fi done return 1 } # get a persistent path from a device get_persistent_dev() { local i _tmp _dev _pol _dev=$(get_maj_min "$1") [ -z "$_dev" ] && return if [[ -n $persistent_policy ]]; then _pol="/dev/disk/${persistent_policy}/*" else _pol= fi for i in \ $_pol \ /dev/mapper/* \ /dev/disk/by-uuid/* \ /dev/disk/by-label/* \ /dev/disk/by-partuuid/* \ /dev/disk/by-partlabel/* \ /dev/disk/by-id/* \ /dev/disk/by-path/*; do [[ -b $i ]] || continue [[ $i == /dev/mapper/mpath* ]] && continue _tmp=$(get_maj_min "$i") if [ "$_tmp" = "$_dev" ]; then printf -- "%s" "$i" return fi done printf -- "%s" "$1" } expand_persistent_dev() { local _dev=$1 case "$_dev" in LABEL=*) _dev="/dev/disk/by-label/${_dev#LABEL=}" ;; UUID=*) _dev="${_dev#UUID=}" _dev="${_dev,,}" _dev="/dev/disk/by-uuid/${_dev}" ;; PARTUUID=*) _dev="${_dev#PARTUUID=}" _dev="${_dev,,}" _dev="/dev/disk/by-partuuid/${_dev}" ;; PARTLABEL=*) _dev="/dev/disk/by-partlabel/${_dev#PARTLABEL=}" ;; esac printf "%s" "$_dev" } shorten_persistent_dev() { local _dev="$1" case "$_dev" in /dev/disk/by-uuid/*) printf "%s" "UUID=${_dev##*/}" ;; /dev/disk/by-label/*) printf "%s" "LABEL=${_dev##*/}" ;; /dev/disk/by-partuuid/*) printf "%s" "PARTUUID=${_dev##*/}" ;; /dev/disk/by-partlabel/*) printf "%s" "PARTLABEL=${_dev##*/}" ;; *) printf "%s" "$_dev" ;; esac } # find_block_device # Prints the major and minor number of the block device # for a given mountpoint. # Unless $use_fstab is set to "yes" the functions # uses /proc/self/mountinfo as the primary source of the # information and only falls back to /etc/fstab, if the mountpoint # is not found there. # Example: # $ find_block_device /usr # 8:4 find_block_device() { local _dev _majmin _find_mpt _find_mpt="$1" if [[ $use_fstab != yes ]]; then [[ -d $_find_mpt/. ]] findmnt -e -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | { while read -r _majmin _dev || [ -n "$_dev" ]; do if [[ -b $_dev ]]; then if ! [[ $_majmin ]] || [[ $_majmin == 0:* ]]; then _majmin=$(get_maj_min "$_dev") fi if [[ $_majmin ]]; then printf "%s\n" "$_majmin" else printf "%s\n" "$_dev" fi return 0 fi if [[ $_dev == *:* ]]; then printf "%s\n" "$_dev" return 0 fi done return 1 } && return 0 fi # fall back to /etc/fstab [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1 findmnt -e --fstab -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | { while read -r _majmin _dev || [ -n "$_dev" ]; do if ! [[ $_dev ]]; then _dev="$_majmin" unset _majmin fi if [[ -b $_dev ]]; then [[ $_majmin ]] || _majmin=$(get_maj_min "$_dev") if [[ $_majmin ]]; then printf "%s\n" "$_majmin" else printf "%s\n" "$_dev" fi return 0 fi if [[ $_dev == *:* ]]; then printf "%s\n" "$_dev" return 0 fi done return 1 } && return 0 return 1 } # find_mp_fstype # Echo the filesystem type for a given mountpoint. # /proc/self/mountinfo is taken as the primary source of information # and /etc/fstab is used as a fallback. # No newline is appended! # Example: # $ find_mp_fstype /;echo # ext4 find_mp_fstype() { local _fs if [[ $use_fstab != yes ]]; then findmnt -e -v -n -o 'FSTYPE' --target "$1" | { while read -r _fs || [ -n "$_fs" ]; do [[ $_fs ]] || continue [[ $_fs == "autofs" ]] && continue printf "%s" "$_fs" return 0 done return 1 } && return 0 fi [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1 findmnt --fstab -e -v -n -o 'FSTYPE' --target "$1" | { while read -r _fs || [ -n "$_fs" ]; do [[ $_fs ]] || continue [[ $_fs == "autofs" ]] && continue printf "%s" "$_fs" return 0 done return 1 } && return 0 return 1 } # find_dev_fstype # Echo the filesystem type for a given device. # /proc/self/mountinfo is taken as the primary source of information # and /etc/fstab is used as a fallback. # No newline is appended! # Example: # $ find_dev_fstype /dev/sda2;echo # ext4 find_dev_fstype() { local _find_dev _fs _find_dev="$1" if ! [[ $_find_dev == /dev* ]]; then [[ -b "/dev/block/$_find_dev" ]] && _find_dev="/dev/block/$_find_dev" fi if [[ $use_fstab != yes ]]; then findmnt -e -v -n -o 'FSTYPE' --source "$_find_dev" | { while read -r _fs || [ -n "$_fs" ]; do [[ $_fs ]] || continue [[ $_fs == "autofs" ]] && continue printf "%s" "$_fs" return 0 done return 1 } && return 0 fi [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1 findmnt --fstab -e -v -n -o 'FSTYPE' --source "$_find_dev" | { while read -r _fs || [ -n "$_fs" ]; do [[ $_fs ]] || continue [[ $_fs == "autofs" ]] && continue printf "%s" "$_fs" return 0 done return 1 } && return 0 return 1 } # find_mp_fsopts # Echo the filesystem options for a given mountpoint. # /proc/self/mountinfo is taken as the primary source of information # and /etc/fstab is used as a fallback. # No newline is appended! # Example: # $ find_mp_fsopts /;echo # rw,relatime,discard,data=ordered find_mp_fsopts() { if [[ $use_fstab != yes ]]; then findmnt -e -v -n -o 'OPTIONS' --target "$1" 2> /dev/null && return 0 fi [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1 findmnt --fstab -e -v -n -o 'OPTIONS' --target "$1" } # find_dev_fsopts # Echo the filesystem options for a given device. # /proc/self/mountinfo is taken as the primary source of information # and /etc/fstab is used as a fallback. # if `use_fstab == yes`, then only `/etc/fstab` is used. # # Example: # $ find_dev_fsopts /dev/sda2 # rw,relatime,discard,data=ordered find_dev_fsopts() { local _find_dev _find_dev="$1" if ! [[ $_find_dev == /dev* ]]; then [[ -b "/dev/block/$_find_dev" ]] && _find_dev="/dev/block/$_find_dev" fi if [[ $use_fstab != yes ]]; then findmnt -e -v -n -o 'OPTIONS' --source "$_find_dev" 2> /dev/null && return 0 fi [[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1 findmnt --fstab -e -v -n -o 'OPTIONS' --source "$_find_dev" } # finds the major:minor of the block device backing the root filesystem. find_root_block_device() { find_block_device /; } # for_each_host_dev_fs # Execute " " for every " " pair found # in ${host_fs_types[@]} for_each_host_dev_fs() { local _func="$1" local _dev local _ret=1 [[ "${#host_fs_types[@]}" ]] || return 2 for _dev in "${!host_fs_types[@]}"; do $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0 done return $_ret } host_fs_all() { printf "%s\n" "${host_fs_types[@]}" } # Walk all the slave relationships for a given block device. # Stop when our helper function returns success # $1 = function to call on every found block device # $2 = block device in major:minor format check_block_and_slaves() { local _x [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. if ! lvm_internal_dev "$2"; then "$1" "$2" && return; fi check_vol_slaves "$@" && return 0 if [[ -f /sys/dev/block/$2/../dev ]] && [[ /sys/dev/block/$2/../subsystem -ef /sys/class/block ]]; then check_block_and_slaves "$1" "$(< "/sys/dev/block/$2/../dev")" && return 0 fi for _x in /sys/dev/block/"$2"/slaves/*; do [[ -f $_x/dev ]] || continue [[ $_x/subsystem -ef /sys/class/block ]] || continue check_block_and_slaves "$1" "$(< "$_x/dev")" && return 0 done return 1 } check_block_and_slaves_all() { local _x _ret=1 [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. if ! lvm_internal_dev "$2" && "$1" "$2"; then _ret=0 fi check_vol_slaves_all "$@" && return 0 if [[ -f /sys/dev/block/$2/../dev ]] && [[ /sys/dev/block/$2/../subsystem -ef /sys/class/block ]]; then check_block_and_slaves_all "$1" "$(< "/sys/dev/block/$2/../dev")" && _ret=0 fi for _x in /sys/dev/block/"$2"/slaves/*; do [[ -f $_x/dev ]] || continue [[ $_x/subsystem -ef /sys/class/block ]] || continue check_block_and_slaves_all "$1" "$(< "$_x/dev")" && _ret=0 done return $_ret } # for_each_host_dev_and_slaves # Execute " " for every "" found # in ${host_devs[@]} and their slaves for_each_host_dev_and_slaves_all() { local _func="$1" local _dev local _ret=1 [[ "${host_devs[*]}" ]] || [[ "${user_devs[*]}" ]] || return 2 for _dev in "${host_devs[@]}" "${user_devs[@]}"; do [[ -b $_dev ]] || continue if check_block_and_slaves_all "$_func" "$(get_maj_min "$_dev")"; then _ret=0 fi done return $_ret } for_each_host_dev_and_slaves() { local _func="$1" local _dev [[ "${host_devs[*]}" ]] || [[ "${user_devs[*]}" ]] || return 2 for _dev in "${host_devs[@]}" "${user_devs[@]}"; do [[ -b $_dev ]] || continue check_block_and_slaves "$_func" "$(get_maj_min "$_dev")" && return 0 done return 1 } # /sys/dev/block/major:minor is symbol link to real hardware device # go downstream $(realpath /sys/dev/block/major:minor) to detect driver get_blockdev_drv_through_sys() { local _block_mods="" local _path _path=$(realpath "$1") while true; do if [[ -L "$_path"/driver/module ]]; then _mod=$(realpath "$_path"/driver/module) _mod=$(basename "$_mod") _block_mods="$_block_mods $_mod" fi _path=$(dirname "$_path") if [[ $_path == '/sys/devices' ]] || [[ $_path == '/' ]]; then break fi done echo "$_block_mods" } # get_lvm_dm_dev # If $1 is an LVM device-mapper device, return the path to its dm directory get_lvm_dm_dev() { local _majmin _dm _majmin="$1" _dm=/sys/dev/block/$_majmin/dm [[ ! -f $_dm/uuid || $(< "$_dm"/uuid) != LVM-* ]] && return 1 printf "%s" "$_dm" } # ugly workaround for the lvm design # There is no volume group device, # so, there are no slave devices for volume groups. # Logical volumes only have the slave devices they really live on, # but you cannot create the logical volume without the volume group. # And the volume group might be bigger than the devices the LV needs. check_vol_slaves() { local _vg _pv _majmin _dm _majmin="$2" _dm=$(get_lvm_dm_dev "$_majmin") [[ -z $_dm ]] && return 1 # not an LVM device-mapper device _vg=$(dmsetup splitname --noheadings -o vg_name "$(< "$_dm/name")") # strip space _vg="${_vg//[[:space:]]/}" if [[ $_vg ]]; then for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2> /dev/null); do check_block_and_slaves "$1" "$(get_maj_min "$_pv")" && return 0 done fi return 1 } check_vol_slaves_all() { local _vg _pv _majmin _dm _majmin="$2" _dm=$(get_lvm_dm_dev "$_majmin") [[ -z $_dm ]] && return 1 # not an LVM device-mapper device _vg=$(dmsetup splitname --noheadings -o vg_name "$(< "$_dm/name")") # strip space _vg="${_vg//[[:space:]]/}" if [[ $_vg ]]; then # when filter/global_filter is set, lvm may be failed if ! lvm lvs --noheadings -o vg_name "$_vg" 2> /dev/null 1> /dev/null; then return 1 fi for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2> /dev/null); do check_block_and_slaves_all "$1" "$(get_maj_min "$_pv")" done return 0 fi return 1 } # fs_get_option # search for a specific option in a bunch of filesystem options # and return the value fs_get_option() { local _fsopts=$1 local _option=$2 local OLDIFS="$IFS" IFS=, # shellcheck disable=SC2086 set -- $_fsopts IFS="$OLDIFS" while [ $# -gt 0 ]; do case $1 in $_option=*) echo "${1#"${_option}"=}" break ;; esac shift done } check_kernel_config() { local _config_opt="$1" local _config_file # If $no_kernel is set, $kernel will point to the running kernel. # Avoid reading the current kernel config by mistake. [[ $no_kernel == yes ]] && return 0 local _config_paths=( "/lib/modules/$kernel/config" "/lib/modules/$kernel/build/.config" "/lib/modules/$kernel/source/.config" "/usr/src/linux-$kernel/.config" "/boot/config-$kernel" ) for _config in "${_config_paths[@]}"; do if [[ -f $dracutsysrootdir$_config ]]; then _config_file="$_config" break fi done # no kernel config file, so return true [[ $_config_file ]] || return 0 grep -q "^${_config_opt}=" "$dracutsysrootdir$_config_file" return $? } # 0 if the kernel module is either built-in or available # 1 if the kernel module is not enabled check_kernel_module() { modprobe -d "$drivers_dir/../../../" -S "$kernel" --dry-run "$1" &> /dev/null || return 1 } # get_cpu_vendor # Only two values are returned: AMD or Intel get_cpu_vendor() { if grep -qE AMD /proc/cpuinfo; then printf "AMD" fi if grep -qE Intel /proc/cpuinfo; then printf "Intel" fi } # get_host_ucode # Get the hosts' ucode file based on the /proc/cpuinfo get_ucode_file() { local family local model local stepping family=$(grep -E "cpu family" /proc/cpuinfo | head -1 | sed "s/.*:\ //") model=$(grep -E "model" /proc/cpuinfo | grep -v name | head -1 | sed "s/.*:\ //") stepping=$(grep -E "stepping" /proc/cpuinfo | head -1 | sed "s/.*:\ //") if [[ "$(get_cpu_vendor)" == "AMD" ]]; then if [[ $family -ge 21 ]]; then printf "microcode_amd_fam%xh.bin" "$family" else printf "microcode_amd.bin" fi fi if [[ "$(get_cpu_vendor)" == "Intel" ]]; then # The /proc/cpuinfo are in decimal. printf "%02x-%02x-%02x" "${family}" "${model}" "${stepping}" fi } # Not every device in /dev/mapper should be examined. # If it is an LVM device, touch only devices which have /dev/VG/LV symlink. lvm_internal_dev() { local _majmin _dm _majmin="$1" _dm=$(get_lvm_dm_dev "$_majmin") [[ -z $_dm ]] && return 1 # not an LVM device-mapper device local DM_VG_NAME DM_LV_NAME DM_LV_LAYER eval "$(dmsetup splitname --nameprefixes --noheadings --rows "$(< "$_dm/name")" 2> /dev/null)" [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 0 # Better skip this! [[ ${DM_LV_LAYER} ]] || [[ ! -L /dev/${DM_VG_NAME}/${DM_LV_NAME} ]] } btrfs_devs() { local _mp="$1" btrfs device usage "$_mp" \ | while read -r _dev _; do str_starts "$_dev" "/" || continue _dev=${_dev%,} printf -- "%s\n" "$_dev" done } zfs_devs() { local _mp="$1" zpool list -H -v -P "${_mp%%/*}" | awk -F$'\t' '$2 ~ /^\// {print $2}' \ | while read -r _dev; do realpath "${_dev}" done } iface_for_remote_addr() { # shellcheck disable=SC2046 set -- $(ip -o route get to "$1") while [ $# -gt 0 ]; do case $1 in dev) echo "$2" return ;; esac shift done } local_addr_for_remote_addr() { # shellcheck disable=SC2046 set -- $(ip -o route get to "$1") while [ $# -gt 0 ]; do case $1 in src) echo "$2" return ;; esac shift done } peer_for_addr() { local addr=$1 local qtd # quote periods in IPv4 address qtd=${addr//./\\.} ip -o addr show \ | sed -n 's%^.* '"$qtd"' peer \([0-9a-f.:]\{1,\}\(/[0-9]*\)\?\).*$%\1%p' } netmask_for_addr() { local addr=$1 local qtd # quote periods in IPv4 address qtd=${addr//./\\.} ip -o addr show | sed -n 's,^.* '"$qtd"'/\([0-9]*\) .*$,\1,p' } gateway_for_iface() { local ifname=$1 addr=$2 case $addr in *.*) proto=4 ;; *:*) proto=6 ;; *) return ;; esac ip -o -$proto route show \ | sed -n "s/^default via \([0-9a-z.:]\{1,\}\) dev $ifname .*\$/\1/p" } is_unbracketed_ipv6_address() { strglob "$1" '*:*' && ! strglob "$1" '\[*:*\]' } # Create an ip= string to set up networking such that the given # remote address can be reached ip_params_for_remote_addr() { local remote_addr=$1 local ifname local_addr peer netmask gateway ifmac [[ $remote_addr ]] || return 1 ifname=$(iface_for_remote_addr "$remote_addr") [[ $ifname ]] || { berror "failed to determine interface to connect to $remote_addr" return 1 } # ifname clause to bind the interface name to a MAC address if [ -d "/sys/class/net/$ifname/bonding" ]; then dinfo "Found bonded interface '${ifname}'. Make sure to provide an appropriate 'bond=' cmdline." elif [ -e "/sys/class/net/$ifname/address" ]; then ifmac=$(cat "/sys/class/net/$ifname/address") [[ $ifmac ]] && printf 'ifname=%s:%s ' "${ifname}" "${ifmac}" fi local_addr=$(local_addr_for_remote_addr "$remote_addr") [[ $local_addr ]] || { berror "failed to determine local address to connect to $remote_addr" return 1 } peer=$(peer_for_addr "$local_addr") # Set peer or netmask, but not both [[ $peer ]] || netmask=$(netmask_for_addr "$local_addr") gateway=$(gateway_for_iface "$ifname" "$local_addr") # Quote IPv6 addresses with brackets is_unbracketed_ipv6_address "$local_addr" && local_addr="[$local_addr]" is_unbracketed_ipv6_address "$peer" && peer="[$peer]" is_unbracketed_ipv6_address "$gateway" && gateway="[$gateway]" printf 'ip=%s:%s:%s:%s::%s:none ' \ "${local_addr}" "${peer}" "${gateway}" "${netmask}" "${ifname}" } # block_is_nbd # Check whether $1 is an nbd device block_is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] } # block_is_iscsi # Check whether $1 is an iSCSI device block_is_iscsi() { local _dir local _dev=$1 [[ -L "/sys/dev/block/$_dev" ]] || return _dir="$(readlink -f "/sys/dev/block/$_dev")" || return until [[ -d "$_dir/sys" || -d "$_dir/iscsi_session" ]]; do _dir="$_dir/.." done [[ -d "$_dir/iscsi_session" ]] } # block_is_fcoe # Check whether $1 is an FCoE device # Will not work for HBAs that hide the ethernet aspect # completely and present a pure FC device block_is_fcoe() { local _dir local _dev=$1 [[ -L "/sys/dev/block/$_dev" ]] || return _dir="$(readlink -f "/sys/dev/block/$_dev")" until [[ -d "$_dir/sys" ]]; do _dir="$_dir/.." if [[ -d "$_dir/subsystem" ]]; then subsystem=$(basename "$(readlink "$_dir"/subsystem)") [[ $subsystem == "fcoe" ]] && return 0 fi done return 1 } # block_is_netdevice # Check whether $1 is a net device block_is_netdevice() { block_is_nbd "$1" || block_is_iscsi "$1" || block_is_fcoe "$1" } # convert the driver name given by udevadm to the corresponding kernel module name get_module_name() { local dev_driver while read -r dev_driver; do case "$dev_driver" in mmcblk) echo "mmc_block" ;; *) echo "$dev_driver" ;; esac done } # get the corresponding kernel modules of a /sys/class/*/* or/dev/* device get_dev_module() { local dev_attr_walk local dev_drivers local dev_paths dev_attr_walk=$(udevadm info -a "$1") dev_drivers=$(echo "$dev_attr_walk" \ | sed -n 's/\s*DRIVERS=="\(\S\+\)"/\1/p' \ | get_module_name) # also return modalias info from sysfs paths parsed by udevadm dev_paths=$(echo "$dev_attr_walk" | sed -n 's/.*\(\/devices\/.*\)'\'':/\1/p') local dev_path for dev_path in $dev_paths; do local modalias_file="/sys$dev_path/modalias" if [ -e "$modalias_file" ]; then dev_drivers="$(printf "%s\n%s" "$dev_drivers" "$(cat "$modalias_file")")" fi done # if no kernel modules found and device is in a virtual subsystem, follow symlinks if [[ -z $dev_drivers && $(udevadm info -q path "$1") == "/devices/virtual"* ]]; then local dev_vkernel local dev_vsubsystem local dev_vpath dev_vkernel=$(echo "$dev_attr_walk" | sed -n 's/\s*KERNELS=="\(\S\+\)"/\1/p' | tail -1) dev_vsubsystem=$(echo "$dev_attr_walk" | sed -n 's/\s*SUBSYSTEMS=="\(\S\+\)"/\1/p' | tail -1) dev_vpath="/sys/devices/virtual/$dev_vsubsystem/$dev_vkernel" if [[ -n $dev_vkernel && -n $dev_vsubsystem && -d $dev_vpath ]]; then local dev_links local dev_link dev_links=$(find "$dev_vpath" -maxdepth 1 -type l ! -name "subsystem" -exec readlink {} \;) for dev_link in $dev_links; do [[ -n $dev_drivers && ${dev_drivers: -1} != $'\n' ]] && dev_drivers+=$'\n' dev_drivers+=$(udevadm info -a "$dev_vpath/$dev_link" \ | sed -n 's/\s*DRIVERS=="\(\S\+\)"/\1/p' \ | get_module_name \ | grep -v -e pcieport) done fi fi echo "$dev_drivers" } # Check if file is in PE format pe_file_format() { if [[ $# -eq 1 ]]; then local magic magic=$(objdump -p "$1" \ | awk '{if ($1 == "Magic"){print $2}}') # 010b (PE32), 020b (PE32+) [[ $magic == "020b" || $magic == "010b" ]] && return 0 fi return 1 } # Get specific data from the PE header pe_get_header_data() { local data_header [[ $# -ne "2" ]] && return 1 [[ $(pe_file_format "$1") -eq 1 ]] && return 1 data_header=$(objdump -p "$1" \ | awk -v data="$2" '{if ($1 == data){print $2}}') echo "$data_header" } # Get the SectionAlignment data from the PE header pe_get_section_align() { local align_hex [[ $# -ne "1" ]] && return 1 align_hex=$(pe_get_header_data "$1" "SectionAlignment") [[ $? -eq 1 ]] && return 1 echo "$((16#$align_hex))" } # Get the ImageBase data from the PE header pe_get_image_base() { local base_image [[ $# -ne "1" ]] && return 1 base_image=$(pe_get_header_data "$1" "ImageBase") [[ $? -eq 1 ]] && return 1 echo "$((16#$base_image))" } dracut-ng-dracut-ng-3e4cfdd/dracut-init.sh000077500000000000000000001041251474727335100206400ustar00rootroot00000000000000#!/bin/bash # # functions used only by dracut and dracut modules # # Copyright 2005-2009 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # export LC_MESSAGES=C if [[ $EUID == "0" ]] && ! [[ $DRACUT_NO_XATTR ]]; then export DRACUT_CP="cp --reflink=auto --sparse=auto --preserve=mode,timestamps,xattr,links -dfr" else export DRACUT_CP="cp --reflink=auto --sparse=auto --preserve=mode,timestamps,links -dfr" fi # is_func # Check whether $1 is a function. is_func() { [[ "$(type -t "$1")" == "function" ]] } if ! [[ $dracutbasedir ]]; then dracutbasedir=${BASH_SOURCE[0]%/*} [[ $dracutbasedir == dracut-functions* ]] && dracutbasedir="." [[ $dracutbasedir ]] || dracutbasedir="." dracutbasedir="$(readlink -f "$dracutbasedir")" fi if ! is_func dinfo > /dev/null 2>&1; then # shellcheck source=./dracut-logger.sh . "$dracutbasedir/dracut-logger.sh" dlog_init fi if ! [[ $initdir ]]; then dfatal "initdir not set" exit 1 fi if ! [[ -d $initdir ]]; then mkdir -p "$initdir" fi if ! [[ $kernel ]]; then kernel=$(uname -r) export kernel fi srcmods="$dracutsysrootdir/lib/modules/$kernel/" [[ $drivers_dir ]] && { if ! command -v kmod &> /dev/null && vercmp "$(modprobe --version | cut -d' ' -f3)" lt 3.7; then dfatal 'To use --kmoddir option module-init-tools >= 3.7 is required.' exit 1 fi srcmods="$drivers_dir" } export srcmods # export standard hookdirs [[ $hookdirs ]] || { hookdirs="cmdline pre-udev pre-trigger netroot " hookdirs+="initqueue initqueue/settled initqueue/online initqueue/finished initqueue/timeout " hookdirs+="pre-mount pre-pivot cleanup mount " hookdirs+="emergency shutdown-emergency pre-shutdown shutdown " export hookdirs } DRACUT_LDD=${DRACUT_LDD:-ldd} DRACUT_TESTBIN=${DRACUT_TESTBIN:-/bin/sh} DRACUT_LDCONFIG=${DRACUT_LDCONFIG:-ldconfig} # shellcheck source=./dracut-functions.sh . "$dracutbasedir"/dracut-functions.sh # Detect lib paths if ! [[ $libdirs ]]; then if [[ $("$DRACUT_LDD" "$dracutsysrootdir$DRACUT_TESTBIN") == */lib64/* ]] &> /dev/null \ && [[ -d $dracutsysrootdir/lib64 ]]; then libdirs+=" /lib64" [[ -d $dracutsysrootdir/usr/lib64 ]] && libdirs+=" /usr/lib64" fi if [[ -d $dracutsysrootdir/lib ]]; then libdirs+=" /lib" [[ -d $dracutsysrootdir/usr/lib ]] && libdirs+=" /usr/lib" fi libdirs+=" $(ldconfig_paths)" export libdirs fi # ldd needs LD_LIBRARY_PATH pointing to the libraries within the sysroot directory if [[ -n $dracutsysrootdir ]]; then for lib in $libdirs; do LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH":}$dracutsysrootdir$lib" done export LD_LIBRARY_PATH fi # helper function for check() in module-setup.sh # to check for required installed binaries # issues a standardized warning message require_binaries() { local _module_name="${moddir##*/}" local _ret=0 if [[ $1 == "-m" ]]; then _module_name="$2" shift 2 fi for cmd in "$@"; do if ! find_binary "$cmd" &> /dev/null; then ddebug "Module '${_module_name#[0-9][0-9]}' will not be installed, because command '$cmd' could not be found!" ((_ret++)) fi done return "$_ret" } require_any_binary() { local _module_name="${moddir##*/}" local _ret=1 if [[ $1 == "-m" ]]; then _module_name="$2" shift 2 fi for cmd in "$@"; do if find_binary "$cmd" &> /dev/null; then _ret=0 break fi done if ((_ret != 0)); then dinfo "$_module_name: Could not find any command of '$*'!" return 1 fi return 0 } # helper function for check() in module-setup.sh # to check for required kernel modules # issues a standardized warning message require_kernel_modules() { local _module_name="${moddir##*/}" local _ret=0 # Ignore kernel module requirement for no-kernel build [[ $no_kernel == yes ]] && return 0 if [[ $1 == "-m" ]]; then _module_name="$2" shift 2 fi for mod in "$@"; do if ! check_kernel_module "$mod" &> /dev/null; then dinfo "Module '${_module_name#[0-9][0-9]}' will not be installed, because kernel module '$mod' is not available!" ((_ret++)) fi done return "$_ret" } dracut_need_initqueue() { : > "$initdir/lib/dracut/need-initqueue" } dracut_module_included() { [[ " $mods_to_load $modules_loaded " == *\ $*\ * ]] } dracut_no_switch_root() { : > "$initdir/lib/dracut/no-switch-root" } dracut_module_path() { local _dir # shellcheck disable=SC2231 for _dir in "${dracutbasedir}"/modules.d/??${1}; do echo "$_dir" return 0 done return 1 } if ! [[ $DRACUT_INSTALL ]]; then DRACUT_INSTALL=$(find_binary dracut-install) fi if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/dracut-install ]]; then DRACUT_INSTALL=$dracutbasedir/dracut-install elif ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/src/install/dracut-install ]]; then DRACUT_INSTALL=$dracutbasedir/src/install/dracut-install fi # Test if dracut-install is a standalone executable with no options. # E.g. DRACUT_INSTALL may be set externally as: # DRACUT_INSTALL="valgrind dracut-install" # or # DRACUT_INSTALL="dracut-install --debug" # in which case the string cannot be tested for being executable. DRINSTALLPARTS=0 for i in $DRACUT_INSTALL; do DRINSTALLPARTS=$((DRINSTALLPARTS + 1)) done if [[ $DRINSTALLPARTS == 1 ]] && ! command -v "$DRACUT_INSTALL" > /dev/null 2>&1; then dfatal "dracut-install not found!" exit 10 fi if [[ $hostonly == "-h" ]]; then if ! [[ $DRACUT_KERNEL_MODALIASES ]] || ! [[ -f $DRACUT_KERNEL_MODALIASES ]]; then export DRACUT_KERNEL_MODALIASES="${DRACUT_TMPDIR}/modaliases" $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${srcmods:+--kerneldir "$srcmods"} --modalias > "$DRACUT_KERNEL_MODALIASES" fi fi [[ $DRACUT_RESOLVE_LAZY ]] || export DRACUT_RESOLVE_DEPS=1 inst_dir() { local _ret [[ -e ${initdir}/"$1" ]] && return 0 # already there if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -d "$@"; then return 0 else _ret=$? derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -d "$@" return $_ret fi } inst() { local dstdir="${dstdir:-"$initdir"}" local _ret _hostonly_install if [[ $1 == "-H" ]]; then _hostonly_install="-H" shift fi [[ -e ${dstdir}/"${2:-$1}" ]] && return 0 # already there if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then return 0 else _ret=$? derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" return $_ret fi } inst_simple() { local dstdir="${dstdir:-"$initdir"}" local _ret _hostonly_install if [[ $1 == "-H" ]]; then _hostonly_install="-H" shift fi [[ -e ${dstdir}/"${2:-$1}" ]] && return 0 # already there [[ -e $1 ]] || return 1 # no source if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"; then return 0 else _ret=$? derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" return $_ret fi } inst_symlink() { local _ret _hostonly_install if [[ $1 == "-H" ]]; then _hostonly_install="-H" shift fi [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there [[ -L $1 ]] || return 1 if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then return 0 else _ret=$? derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" return $_ret fi } inst_multiple() { local dstdir="${dstdir:-"$initdir"}" local _ret _hostonly_install if [[ $1 == "-H" ]]; then _hostonly_install="-H" shift fi if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then return 0 else _ret=$? derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" return $_ret fi } dracut_install() { inst_multiple "$@" } dracut_instmods() { local _ret _silent=0 local i [[ $no_kernel == yes ]] && return for i in "$@"; do if [[ $i == "--silent" ]]; then _silent=1 break fi done if $DRACUT_INSTALL \ ${dracutsysrootdir:+-r "$dracutsysrootdir"} \ ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@"; then return 0 else _ret=$? if ((_silent == 0)); then derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" fi return $_ret fi } inst_binary() { local _ret if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then return 0 else _ret=$? derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" return $_ret fi } inst_script() { local _ret if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then return 0 else _ret=$? derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" return $_ret fi } # empty function for compatibility inst_fsck_help() { : } # Use with form hostonly="$(optional_hostonly)" inst_xxxx # If hostonly mode is set to "strict", hostonly restrictions will still # be applied, else will ignore hostonly mode and try to install all # given modules. optional_hostonly() { if [[ $hostonly_mode == "strict" ]]; then printf -- "%s" "$hostonly" else printf "" fi } mark_hostonly() { for i in "$@"; do echo "$i" >> "$initdir/lib/dracut/hostonly-files" done } # find symlinks linked to given library file # $1 = library file # Function searches for symlinks by stripping version numbers appended to # library filename, checks if it points to the same target and finally # prints the list of symlinks to stdout. # # Example: # rev_lib_symlinks libfoo.so.8.1 # output: libfoo.so.8 libfoo.so # (Only if libfoo.so.8 and libfoo.so exists on host system.) rev_lib_symlinks() { local _fn local _orig local _links [[ ! $1 ]] && return 0 _fn="$1" _orig="$(readlink -f "$1")" _links=() [[ ${_fn} == *.so.* ]] || return 1 until [[ ${_fn##*.} == so ]]; do _fn="${_fn%.*}" [[ -L ${_fn} ]] && [[ $(readlink -f "${_fn}") == "${_orig}" ]] && _links+=("${_fn}") done echo "${_links[*]}}" } # attempt to install any programs specified in a udev rule inst_rule_programs() { local _prog _bin # shellcheck disable=SC2013 for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p' "$1"); do _bin="" if [[ -x ${udevdir}/$_prog ]]; then _bin="${udevdir}"/$_prog elif [[ ${_prog/\$env\{/} == "$_prog" ]]; then _bin=$(find_binary "$_prog") || { dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" continue } fi [[ $_bin ]] && inst_binary "$_bin" done # shellcheck disable=SC2013 for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p' "$1"); do _bin="" if [[ -x ${udevdir}/$_prog ]]; then _bin=${udevdir}/$_prog elif [[ ${_prog/\$env\{/} == "$_prog" ]] && [[ ${_prog} != "/sbin/initqueue" ]]; then _bin=$(find_binary "$_prog") || { dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" continue } fi [[ $_bin ]] && inst_binary "$_bin" done # shellcheck disable=SC2013 for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p' "$1"); do _bin="" if [[ -x ${udevdir}/$_prog ]]; then _bin=${udevdir}/$_prog elif [[ ${_prog/\$env\{/} == "$_prog" ]]; then _bin=$(find_binary "$_prog") || { dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" continue } fi [[ $_bin ]] && dracut_install "$_bin" done } # attempt to create any groups and users specified in a udev rule inst_rule_group_owner() { local i # shellcheck disable=SC2013 for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p' "$1"); do if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2> /dev/null; then grep -E "^$i:" "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd" fi done # shellcheck disable=SC2013 for i in $(sed -nr 's/.*GROUP=?"([^ "]+).*/\1/p' "$1"); do if ! grep -Eq "^$i:" "$initdir/etc/group" 2> /dev/null; then grep -E "^$i:" "$dracutsysrootdir"/etc/group 2> /dev/null >> "$initdir/etc/group" fi done } inst_rule_initqueue() { if grep -q -F initqueue "$1"; then dracut_need_initqueue fi } # udev rules always get installed in the same place, so # create a function to install them to make life simpler. inst_rules() { local _target=/etc/udev/rules.d _rule _found inst_dir "${udevdir}/rules.d" inst_dir "$_target" for _rule in "$@"; do if [ "${_rule#/}" = "$_rule" ]; then for r in ${hostonly:+"$dracutsysrootdir"/etc/udev/rules.d} "$dracutsysrootdir${udevdir}/rules.d"; do [[ -e $r/$_rule ]] || continue _found="$r/$_rule" inst_rule_programs "$_found" inst_rule_group_owner "$_found" inst_rule_initqueue "$_found" inst_simple "$_found" done fi for r in '' "$dracutsysrootdir$dracutbasedir/rules.d/"; do # skip rules without an absolute path [[ "${r}$_rule" != /* ]] && continue [[ -f ${r}$_rule ]] || continue _found="${r}$_rule" inst_rule_programs "$_found" inst_rule_group_owner "$_found" inst_rule_initqueue "$_found" inst_simple "$_found" "$_target/${_found##*/}" done [[ $_found ]] || ddebug "Skipping udev rule: $_rule" done } # make sure that library links are correct and up to date build_ld_cache() { local dstdir="${dstdir:-"$initdir"}" for f in "$dracutsysrootdir"/etc/ld.so.conf "$dracutsysrootdir"/etc/ld.so.conf.d/*; do [[ -f $f ]] && inst_simple "${f#"$dracutsysrootdir"}" done if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then if [[ $EUID == 0 ]]; then derror "ldconfig exited ungracefully" else derror "ldconfig might need uid=0 (root) for chroot()" fi fi } # install function specialized for hooks # $1 = type of hook, $2 = hook priority (lower runs first), $3 = hook # All hooks should be POSIX/SuS compliant, they will be sourced by init. inst_hook() { local hook if ! [[ -f $3 ]]; then dfatal "Cannot install a hook ($3) that does not exist." dfatal "Aborting initrd creation." exit 1 elif ! [[ $hookdirs == *$1* ]]; then dfatal "No such hook type $1. Aborting initrd creation." exit 1 fi hook="/var/lib/dracut/hooks/${1}/${2}-${3##*/}" inst_simple "$3" "$hook" chmod u+x "$initdir/$hook" } # install any of listed files # # If first argument is '-d' and second some destination path, first accessible # source is installed into this path, otherwise it will installed in the same # path as source. If none of listed files was installed, function return 1. # On first successful installation it returns with 0 status. # # Example: # # inst_any -d /bin/foo /bin/bar /bin/baz # # Lets assume that /bin/baz exists, so it will be installed as /bin/foo in # initramfs. inst_any() { local to f [[ $1 == '-d' ]] && to="$2" && shift 2 for f in "$@"; do [[ -e $f ]] || continue [[ $to ]] && inst "$f" "$to" && return 0 inst "$f" && return 0 done return 1 } # inst_libdir_dir [...] # Install a located on a lib directory to the initramfs image inst_libdir_dir() { local -a _dirs for _dir in $libdirs; do for _i in "$@"; do for _d in "$dracutsysrootdir$_dir"/$_i; do [[ -d $_d ]] && _dirs+=("${_d#"$dracutsysrootdir"}") done done done for _dir in "${_dirs[@]}"; do inst_dir "$_dir" done } # inst_libdir_file [-n ] [...] # Install a located on a lib directory to the initramfs image # -n install matching files inst_libdir_file() { local -a _files if [[ $1 == "-n" ]]; then local _pattern=$2 shift 2 for _dir in $libdirs; do for _i in "$@"; do for _f in "$dracutsysrootdir$_dir"/$_i; do [[ ${_f#"$dracutsysrootdir"} =~ $_pattern ]] || continue [[ -e $_f ]] && _files+=("${_f#"$dracutsysrootdir"}") done done done else for _dir in $libdirs; do for _i in "$@"; do for _f in "$dracutsysrootdir$_dir"/$_i; do [[ -e $_f ]] && _files+=("${_f#"$dracutsysrootdir"}") done done done fi [[ ${#_files[@]} -gt 0 ]] && inst_multiple "${_files[@]}" } # install sysusers files inst_sysusers() { inst_multiple -o "$sysusers/$*" "$sysusers/acct-*-$*" if [[ $hostonly ]]; then inst_multiple -H -o "$sysusersconfdir/$*" "$sysusers/acct-*-$*" fi } # get a command to decompress the given file get_decompress_cmd() { case "$1" in *.gz) echo 'gzip -f -d' ;; *.bz2) echo 'bzip2 -d' ;; *.xz) echo 'xz -f -d' ;; *.zst) echo 'zstd -f -d ' ;; esac } # install function decompressing the target and handling symlinks # $@ = list of compressed (gz or bz2) files or symlinks pointing to such files # # Function install targets in the same paths inside overlay but decompressed # and without extensions (.gz, .bz2). inst_decompress() { local _src _cmd for _src in "$@"; do _cmd=$(get_decompress_cmd "${_src}") [[ -z ${_cmd} ]] && return 1 inst_simple "${_src}" # Decompress with chosen tool. We assume that tool changes name e.g. # from 'name.gz' to 'name'. ${_cmd} "${initdir}${_src#"$dracutsysrootdir"}" done } # It's similar to above, but if file is not compressed, performs standard # install. # $@ = list of files inst_opt_decompress() { local _src for _src in "$@"; do inst_decompress "${_src}" || inst "${_src}" done } # module_check [] [] # execute the check() function of module-setup.sh of # or the "check" script, if module-setup.sh is not found # "check $hostonly" is called module_check() { local _moddir=$3 local _ret local _forced=0 local _hostonly=$hostonly [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") [ $# -ge 2 ] && _forced=$2 [[ -f $_moddir/module-setup.sh ]] || return 1 unset check depends cmdline install installkernel check() { true; } # shellcheck disable=SC1090 . "$_moddir"/module-setup.sh is_func check || return 0 [[ $_forced != 0 ]] && unset hostonly # don't quote $hostonly to leave argument empty # shellcheck disable=SC2086 moddir="$_moddir" check $hostonly _ret=$? unset check depends cmdline install installkernel hostonly=$_hostonly return $_ret } # module_check_mount [] # execute the check() function of module-setup.sh of # or the "check" script, if module-setup.sh is not found # "mount_needs=1 check 0" is called module_check_mount() { local _moddir=$2 local _ret export mount_needs=1 [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") [[ -f $_moddir/module-setup.sh ]] || return 1 unset check depends cmdline install installkernel check() { false; } # shellcheck disable=SC1090 . "$_moddir"/module-setup.sh moddir=$_moddir check 0 _ret=$? unset check depends cmdline install installkernel unset mount_needs return "$_ret" } # module_depends [] # execute the depends() function of module-setup.sh of # or the "depends" script, if module-setup.sh is not found module_depends() { local _moddir=$2 local _ret [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") [[ -f $_moddir/module-setup.sh ]] || return 1 unset check depends cmdline install installkernel depends() { true; } # shellcheck disable=SC1090 . "$_moddir"/module-setup.sh moddir=$_moddir depends _ret=$? unset check depends cmdline install installkernel return $_ret } # module_cmdline [] # execute the cmdline() function of module-setup.sh of # or the "cmdline" script, if module-setup.sh is not found module_cmdline() { local _moddir=$2 local _ret [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") [[ -f $_moddir/module-setup.sh ]] || return 1 unset check depends cmdline install installkernel cmdline() { true; } # shellcheck disable=SC1090 . "$_moddir"/module-setup.sh moddir="$_moddir" cmdline _ret=$? unset check depends cmdline install installkernel return $_ret } # module_install [] # execute the install() function of module-setup.sh of # or the "install" script, if module-setup.sh is not found module_install() { local _moddir=$2 local _ret [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") [[ -f $_moddir/module-setup.sh ]] || return 1 unset check depends cmdline install installkernel install() { true; } # shellcheck disable=SC1090 . "$_moddir"/module-setup.sh moddir="$_moddir" install _ret=$? unset check depends cmdline install installkernel return $_ret } # module_installkernel [] # execute the installkernel() function of module-setup.sh of # or the "installkernel" script, if module-setup.sh is not found module_installkernel() { local _moddir=$2 local _ret [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") [[ -f $_moddir/module-setup.sh ]] || return 1 unset check depends cmdline install installkernel installkernel() { true; } # shellcheck disable=SC1090 . "$_moddir"/module-setup.sh moddir="$_moddir" installkernel _ret=$? unset check depends cmdline install installkernel return $_ret } # check_mount [] [] # check_mount checks, if a dracut module is needed for the given # device and filesystem types in "${host_fs_types[@]}" check_mount() { local _mod=$1 local _moddir=$3 local _ret local _moddep [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") [ "${#host_fs_types[@]}" -le 0 ] && return 1 # If we are already scheduled to be loaded, no need to check again. [[ " $mods_to_load " == *\ $_mod\ * ]] && return 0 [[ " $mods_checked_as_dep " == *\ $_mod\ * ]] && return 1 # This should never happen, but... [[ -d $_moddir ]] || return 1 [[ $2 ]] || mods_checked_as_dep+=" $_mod " if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then return 1 fi if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then module_check_mount "$_mod" "$_moddir" _ret=$? # explicit module, so also accept _ret=255 [[ $_ret == 0 || $_ret == 255 ]] || return 1 else # module not in our list if [[ $dracutmodules == all ]]; then # check, if we can and should install this module module_check_mount "$_mod" "$_moddir" || return 1 else # skip this module return 1 fi fi for _moddep in $(module_depends "$_mod" "$_moddir"); do # handle deps as if they were manually added [[ " $dracutmodules " == *\ $_mod\ * ]] \ && [[ " $dracutmodules " != *\ $_moddep\ * ]] \ && dracutmodules+=" $_moddep " [[ " $add_dracutmodules " == *\ $_mod\ * ]] \ && [[ " $add_dracutmodules " != *\ $_moddep\ * ]] \ && add_dracutmodules+=" $_moddep " [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] \ && [[ " $force_add_dracutmodules " != *\ $_moddep\ * ]] \ && force_add_dracutmodules+=" $_moddep " # if a module we depend on fail, fail also if ! check_module "$_moddep"; then derror "Module '$_mod' depends on module '$_moddep', which can't be installed" return 1 fi done [[ " $mods_to_load " == *\ $_mod\ * ]] \ || mods_to_load+=" $_mod " return 0 } # check_module [] [] # check if a dracut module is to be used in the initramfs process # if is set, then the process also keeps track # that the modules were checked for the dependency tracking process check_module() { local _mod=$1 local _moddir=$3 local _ret local _moddep [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") # If we are already scheduled to be loaded, no need to check again. [[ " $mods_to_load " == *\ $_mod\ * ]] && return 0 [[ " $mods_checked_as_dep " == *\ $_mod\ * ]] && return 1 # This should never happen, but... [[ -d $_moddir ]] || return 1 [[ $2 ]] || mods_checked_as_dep+=" $_mod " if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then if [[ " $force_add_dracutmodules " != *\ $_mod\ * ]]; then ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!" return 1 fi fi if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then if [[ " $dracutmodules $force_add_dracutmodules " == *\ $_mod\ * ]]; then module_check "$_mod" 1 "$_moddir" _ret=$? else module_check "$_mod" 0 "$_moddir" _ret=$? fi # explicit module, so also accept _ret=255 [[ $_ret == 0 || $_ret == 255 ]] || return 1 else # module not in our list if [[ $dracutmodules == all ]]; then # check, if we can and should install this module module_check "$_mod" 0 "$_moddir" _ret=$? if [[ $_ret != 0 ]]; then [[ $2 ]] && return 1 [[ $_ret != 255 ]] && return 1 fi else # skip this module return 1 fi fi for _moddep in $(module_depends "$_mod" "$_moddir"); do # handle deps as if they were manually added [[ " $dracutmodules " == *\ $_mod\ * ]] \ && [[ " $dracutmodules " != *\ $_moddep\ * ]] \ && dracutmodules+=" $_moddep " [[ " $add_dracutmodules " == *\ $_mod\ * ]] \ && [[ " $add_dracutmodules " != *\ $_moddep\ * ]] \ && add_dracutmodules+=" $_moddep " [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] \ && [[ " $force_add_dracutmodules " != *\ $_moddep\ * ]] \ && force_add_dracutmodules+=" $_moddep " # if a module we depend on fail, fail also if ! check_module "$_moddep"; then derror "Module '$_mod' depends on module '$_moddep', which can't be installed" return 1 fi done [[ " $mods_to_load " == *\ $_mod\ * ]] \ || mods_to_load+=" $_mod " return 0 } # for_each_module_dir # execute " 1 " for_each_module_dir() { local _modcheck local _mod local _moddir local _func local _reason _func=$1 for _moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do [[ -e $_moddir/module-setup.sh ]] || continue _mod=${_moddir##*/} _mod=${_mod#[0-9][0-9]} $_func "$_mod" 1 "$_moddir" done # Report any missing dracut modules, the user has specified _modcheck="$add_dracutmodules $force_add_dracutmodules" [[ $dracutmodules != all ]] && _modcheck="$_modcheck $dracutmodules" for _mod in $_modcheck; do [[ " $mods_to_load " == *\ $_mod\ * ]] && continue [[ " $force_add_dracutmodules " != *\ $_mod\ * ]] \ && [[ " $dracutmodules " != *\ $_mod\ * ]] \ && [[ " $omit_dracutmodules " == *\ $_mod\ * ]] \ && continue [[ -d $(echo "$dracutbasedir/modules.d"/[0-9][0-9]"$_mod") ]] \ && _reason="installed" \ || _reason="found" derror "Module '$_mod' cannot be $_reason." [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] && exit 1 [[ " $dracutmodules " == *\ $_mod\ * ]] && exit 1 [[ " $add_dracutmodules " == *\ $_mod\ * ]] && exit 1 done } dracut_kernel_post() { local dstdir="${dstdir:-"$initdir"}" for _f in modules.builtin modules.builtin.alias modules.builtin.modinfo modules.order; do [[ -e $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" done # generate module dependencies for the initrd if [[ -d $dstdir/lib/modules/$kernel ]] \ && ! depmod -a -b "$dstdir" "$kernel"; then dfatal "\"depmod -a $kernel\" failed." exit 1 fi } instmods() { # instmods [-c [-s]] [ ... ] # instmods [-c [-s]] # install kernel modules along with all their dependencies. # can be e.g. "=block" or "=drivers/usb/storage" # -c check # -s silent local dstdir="${dstdir:-"$initdir"}" local _optional="-o" local _silent local _ret [[ $no_kernel == yes ]] && return if [[ $1 == '-c' ]]; then unset _optional shift fi if [[ $1 == '-s' ]]; then _silent=1 shift fi if (($# == 0)); then read -r -d '' -a args set -- "${args[@]}" fi if (($# == 0)); then return 0 fi $DRACUT_INSTALL \ ${dstdir:+-D "$dstdir"} \ ${dracutsysrootdir:+-r "$dracutsysrootdir"} \ ${loginstall:+-L "$loginstall"} \ ${hostonly:+-H} \ ${omit_drivers:+-N "$omit_drivers"} \ ${srcmods:+--kerneldir "$srcmods"} \ ${_optional:+-o} \ ${_silent:+--silent} \ -m "$@" _ret=$? if ((_ret != 0)) && [[ -z $_silent ]]; then derror "FAILED: " \ "$DRACUT_INSTALL" \ ${dstdir:+-D "$dstdir"} \ ${dracutsysrootdir:+-r "$dracutsysrootdir"} \ ${loginstall:+-L "$loginstall"} \ ${hostonly:+-H} \ ${omit_drivers:+-N "$omit_drivers"} \ ${srcmods:+--kerneldir "$srcmods"} \ ${_optional:+-o} \ ${_silent:+--silent} \ -m "$@" fi [[ "$_optional" ]] && return 0 return $_ret } if [[ "$(ln --help)" == *--relative* ]]; then ln_r() { local dstdir="${dstdir:-"$initdir"}" ln -sfnr "${dstdir}/$1" "${dstdir}/$2" } else ln_r() { local dstdir="${dstdir:-"$initdir"}" local _source=$1 local _dest=$2 [[ -d ${_dest%/*} ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/} ln -sfn -- "$(convert_abs_rel "${_dest}" "${_source}")" "${dstdir}/${_dest}" } fi is_qemu_virtualized() { # 0 if a virt environment was detected # 1 if a virt environment could not be detected # 255 if any error was encountered if type -P systemd-detect-virt > /dev/null 2>&1; then if ! vm=$(systemd-detect-virt --vm 2> /dev/null); then return 255 fi [[ $vm == "qemu" ]] && return 0 [[ $vm == "kvm" ]] && return 0 [[ $vm == "bochs" ]] && return 0 fi for i in /sys/class/dmi/id/*_vendor; do [[ -f $i ]] || continue read -r vendor < "$i" [[ $vendor == "QEMU" ]] && return 0 [[ $vendor == "Red Hat" ]] && return 0 [[ $vendor == "Bochs" ]] && return 0 done return 1 } dracut-ng-dracut-ng-3e4cfdd/dracut-initramfs-restore.sh000077500000000000000000000077561474727335100233660ustar00rootroot00000000000000#!/bin/bash set -e # do some sanity checks first [ -e /run/initramfs/bin/sh ] && exit 0 [ -e /run/initramfs/.need_shutdown ] || exit 0 # SIGTERM signal is received upon forced shutdown: ignore the signal # We want to remain alive to be able to trap unpacking errors to avoid # switching root to an incompletely unpacked initramfs trap 'echo "Received SIGTERM signal, ignoring!" >&2' TERM KERNEL_VERSION="$(uname -r)" [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut SKIP="$dracutbasedir/skipcpio" [[ -x $SKIP ]] || SKIP="cat" find_initrd_for_kernel_version() { local kernel_version="$1" local base_path files initrd machine_id if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then machine_id="Default" elif [[ -s /etc/machine-id ]]; then read -r machine_id < /etc/machine-id [[ $machine_id == "uninitialized" ]] && machine_id="Default" else machine_id="Default" fi if [ -n "$machine_id" ]; then for base_path in /efi /boot /boot/efi; do initrd="${base_path}/${machine_id}/${kernel_version}/initrd" if [ -f "$initrd" ]; then echo "$initrd" return fi done fi if [[ -f /lib/modules/${kernel_version}/initrd ]]; then echo "/lib/modules/${kernel_version}/initrd" elif [[ -f /boot/initramfs-${kernel_version}.img ]]; then echo "/boot/initramfs-${kernel_version}.img" else files=(/boot/initr*"${kernel_version}"*) if [ "${#files[@]}" -ge 1 ] && [ -e "${files[0]}" ]; then echo "${files[0]}" fi fi } mount -o ro /boot &> /dev/null || true IMG=$(find_initrd_for_kernel_version "$KERNEL_VERSION") if [ -z "$IMG" ]; then if [[ -f /boot/initramfs-linux.img ]]; then IMG="/boot/initramfs-linux.img" else echo "No initramfs image found to restore!" exit 1 fi fi cd /run/initramfs if (command -v zcat > /dev/null && $SKIP "$IMG" 2> /dev/null | zcat 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \ || (command -v bzcat > /dev/null && $SKIP "$IMG" 2> /dev/null | bzcat 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \ || (command -v xzcat > /dev/null && $SKIP "$IMG" 2> /dev/null | xzcat 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \ || (command -v lz4 > /dev/null && $SKIP "$IMG" 2> /dev/null | lz4 -d -c 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \ || (command -v lzop > /dev/null && $SKIP "$IMG" 2> /dev/null | lzop -d -c 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \ || (command -v zstd > /dev/null && $SKIP "$IMG" 2> /dev/null | zstd -d -c 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \ || ($SKIP "$IMG" 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1); then rm -f -- .need_shutdown else # something failed, so we clean up echo "Unpacking of $IMG to /run/initramfs failed" >&2 rm -f -- /run/initramfs/shutdown exit 1 fi if [[ -f squashfs-root.img ]]; then if ! unsquashfs -no-xattrs -f -d . squashfs-root.img > /dev/null; then echo "Squash module is enabled for this initramfs but failed to unpack squash-root.img" >&2 rm -f -- /run/initramfs/shutdown exit 1 fi elif [[ -f erofs-root.img ]]; then if ! fsck.erofs --extract=. --overwrite erofs-root.img > /dev/null; then echo "Squash module is enabled for this initramfs but failed to unpack erofs-root.img" >&2 rm -f -- /run/initramfs/shutdown exit 1 fi fi if grep -q -w selinux /sys/kernel/security/lsm 2> /dev/null \ && [ -e /etc/selinux/config ] && [ -x /usr/sbin/setfiles ]; then . /etc/selinux/config if [[ $SELINUX != "disabled" && -n $SELINUXTYPE ]]; then /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null fi fi exit 0 dracut-ng-dracut-ng-3e4cfdd/dracut-logger.sh000077500000000000000000000330241474727335100211530ustar00rootroot00000000000000#!/bin/bash # # logging faciality module for dracut both at build- and boot-time # # Copyright 2010 Amadeusz Żołnowski # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . export __DRACUT_LOGGER__=1 ## @brief Logging facility module for dracut both at build- and boot-time. # # @section intro Introduction # # The logger takes a bit from Log4j philosophy. There are defined 6 logging # levels: # - TRACE (6) # The TRACE Level designates finer-grained informational events than the # DEBUG. # - DEBUG (5) # The DEBUG Level designates fine-grained informational events that are most # useful to debug an application. # - INFO (4) # The INFO level designates informational messages that highlight the # progress of the application at coarse-grained level. # - WARN (3) # The WARN level designates potentially harmful situations. # - ERROR (2) # The ERROR level designates error events that might still allow the # application to continue running. # - FATAL (1) # The FATAL level designates very severe error events that will presumably # lead the application to abort. # Descriptions are borrowed from Log4j documentation: # http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html # # @section usage Usage # # First of all you have to start with dlog_init() function which initializes # required variables. Don't call any other logging function before that one! # If you're ready with this, you can use following functions which corresponds # clearly to levels listed in @ref intro Introduction. Here they are: # - dtrace() # - ddebug() # - dinfo() # - dwarn() # - derror() # - dfatal() # They take all arguments given as a single message to be logged. See dlog() # function for details how it works. Note that you shouldn't use dlog() by # yourself. It's wrapped with above functions. # # @see dlog_init() dlog() # # @section conf Configuration # # Logging is controlled by following global variables: # - @var stdloglvl - logging level to standard error (console output) # - @var sysloglvl - logging level to syslog (by logger command) # - @var fileloglvl - logging level to file # - @var kmsgloglvl - logging level to /dev/kmsg (only for boot-time) # - @var logfile - log file which is used when @var fileloglvl is higher # than 0 # and two global variables: @var maxloglvl and @var syslogfacility which must # not be overwritten. Both are set by dlog_init(). @var maxloglvl holds # maximum logging level of those three and indicates that dlog_init() was run. # @var syslogfacility is set either to 'user' (when building initramfs) or # 'daemon' (when booting). # # Logging level set by the variable means that messages from this logging level # and above (FATAL is the highest) will be shown. Logging levels may be set # independently for each destination (stderr, syslog, file, kmsg). # # @see dlog_init() ## @brief Initializes dracut Logger. # # @retval 1 if something has gone wrong # @retval 0 on success. # # @note This function need to be called before any other from this file. # # If any of the variables is not set, this function set it to default: # - @var stdloglvl = 4 (info) # - @var sysloglvl = 0 (no logging) # - @var fileloglvl is set to 4 when @var logfile is set too, otherwise it's # - @var kmsgloglvl = 0 (no logging) # set to 0 # # @warning Function sets global variables @var maxloglvl and @syslogfacility. # See file doc comment for details. dlog_init() { local __oldumask local ret=0 local errmsg [ -z "$stdloglvl" ] && stdloglvl=4 [ -z "$sysloglvl" ] && sysloglvl=0 [ -z "$kmsgloglvl" ] && kmsgloglvl=0 # Skip initialization if it's already done. [ -n "$maxloglvl" ] && return 0 if [ -z "$fileloglvl" ]; then [ -w "$logfile" ] && fileloglvl=4 || fileloglvl=0 elif ((fileloglvl > 0)); then if [[ $logfile ]]; then __oldumask=$(umask) umask 0377 ! [ -e "$logfile" ] && : > "$logfile" umask "$__oldumask" if [[ -w $logfile ]] && [[ -f $logfile ]]; then # Mark new run in the log file echo >> "$logfile" if command -v date > /dev/null; then echo "=== $(date) ===" >> "$logfile" else echo "===============================================" >> "$logfile" fi echo >> "$logfile" else # We cannot log to file, so turn this facility off. fileloglvl=0 ret=1 errmsg="'$logfile' is not a writable file" fi fi fi if ((UID != 0)); then kmsgloglvl=0 sysloglvl=0 fi if ((sysloglvl > 0)); then if [[ -d /run/systemd/journal ]] \ && type -P systemd-cat &> /dev/null \ && systemctl --quiet is-active systemd-journald.socket &> /dev/null \ && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &> /dev/null; }; then readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat" mkfifo "$_systemdcatfile" readonly _dlogfd=15 systemd-cat -t 'dracut' --level-prefix=true < "$_systemdcatfile" & exec 15> "$_systemdcatfile" elif ! ([[ -S /dev/log ]] && [[ -w /dev/log ]] && command -v logger > /dev/null); then # We cannot log to syslog, so turn this facility off. kmsgloglvl=$sysloglvl sysloglvl=0 ret=1 errmsg="No '/dev/log' or 'logger' included for syslog logging" fi fi if ((sysloglvl > 0)) || ((kmsgloglvl > 0)); then if [ -n "$dracutbasedir" ]; then readonly syslogfacility=user else readonly syslogfacility=daemon fi export syslogfacility fi local lvl local maxloglvl_l=0 for lvl in $stdloglvl $sysloglvl $fileloglvl $kmsgloglvl; do ((lvl > maxloglvl_l)) && maxloglvl_l=$lvl done readonly maxloglvl=$maxloglvl_l export maxloglvl if ((stdloglvl < 6)) && ((kmsgloglvl < 6)) && ((fileloglvl < 6)) && ((sysloglvl < 6)); then unset dtrace # shellcheck disable=SC2317 # exposed via API dtrace() { :; } fi if ((stdloglvl < 5)) && ((kmsgloglvl < 5)) && ((fileloglvl < 5)) && ((sysloglvl < 5)); then unset ddebug # shellcheck disable=SC2317 # exposed via API ddebug() { :; } fi if ((stdloglvl < 4)) && ((kmsgloglvl < 4)) && ((fileloglvl < 4)) && ((sysloglvl < 4)); then unset dinfo # shellcheck disable=SC2317 # exposed via API dinfo() { :; } fi if ((stdloglvl < 3)) && ((kmsgloglvl < 3)) && ((fileloglvl < 3)) && ((sysloglvl < 3)); then unset dwarn # shellcheck disable=SC2317 # exposed via API dwarn() { :; } unset dwarning # shellcheck disable=SC2317 # exposed via API dwarning() { :; } fi if ((stdloglvl < 2)) && ((kmsgloglvl < 2)) && ((fileloglvl < 2)) && ((sysloglvl < 2)); then unset derror # shellcheck disable=SC2317 # exposed via API derror() { :; } fi if ((stdloglvl < 1)) && ((kmsgloglvl < 1)) && ((fileloglvl < 1)) && ((sysloglvl < 1)); then unset dfatal # shellcheck disable=SC2317 # exposed via API dfatal() { :; } fi [ -n "$errmsg" ] && derror "$errmsg" return $ret } ## @brief Converts numeric logging level to the first letter of level name. # # @param lvl Numeric logging level in range from 1 to 6. # @retval 1 if @a lvl is out of range. # @retval 0 if @a lvl is correct. # @result Echoes first letter of level name. _lvl2char() { case "$1" in 1) echo F ;; 2) echo E ;; 3) echo W ;; 4) echo I ;; 5) echo D ;; 6) echo T ;; *) return 1 ;; esac } ## @brief Converts numeric level to logger priority defined by POSIX.2. # # @param lvl Numeric logging level in range from 1 to 6. # @retval 1 if @a lvl is out of range. # @retval 0 if @a lvl is correct. # @result Echoes logger priority. _lvl2syspri() { printf -- "%s" "$syslogfacility." case "$1" in 1) echo crit ;; 2) echo error ;; 3) echo warning ;; 4) echo info ;; 5) echo debug ;; 6) echo debug ;; *) return 1 ;; esac } ## @brief Converts dracut-logger numeric level to syslog log level # # @param lvl Numeric logging level in range from 1 to 6. # @retval 1 if @a lvl is out of range. # @retval 0 if @a lvl is correct. # @result Echoes kernel console numeric log level # # Conversion is done as follows: # # # none -> LOG_EMERG (0) # none -> LOG_ALERT (1) # FATAL(1) -> LOG_CRIT (2) # ERROR(2) -> LOG_ERR (3) # WARN(3) -> LOG_WARNING (4) # none -> LOG_NOTICE (5) # INFO(4) -> LOG_INFO (6) # DEBUG(5) -> LOG_DEBUG (7) # TRACE(6) / # # # @see /usr/include/sys/syslog.h _dlvl2syslvl() { local lvl case "$1" in 1) lvl=2 ;; 2) lvl=3 ;; 3) lvl=4 ;; 4) lvl=6 ;; 5) lvl=7 ;; 6) lvl=7 ;; *) return 1 ;; esac [ "$syslogfacility" = user ] && echo $((8 + lvl)) || echo $((24 + lvl)) } ## @brief Prints to stderr and/or writes to file, to syslog and/or /dev/kmsg # given message with given level (priority). # # @param lvl Numeric logging level. # @param msg Message. # @retval 0 It's always returned, even if logging failed. # # @note This function is not supposed to be called manually. Please use # dtrace(), ddebug(), or others instead which wrap this one. # # This is core logging function which logs given message to standard error, file # and/or syslog (with POSIX shell command logger) and/or to /dev/kmsg. # The format is following: # # X: some message # # where @c X is the first letter of logging level. See module description for # details on that. # # Message to syslog is sent with tag @c dracut. Priorities are mapped as # following: # - @c FATAL to @c crit # - @c ERROR to @c error # - @c WARN to @c warning # - @c INFO to @c info # - @c DEBUG and @c TRACE both to @c debug _do_dlog() { local lvlc local lvl="$1" shift lvlc=$(_lvl2char "$lvl") || return 0 local msg="$*" local lmsg="$lvlc: $*" ((lvl <= stdloglvl)) && printf -- 'dracut[%s]: %s\n' "$lvlc" "$msg" >&2 if ((lvl <= sysloglvl)); then if [[ "$_dlogfd" ]]; then printf -- "<%s>%s\n" "$(($(_dlvl2syslvl "$lvl") & 7))" "$msg" >&"$_dlogfd" else logger -t "dracut[$$]" -p "$(_lvl2syspri "$lvl")" -- "$msg" fi fi if ((lvl <= fileloglvl)) && [[ -w $logfile ]] && [[ -f $logfile ]]; then echo "$lmsg" >> "$logfile" fi ((lvl <= kmsgloglvl)) \ && echo "<$(_dlvl2syslvl "$lvl")>dracut[$$] $msg" > /dev/kmsg } ## @brief Internal helper function for _do_dlog() # # @param lvl Numeric logging level. # @param msg Message. # @retval 0 It's always returned, even if logging failed. # # @note This function is not supposed to be called manually. Please use # dtrace(), ddebug(), or others instead which wrap this one. # # This function calls _do_dlog() either with parameter msg, or if # none is given, it will read standard input and will use every line as # a message. # # This enables: # dwarn "This is a warning" # echo "This is a warning" | dwarn dlog() { [ -z "$maxloglvl" ] && return 0 (($1 <= maxloglvl)) || return 0 if (($# > 1)); then _do_dlog "$@" else while read -r line || [ -n "$line" ]; do _do_dlog "$1" "$line" done fi } ## @brief Logs message at TRACE level (6) # # @param msg Message. # @retval 0 It's always returned, even if logging failed. dtrace() { set +x dlog 6 "$@" if [ -n "$debug" ]; then set -x fi } ## @brief Logs message at DEBUG level (5) # # @param msg Message. # @retval 0 It's always returned, even if logging failed. ddebug() { set +x dlog 5 "$@" if [ -n "$debug" ]; then set -x fi } ## @brief Logs message at INFO level (4) # # @param msg Message. # @retval 0 It's always returned, even if logging failed. dinfo() { set +x dlog 4 "$@" if [ -n "$debug" ]; then set -x fi } ## @brief Logs message at WARN level (3) # # @param msg Message. # @retval 0 It's always returned, even if logging failed. dwarn() { set +x dlog 3 "$@" if [ -n "$debug" ]; then set -x fi } ## @brief It's an alias to dwarn() function. # # @param msg Message. # @retval 0 It's always returned, even if logging failed. dwarning() { set +x dwarn "$@" if [ -n "$debug" ]; then set -x fi } ## @brief Logs message at ERROR level (2) # # @param msg Message. # @retval 0 It's always returned, even if logging failed. derror() { set +x dlog 2 "$@" if [ -n "$debug" ]; then set -x fi } ## @brief Logs message at FATAL level (1) # # @param msg Message. # @retval 0 It's always returned, even if logging failed. dfatal() { set +x dlog 1 "$@" if [ -n "$debug" ]; then set -x fi } dracut-ng-dracut-ng-3e4cfdd/dracut-version.sh000077500000000000000000000000711474727335100213550ustar00rootroot00000000000000#!/bin/sh # shellcheck disable=SC2034 DRACUT_VERSION=106 dracut-ng-dracut-ng-3e4cfdd/dracut.conf000066400000000000000000000001651474727335100202060ustar00rootroot00000000000000# PUT YOUR CONFIG IN separate files # in /etc/dracut.conf.d named ".conf" # SEE man dracut.conf(5) for options dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/000077500000000000000000000000001474727335100205035ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/fedora.conf.example000066400000000000000000000030111474727335100242370ustar00rootroot00000000000000# dracut config file customized for RedHat/Fedora. # i18n i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP" i18n_default_font="eurlatgr" i18n_install_all="yes" stdloglvl=3 sysloglvl=5 install_optional_items+=" vi /usr/libexec/vi /etc/virc ps grep cat rm " prefix="/" environment=/usr/lib/environment.d environmentconfdir=/etc/environment.d dbus=/usr/share/dbus-1 dbusinterfaces=/usr/share/dbus-1/interfaces dbusservices=/usr/share/dbus-1/services dbussession=/usr/share/dbus-1/session.d dbussystem=/usr/share/dbus-1/system.d dbussystemservices=/usr/share/dbus-1/system-services dbusconfdir=/etc/dbus-1 dbusinterfacesconfdir=/etc/dbus-1/interfaces dbusservicesconfdir=/etc/dbus-1/services dbussessionconfdir=/etc/dbus-1/session.d dbussystemconfdir=/etc/dbus-1/system.d dbussystemservicesconfdir=/etc/dbus-1/system-services sysctld=/usr/lib/sysctl.d sysctlconfdir=/etc/sysctl.d systemdutildir=/usr/lib/systemd systemdutilconfdir=/etc/systemd systemdcatalog=/usr/lib/systemd/catalog systemdntpunits=/usr/lib/systemd/ntp-units.d systemdntpunitsconfdir=/etc/systemd/ntp-units.d systemdportable=/usr/lib/systemd/portable systemdportableconfdir=/etc/systemd/portable systemdsystemunitdir=/usr/lib/systemd/system systemdsystemconfdir=/etc/systemd/system systemduser=/usr/lib/systemd/user systemduserconfdir=/etc/systemd/user sysusers=/usr/lib/sysusers.d sysusersconfdir=/etc/sysusers.d udevdir=/usr/lib/udev hostonly="yes" hostonly_cmdline="no" early_microcode="yes" reproducible="yes" dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/fips/000077500000000000000000000000001474727335100214445ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/fips/50-fips.conf000066400000000000000000000000621474727335100234740ustar00rootroot00000000000000# turn on fips module add_dracutmodules+=" fips " dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/generic/000077500000000000000000000000001474727335100221175ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/generic/50-generic.conf000066400000000000000000000001271474727335100246240ustar00rootroot00000000000000# generic initrd works on other platforms than the one dracut was called hostonly="no" dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/hostonly/000077500000000000000000000000001474727335100223625ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/hostonly/50-hostonly.conf000066400000000000000000000001661474727335100253350ustar00rootroot00000000000000# optimize initrd to be as small as possible for faster boot performance, tailored to the current host hostonly="yes" dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/ima/000077500000000000000000000000001474727335100212515ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/ima/50-ima.conf000066400000000000000000000001421474727335100231050ustar00rootroot00000000000000# turn on Linux Integrity Measurement Architecture (IMA) modules add_dracutmodules+=" integrity " dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/no-network/000077500000000000000000000000001474727335100226065ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/no-network/50-no-network.conf000066400000000000000000000002721474727335100260030ustar00rootroot00000000000000# ensure networking is not included in the generated initrd # all networking dracut modules either depend on net-lib or systemd-networkd omit_dracutmodules+=" net-lib systemd-networkd " dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/no-xattr/000077500000000000000000000000001474727335100222575ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/no-xattr/50-no-xattr.conf000066400000000000000000000000511474727335100251200ustar00rootroot00000000000000# disable xattr export DRACUT_NO_XATTR=1 dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/rescue/000077500000000000000000000000001474727335100217715ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/rescue/50-rescue.conf000066400000000000000000000001551474727335100243510ustar00rootroot00000000000000dracut_rescue_image="yes" hostonly="no" add_dracutmodules+=" rescue " uefi="no" kernel_cmdline=" rd.auto=1 " dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/suse.conf.example000066400000000000000000000010711474727335100237620ustar00rootroot00000000000000# SUSE specific dracut settings # # SUSE by default always builds as small as possible initrd for performance # and resource reasons. # If you like to build a generic initrd which works on other platforms than # on the one dracut got called comment out below setting(s). hostonly="yes" hostonly_cmdline="yes" compress="zstd -3 -T0 -q" i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP" omit_drivers+=" i2o_scsi " dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/test000077700000000000000000000000001474727335100262032../test/dracut.conf.d/test/ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/test-makeroot000077700000000000000000000000001474727335100316412../test/dracut.conf.d/test-makeroot/ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/test-root000077700000000000000000000000001474727335100300662../test/dracut.conf.d/test-rootustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/uki-virt/000077500000000000000000000000001474727335100222555ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/dracut.conf.d/uki-virt/50-uki-virt.conf000066400000000000000000000024251474727335100251230ustar00rootroot00000000000000# EFI unified kernel image for virtual machines # generic hostonly="no" # unified kernel image uefi="yes" # VMs can't update microcode anyway early_microcode="no" # modules: basics dracutmodules+=" dracut-systemd shutdown " # modules: virtual consoles dracutmodules+=" i18n " # modules: encrypted block device dracutmodules+=" systemd-cryptsetup crypt-loop " # modules: logical volume management dracutmodules+=" lvm " # modules: measure boot phase into TPM2 dracutmodules+=" systemd-pcrphase " # modules: support root on virtiofs dracutmodules+=" virtiofs " # modules: use sysext images (see 'man systemd-sysext') dracutmodules+=" systemd-sysext " # modules: root disk integrity protection dracutmodules+=" systemd-veritysetup " # drivers: virtual buses, pci drivers+=" virtio-pci virtio-mmio " # qemu-kvm drivers+=" hv-vmbus pci-hyperv " # hyperv drivers+=" xen-pcifront " # xen # drivers: storage drivers+=" ahci nvme sd_mod sr_mod " # generic drivers+=" virtio-blk virtio-scsi " # qemu-kvm drivers+=" hv-storvsc " # hyperv drivers+=" xen-blkfront " # xen # root encryption drivers+=" dm_crypt " # root disk integrity protection drivers+=" dm_verity overlay " # filesystems filesystems+=" vfat ext4 xfs overlay " dracut-ng-dracut-ng-3e4cfdd/dracut.sh000077500000000000000000002771421474727335100177110ustar00rootroot00000000000000#!/bin/bash -p # # Generator script for a dracut initramfs # Copyright 2005-2013 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # store for logging unset BASH_ENV unset GZIP # Verify bash version, current minimum is 4 if ((BASH_VERSINFO[0] < 4)); then printf "%s\n" "dracut[F]: dracut requires at least Bash 4." >&2 exit 1 fi dracut_args=("$@") dracut_cmd=$(readlink -f "$0") readonly dracut_cmd set -o pipefail # below we sometimes cd, which causes problems if we're building an UKI # and relative paths are passed on to us. Store the pwd before we do anything. pwd=$(pwd) path_rel_to_abs() { for var in "$@"; do if [[ $var == /* ]]; then echo "$var" else echo "$pwd/$var" fi done } usage() { [[ $sysroot_l ]] && dracutsysrootdir="$sysroot_l" [[ $dracutbasedir ]] || dracutbasedir="$dracutsysrootdir"/usr/lib/dracut if [[ -f $dracutbasedir/dracut-version.sh ]]; then # shellcheck source=./dracut-version.sh . "$dracutbasedir"/dracut-version.sh fi # 80x25 linebreak here ^ cat << EOF Usage: $dracut_cmd [OPTION]... [ []] Version: $DRACUT_VERSION Creates initial ramdisk images for preloading modules -h, --help Display all options If a [LIST] has multiple arguments, then you have to put these in quotes. For example: # dracut --add-drivers "module1 module2" ... EOF } long_usage() { [[ $dracutbasedir ]] || dracutbasedir="$dracutsysrootdir"/usr/lib/dracut if [[ -f $dracutbasedir/dracut-version.sh ]]; then # shellcheck source=./dracut-version.sh . "$dracutbasedir"/dracut-version.sh fi # 80x25 linebreak here ^ cat << EOF Usage: $dracut_cmd [OPTION]... [ []] Version: $DRACUT_VERSION Creates initial ramdisk images for preloading modules --kver [VERSION] Set kernel version to [VERSION]. -f, --force Overwrite existing initramfs file. [OUTPUT_FILE] --rebuild Append the current arguments to those with which the input initramfs image was built. This option helps in incrementally building the initramfs for testing. If optional [OUTPUT_FILE] is not provided, the input initramfs provided to rebuild will be used as output file. -a, --add [LIST] Add a space-separated list of dracut modules. --force-add [LIST] Force to add a space-separated list of dracut modules to the default set of modules, when -H is specified. -o, --omit [LIST] Omit a space-separated list of dracut modules. -m, --modules [LIST] Specify a space-separated list of dracut modules to call when building the initramfs. Modules are located in /usr/lib/dracut/modules.d. This option forces dracut to only include the specified dracut modules. In most cases the --add option is what you want to use. --add-drivers [LIST] Specify a space-separated list of kernel modules to add to the initramfs. --force-drivers [LIST] Specify a space-separated list of kernel modules to add to the initramfs and make sure they are tried to be loaded via modprobe same as passing rd.driver.pre=DRIVER kernel parameter. --omit-drivers [LIST] Specify a space-separated list of kernel modules not to add to the initramfs. -d, --drivers [LIST] Specify a space-separated list of kernel modules to exclusively include in the initramfs. --filesystems [LIST] Specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. -k, --kmoddir [DIR] Specify the directory where to look for kernel modules. --fwdir [DIR] Specify additional colon-separated list of directories where to look for firmware files. --libdirs [LIST] Specify a space-separated list of directories where to look for libraries. --kernel-only Only install kernel drivers and firmware files. --no-kernel Do not install kernel drivers and firmware files. --print-cmdline Print the kernel command line for the given disk layout. --early-microcode Combine early microcode with ramdisk. --no-early-microcode Do not combine early microcode with ramdisk. --kernel-cmdline [PARAMETERS] Specify default kernel command line parameters. Despite its name, this command only sets initrd parameters. --strip Strip binaries in the initramfs. --aggressive-strip Strip more than just debug symbol and sections, for a smaller initramfs build. The --strip option must also be specified. --nostrip Do not strip binaries in the initramfs. --hardlink Hardlink files in the initramfs. --nohardlink Do not hardlink files in the initramfs. --prefix [DIR] Prefix initramfs files with [DIR]. --noprefix Do not prefix initramfs files. --mdadmconf Include local /etc/mdadm.conf file. --nomdadmconf Do not include local /etc/mdadm.conf file. --lvmconf Include local /etc/lvm/lvm.conf file. --nolvmconf Do not include local /etc/lvm/lvm.conf file. --fscks [LIST] Add a space-separated list of fsck helpers. --nofscks Inhibit installation of any fsck helpers. --ro-mnt Mount / and /usr read-only by default. -h, --help This message. --debug Output debug information of the build process. --profile Output profile information of the build process. -L, --stdlog [0-6] Specify logging level (to standard error) 0 - suppress any messages 1 - only fatal errors 2 - all errors 3 - warnings 4 - info 5 - debug info (here starts lots of output) 6 - trace info (and even more) -v, --verbose Increase verbosity level. -q, --quiet Decrease verbosity level. -c, --conf [FILE] Specify configuration file to use. Default: /etc/dracut.conf --confdir [DIR] Specify configuration directory to use *.conf files from. Default: /etc/dracut.conf.d --add-confdir [DIR] Add an extra configuration directory to use *.conf files from. If the directory is not existed, will look for subdirectory under confdir. --tmpdir [DIR] Temporary directory to be used instead of default ${TMPDIR:-/var/tmp}. -r, --sysroot [DIR] Specify sysroot directory to collect files from. -l, --local Local mode. Use modules from the current working directory instead of the system-wide installed in /usr/lib/dracut/modules.d. Useful when running dracut from a git checkout. -H, --hostonly Host-only mode: Install only what is needed for booting the local host instead of a generic host. -N, --no-hostonly Disables host-only mode. --hostonly-mode [MODE] Specify the host-only mode to use. [MODE] could be one of "sloppy" or "strict". "sloppy" mode is used by default. In "sloppy" host-only mode, extra drivers and modules will be installed, so minor hardware change won't make the image unbootable (e.g. changed keyboard), and the image is still portable among similar hosts. With "strict" mode enabled, anything not necessary for booting the local host in its current state will not be included, and modules may do some extra job to save more space. Minor change of hardware or environment could make the image unbootable. DO NOT use "strict" mode unless you know what you are doing. --hostonly-cmdline Store kernel command line arguments needed in the initramfs. --no-hostonly-cmdline Do not store kernel command line arguments needed in the initramfs. --no-hostonly-default-device Do not generate implicit host devices like root, swap, fstab, etc. Use "--mount" or "--add-device" to explicitly add devices as needed. --hostonly-i18n Install only needed keyboard and font files according to the host configuration (default). --no-hostonly-i18n Install all keyboard and font files available. --hostonly-nics [LIST] Only enable listed NICs in the initramfs. The list can be empty, so other modules can install only the necessary network drivers. --persistent-policy [POLICY] Use [POLICY] to address disks and partitions. POLICY can be any directory name found in /dev/disk (e.g. "by-uuid", "by-label"), or "mapper" to use /dev/mapper device names (default). --fstab Use /etc/fstab to determine the root device. --add-fstab [FILE] Add file to the initramfs fstab. --mount "[DEV] [MP] [FSTYPE] [FSOPTS]" Mount device [DEV] on mountpoint [MP] with filesystem [FSTYPE] and options [FSOPTS] in the initramfs. --mount "[MP]" Same as above, but [DEV], [FSTYPE] and [FSOPTS] are determined by looking at the current mounts. --add-device "[DEV]" Bring up [DEV] in initramfs. -i, --include [SOURCE] [TARGET] Include the files in the SOURCE directory into the Target directory in the final initramfs. If SOURCE is a file, it will be installed to TARGET in the final initramfs. -I, --install [LIST] Install the space separated list of files into the initramfs. --install-optional [LIST] Install the space separated list of files into the initramfs, if they exist. --gzip Compress the generated initramfs using gzip. This will be done by default, unless another compression option or --no-compress is passed. --bzip2 Compress the generated initramfs using bzip2. Make sure your kernel has bzip2 decompression support compiled in, otherwise you will not be able to boot. --lzma Compress the generated initramfs using lzma. Make sure your kernel has lzma support compiled in, otherwise you will not be able to boot. --xz Compress the generated initramfs using xz. Make sure that your kernel has xz support compiled in, otherwise you will not be able to boot. --lzo Compress the generated initramfs using lzop. Make sure that your kernel has lzo support compiled in, otherwise you will not be able to boot. --lz4 Compress the generated initramfs using lz4. Make sure that your kernel has lz4 support compiled in, otherwise you will not be able to boot. --zstd Compress the generated initramfs using Zstandard. Make sure that your kernel has zstd support compiled in, otherwise you will not be able to boot. --compress [COMPRESSION] Compress the generated initramfs with the passed compression program. Make sure your kernel knows how to decompress the generated initramfs, otherwise you will not be able to boot. --no-compress Do not compress the generated initramfs. This will override any other compression options. --squash-compressor [COMPRESSION] Specify the compressor and compressor specific options used by mksquashfs if squash module is called when building the initramfs. --enhanced-cpio Attempt to reflink cpio file data using dracut-cpio. --list-modules List all available dracut modules. -M, --show-modules Print included module's name to standard output during build. --keep Keep the temporary initramfs for debugging purposes. --printsize Print out the module install size. --sshkey [SSHKEY] Add SSH key to initramfs (use with ssh-client module). --logfile [FILE] Logfile to use (overrides configuration setting). --reproducible Create reproducible images. --no-reproducible Do not create reproducible images. --loginstall [DIR] Log all files installed from the host to [DIR]. --uefi Create an UEFI executable with the kernel cmdline and kernel combined. --no-uefi Disables UEFI mode. --no-machineid Affects the default output filename of the UEFI executable, discarding the part. --uefi-stub [FILE] Use the UEFI stub [FILE] to create an UEFI executable. --uefi-splash-image [FILE] Use [FILE] as a splash image when creating an UEFI executable. Requires bitmap (.bmp) image format. --kernel-image [FILE] Location of the kernel image. --sbat [PARAMETERS] The SBAT parameters to be added to .sbat. The string "sbat,1,SBAT Version,sbat,1, https://github.com/rhboot/shim/blob/main/SBAT.md" is already added by default. --regenerate-all Regenerate all initramfs images at the default location for the kernel versions found on the system. -p, --parallel Use parallel processing if possible (currently only supported --regenerate-all) images simultaneously. --version Display version. If [LIST] has multiple arguments, then you have to put these in quotes. For example: # dracut --add-drivers "module1 module2" ... EOF } long_version() { [[ $dracutbasedir ]] || dracutbasedir="$dracutsysrootdir"/usr/lib/dracut if [[ -f $dracutbasedir/dracut-version.sh ]]; then # shellcheck source=./dracut-version.sh . "$dracutbasedir"/dracut-version.sh fi echo "dracut $DRACUT_VERSION" } # Fills up host_devs stack variable and makes sure there are no duplicates push_host_devs() { local _dev for _dev in "$@"; do [[ -z $_dev ]] && continue [[ " ${host_devs[*]} " == *" $_dev "* ]] && return host_devs+=("$_dev") done } # Fills up user_devs stack variable and makes sure there are no duplicates push_user_devs() { local _dev for _dev in "$@"; do [[ -z $_dev ]] && continue [[ " ${user_devs[*]} " == *" $_dev "* ]] && return user_devs+=("$_dev") done } check_conf_file() { if grep -H -e '^[^#]*[+]=\("[^ ]\|.*[^ ]"\)' "$@"; then printf '\ndracut[W]: +=" ": should have surrounding white spaces!\n' >&2 printf 'dracut[W]: This will lead to unwanted side effects! Please fix the configuration file.\n\n' >&2 fi } dropindirs_sort() { local suffix=$1 shift local -a files local f d for d in "$@"; do for i in "$d/"*"$suffix"; do if [[ -e $i ]]; then printf "%s\n" "${i##*/}" fi done done | sort -Vu | { readarray -t files for f in "${files[@]}"; do for d in "$@"; do if [[ -e "$d/$f" ]]; then printf "%s\n" "$d/$f" continue 2 fi done done } } rearrange_params() { # Workaround -i, --include taking 2 arguments newat=() for i in "$@"; do if [[ $i == "-i" ]] || [[ $i == "--include" ]]; then newat+=("++include") # Replace --include by ++include else newat+=("$i") fi done set -- "${newat[@]}" # Set new $@ TEMP=$( unset POSIXLY_CORRECT getopt \ -o "a:m:o:d:I:k:c:r:L:fvqlHhMNp" \ --long kver: \ --long add: \ --long force-add: \ --long add-drivers: \ --long force-drivers: \ --long omit-drivers: \ --long modules: \ --long omit: \ --long drivers: \ --long filesystems: \ --long install: \ --long install-optional: \ --long fwdir: \ --long libdirs: \ --long fscks: \ --long add-fstab: \ --long mount: \ --long device: \ --long add-device: \ --long nofscks \ --long ro-mnt \ --long kmoddir: \ --long conf: \ --long confdir: \ --long add-confdir: \ --long tmpdir: \ --long sysroot: \ --long stdlog: \ --long compress: \ --long squash-compressor: \ --long prefix: \ --long rebuild: \ --long force \ --long kernel-only \ --long no-kernel \ --long print-cmdline \ --long kernel-cmdline: \ --long strip \ --long aggressive-strip \ --long nostrip \ --long hardlink \ --long nohardlink \ --long noprefix \ --long mdadmconf \ --long nomdadmconf \ --long lvmconf \ --long nolvmconf \ --long debug \ --long profile \ --long sshkey: \ --long logfile: \ --long verbose \ --long quiet \ --long local \ --long hostonly \ --long host-only \ --long no-hostonly \ --long no-host-only \ --long hostonly-mode: \ --long hostonly-cmdline \ --long no-hostonly-cmdline \ --long no-hostonly-default-device \ --long persistent-policy: \ --long fstab \ --long help \ --long bzip2 \ --long lzma \ --long xz \ --long lzo \ --long lz4 \ --long zstd \ --long no-compress \ --long gzip \ --long enhanced-cpio \ --long list-modules \ --long show-modules \ --long keep \ --long printsize \ --long regenerate-all \ --long parallel \ --long noimageifnotneeded \ --long early-microcode \ --long no-early-microcode \ --long reproducible \ --long no-reproducible \ --long loginstall: \ --long uefi \ --long no-uefi \ --long uefi-stub: \ --long uefi-splash-image: \ --long kernel-image: \ --long sbat: \ --long no-hostonly-i18n \ --long hostonly-i18n \ --long hostonly-nics: \ --long no-machineid \ --long version \ -- "$@" ) # shellcheck disable=SC2181 if (($? != 0)); then usage exit 1 fi } verbosity_mod_l=0 unset kernel unset outfile rearrange_params "$@" eval set -- "$TEMP" # parse command line args to check if '--rebuild' option is present unset append_args_l unset rebuild_file while :; do if [ "$1" == "--" ]; then shift break fi if [ "$1" == "--rebuild" ]; then append_args_l="yes" rebuild_file="$2" if [ ! -e "$rebuild_file" ]; then echo "Image file '$rebuild_file', for rebuild, does not exist!" exit 1 fi abs_rebuild_file=$(readlink -f "$rebuild_file") && rebuild_file="$abs_rebuild_file" shift continue fi shift done # get output file name and kernel version from command line arguments while (($# > 0)); do case ${1%%=*} in ++include) shift 2 ;; *) if ! [[ ${outfile+x} ]]; then outfile=$1 elif ! [[ ${kernel+x} ]]; then kernel=$1 else printf "\nUnknown arguments: %s\n\n" "$*" >&2 usage exit 1 fi ;; esac shift done # extract input image file provided with rebuild option to get previous parameters, if any if [[ $append_args_l == "yes" ]]; then unset rebuild_param # determine resultant file if ! [[ $outfile ]]; then outfile=$rebuild_file fi if ! rebuild_param=$(lsinitrd "$rebuild_file" '*lib/dracut/build-parameter.txt'); then echo "Image '$rebuild_file' has no rebuild information stored" exit 1 fi # prepend previous parameters to current command line args if [[ $rebuild_param ]]; then TEMP="$rebuild_param $TEMP" eval set -- "$TEMP" rearrange_params "$@" fi fi unset PARMS_TO_STORE PARMS_TO_STORE="" eval set -- "$TEMP" while :; do if [[ $1 != "--" ]] && [[ $1 != "--rebuild" ]]; then PARMS_TO_STORE+=" $1" fi case $1 in --kver) kernel="$2" PARMS_TO_STORE+=" '$2'" shift ;; -a | --add) add_dracutmodules_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --force-add) force_add_dracutmodules_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --add-drivers) add_drivers_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --force-drivers) force_drivers_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --omit-drivers) omit_drivers_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; -m | --modules) dracutmodules_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; -o | --omit) omit_dracutmodules_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; -d | --drivers) drivers_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --filesystems) filesystems_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; -I | --install) install_items_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --install-optional) install_optional_items_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --fwdir) fw_dir_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --libdirs) libdirs_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --fscks) fscks_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --add-fstab) add_fstab_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --mount) fstab_lines+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --add-device | --device) add_device_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --kernel-cmdline) kernel_cmdline_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --nofscks) nofscks_l="yes" ;; --ro-mnt) ro_mnt_l="yes" ;; -k | --kmoddir) drivers_dir_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; -c | --conf) conffile="$2" PARMS_TO_STORE+=" '$2'" shift ;; --confdir) confdir="$2" PARMS_TO_STORE+=" '$2'" shift ;; --add-confdir) add_confdir="$2" PARMS_TO_STORE+=" '$2'" shift ;; --tmpdir) tmpdir_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; -r | --sysroot) sysroot_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; -L | --stdlog) stdloglvl_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --compress) compress_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --squash-compressor) squash_compress_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --prefix) prefix_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --loginstall) loginstall_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --rebuild) if [[ $rebuild_file == "$outfile" ]]; then force=yes fi shift ;; -f | --force) force=yes ;; --kernel-only) kernel_only="yes" no_kernel="no" ;; --no-kernel) kernel_only="no" no_kernel="yes" ;; --print-cmdline) print_cmdline="yes" hostonly_l="yes" kernel_only="yes" no_kernel="yes" ;; --early-microcode) early_microcode_l="yes" ;; --no-early-microcode) early_microcode_l="no" ;; --strip) do_strip_l="yes" ;; --aggressive-strip) aggressive_strip_l="yes" ;; --nostrip) do_strip_l="no" ;; --hardlink) do_hardlink_l="yes" ;; --nohardlink) do_hardlink_l="no" ;; --noprefix) prefix_l="/" ;; --mdadmconf) mdadmconf_l="yes" ;; --nomdadmconf) mdadmconf_l="no" ;; --lvmconf) lvmconf_l="yes" ;; --nolvmconf) lvmconf_l="no" ;; --debug) debug="yes" ;; --profile) profile="yes" ;; --sshkey) sshkey="$2" PARMS_TO_STORE+=" '$2'" shift ;; --logfile) logfile_l="$2" shift ;; -v | --verbose) ((verbosity_mod_l++)) ;; -q | --quiet) ((verbosity_mod_l--)) ;; -l | --local) allowlocal="yes" [[ -f "$(readlink -f "${0%/*}")/dracut-init.sh" ]] \ && dracutbasedir="$(readlink -f "${0%/*}")" ;; -H | --hostonly | --host-only) hostonly_l="yes" ;; -N | --no-hostonly | --no-host-only) hostonly_l="no" ;; --hostonly-mode) hostonly_mode_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --hostonly-cmdline) hostonly_cmdline_l="yes" ;; --hostonly-i18n) i18n_install_all_l="no" ;; --hostonly-nics) hostonly_nics_l+=("$2") PARMS_TO_STORE+=" '$2'" shift ;; --no-hostonly-i18n) i18n_install_all_l="yes" ;; --no-hostonly-cmdline) hostonly_cmdline_l="no" ;; --no-hostonly-default-device) hostonly_default_device="no" ;; --persistent-policy) persistent_policy_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --fstab) use_fstab_l="yes" ;; -h | --help) long_usage exit 0 ;; --bzip2) compress_l="bzip2" ;; --lzma) compress_l="lzma" ;; --xz) compress_l="xz" ;; --lzo) compress_l="lzop" ;; --lz4) compress_l="lz4" ;; --zstd) compress_l="zstd" ;; --no-compress) _no_compress_l="cat" ;; --gzip) compress_l="gzip" ;; --enhanced-cpio) enhanced_cpio_l="yes" ;; --list-modules) do_list="yes" kernel_only="no" no_kernel="yes" ;; -M | --show-modules) show_modules_l="yes" ;; --keep) keep="yes" ;; --printsize) printsize="yes" ;; --regenerate-all) regenerate_all_l="yes" ;; -p | --parallel) parallel_l="yes" ;; --noimageifnotneeded) noimageifnotneeded="yes" ;; --reproducible) reproducible_l="yes" ;; --no-reproducible) reproducible_l="no" ;; --uefi) uefi_l="yes" ;; --no-uefi) uefi_l="no" ;; --uefi-stub) uefi_stub_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --uefi-splash-image) uefi_splash_image_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --kernel-image) kernel_image_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --sbat) sbat_l="$2" PARMS_TO_STORE+=" '$2'" shift ;; --no-machineid) machine_id_l="no" ;; --version) long_version exit 0 ;; --) shift break ;; *) # should not even reach this point printf "\n!Unknown option: '%s'\n\n" "$1" >&2 usage exit 1 ;; esac shift done # getopt cannot handle multiple arguments, so just handle "-I,--include" # the old fashioned way while (($# > 0)); do if [ "${1%%=*}" == "++include" ]; then include_src+=("$2") include_target+=("$3") PARMS_TO_STORE+=" --include '$2' '$3'" shift 2 fi shift done [[ $sysroot_l ]] && dracutsysrootdir="$sysroot_l" export LC_ALL=C export LANG=C unset LC_MESSAGES unset LC_CTYPE unset GREP_OPTIONS export DRACUT_LOG_LEVEL=warning [[ $debug ]] && { export DRACUT_LOG_LEVEL=debug export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]-}): ' set -x } [[ $profile ]] && { export PS4='+ $(date "+%s.%N") ${BASH_SOURCE}@${LINENO}: ' set -x debug=yes } [[ $dracutbasedir ]] || dracutbasedir="$dracutsysrootdir"/usr/lib/dracut # if we were not passed a config file, try the default one if [[ -z $conffile ]]; then if [[ $allowlocal ]]; then conffile="$dracutbasedir/dracut.conf" else conffile="$dracutsysrootdir/etc/dracut.conf" fi elif [[ ! -e $conffile ]]; then printf "%s\n" "dracut[F]: Configuration file '$conffile' not found." >&2 exit 1 fi if [[ -z $confdir ]]; then if [[ $allowlocal ]]; then confdir="$dracutbasedir/dracut.conf.d" else confdir="$dracutsysrootdir/etc/dracut.conf.d" fi elif [[ ! -d $confdir ]]; then printf "%s\n" "dracut[F]: Configuration directory '$confdir' not found." >&2 exit 1 fi if [[ -n $add_confdir ]]; then if [[ -d $add_confdir ]]; then : # Check if it exists under $confdir. elif [[ -d $confdir/$add_confdir ]]; then add_confdir="$confdir/$add_confdir" elif [[ -d $dracutbasedir/dracut.conf.d/$add_confdir ]]; then add_confdir="$dracutbasedir/dracut.conf.d/$add_confdir" else printf "%s\n" "dracut[F]: Configuration directory '$add_confdir' not found." >&2 exit 1 fi fi # source our config file if [[ -f $conffile ]]; then check_conf_file "$conffile" # shellcheck disable=SC1090 . "$conffile" fi # source our config dir for f in $(dropindirs_sort ".conf" "$confdir" "$add_confdir" "$dracutbasedir/dracut.conf.d"); do check_conf_file "$f" # shellcheck disable=SC1090 [[ -e $f ]] && . "$f" done # regenerate_all shouldn't be set in conf files regenerate_all=$regenerate_all_l if [[ $parallel_l == "yes" ]]; then parallel=yes fi if [[ $regenerate_all == "yes" ]]; then ret=0 if [[ $kernel ]]; then printf "%s\n" "dracut[F]: --regenerate-all cannot be called with a kernel version." >&2 exit 1 fi if [[ $outfile ]]; then printf "%s\n" "dracut[F]: --regenerate-all cannot be called with an image file." >&2 exit 1 fi ((len = ${#dracut_args[@]})) for ((i = 0; i < len; i++)); do case ${dracut_args[$i]} in --regenerate-all | --parallel) # shellcheck disable=SC2184 unset dracut_args["$i"] ;; esac done cd "$dracutsysrootdir"/lib/modules || exit 1 if [[ $parallel != "yes" ]]; then for i in *; do [[ -f $i/modules.dep ]] || [[ -f $i/modules.dep.bin ]] || continue "$dracut_cmd" --kver="$i" "${dracut_args[@]}" ((ret += $?)) done else for i in *; do [[ -f $i/modules.dep ]] || [[ -f $i/modules.dep.bin ]] || continue "$dracut_cmd" --kver="$i" "${dracut_args[@]}" & done while true; do wait -n wst=$? if [[ $wst == 127 ]]; then break else ((ret += wst)) fi done fi exit "$ret" fi if ! [[ $kernel ]]; then kernel=$(uname -r) fi DRACUT_PATH=${DRACUT_PATH:-/sbin /bin /usr/sbin /usr/bin} for i in $DRACUT_PATH; do rl=$i if [ -L "$dracutsysrootdir$i" ]; then rl=$(readlink -f "$dracutsysrootdir$i") fi rl="${rl#"$dracutsysrootdir"}" if [[ $NPATH != *:$rl* ]]; then NPATH+=":$rl" fi done [[ -z $dracutsysrootdir ]] && export PATH="${NPATH#:}" unset NPATH export SYSTEMCTL=${SYSTEMCTL:-systemctl} # these options add to the stuff in the config file ((${#add_dracutmodules_l[@]})) && add_dracutmodules+=" ${add_dracutmodules_l[*]} " ((${#omit_dracutmodules_l[@]})) && omit_dracutmodules+=" ${omit_dracutmodules_l[*]} " ((${#force_add_dracutmodules_l[@]})) && force_add_dracutmodules+=" ${force_add_dracutmodules_l[*]} " ((${#fscks_l[@]})) && fscks+=" ${fscks_l[*]} " ((${#add_fstab_l[@]})) && add_fstab+=" ${add_fstab_l[*]} " ((${#install_items_l[@]})) && install_items+=" ${install_items_l[*]} " ((${#install_optional_items_l[@]})) && install_optional_items+=" ${install_optional_items_l[*]} " ((${#hostonly_nics_l[@]})) && hostonly_nics+=" ${hostonly_nics_l[*]} " # these options override the stuff in the config file ((${#dracutmodules_l[@]})) && dracutmodules="${dracutmodules_l[*]}" ((${#filesystems_l[@]})) && filesystems="${filesystems_l[*]}" ((${#fw_dir_l[@]})) && fw_dir="${fw_dir_l[*]}" ((${#libdirs_l[@]})) && libdirs="${libdirs_l[*]}" [[ $stdloglvl_l ]] && stdloglvl=$stdloglvl_l [[ ! $stdloglvl ]] && stdloglvl=4 stdloglvl=$((stdloglvl + verbosity_mod_l)) ((stdloglvl > 6)) && stdloglvl=6 ((stdloglvl < 0)) && stdloglvl=0 [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l drivers_dir="${drivers_dir%"${drivers_dir##*[!/]}"}" [[ $do_strip_l ]] && do_strip=$do_strip_l [[ $do_strip ]] || do_strip=yes [[ $aggressive_strip_l ]] && aggressive_strip=$aggressive_strip_l [[ $do_hardlink_l ]] && do_hardlink=$do_hardlink_l [[ $do_hardlink ]] || do_hardlink=yes [[ $prefix_l ]] && prefix=$prefix_l [[ $prefix == "/" ]] && unset prefix [[ $hostonly_l ]] && hostonly=$hostonly_l [[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l [[ $hostonly_mode_l ]] && hostonly_mode=$hostonly_mode_l [[ $hostonly == "yes" ]] && ! [[ $hostonly_cmdline ]] && hostonly_cmdline="yes" # shellcheck disable=SC2034 [[ $i18n_install_all_l ]] && i18n_install_all=$i18n_install_all_l # shellcheck disable=SC2034 [[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l [[ $use_fstab_l ]] && use_fstab=$use_fstab_l [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l [[ $lvmconf_l ]] && lvmconf=$lvmconf_l [[ $dracutbasedir ]] || dracutbasedir="$dracutsysrootdir"/usr/lib/dracut [[ $fw_dir ]] || { fw_path_para=$(< /sys/module/firmware_class/parameters/path) fw_dir="${fw_path_para:+$dracutsysrootdir$fw_path_para:}$dracutsysrootdir/lib/firmware/updates/$kernel:$dracutsysrootdir/lib/firmware/updates:$dracutsysrootdir/lib/firmware/$kernel:$dracutsysrootdir/lib/firmware" } [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" [[ $tmpdir ]] || tmpdir="$TMPDIR" [[ $tmpdir ]] || tmpdir="$dracutsysrootdir"/var/tmp [[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS [[ $compress_l ]] && compress=$compress_l [[ $squash_compress_l ]] && squash_compress=$squash_compress_l [[ $enhanced_cpio_l ]] && enhanced_cpio=$enhanced_cpio_l [[ $show_modules_l ]] && show_modules=$show_modules_l [[ $nofscks_l ]] && nofscks="yes" [[ $ro_mnt_l ]] && ro_mnt="yes" [[ $early_microcode_l ]] && early_microcode=$early_microcode_l [[ $early_microcode ]] || early_microcode=yes [[ $early_microcode_image_dir ]] || early_microcode_image_dir=('/boot') [[ $early_microcode_image_name ]] \ || early_microcode_image_name=('intel-uc.img' 'intel-ucode.img' 'amd-uc.img' 'amd-ucode.img' 'early_ucode.cpio' 'microcode.cpio') [[ $logfile_l ]] && logfile="$logfile_l" [[ $reproducible_l ]] && reproducible="$reproducible_l" [[ $loginstall_l ]] && loginstall="$loginstall_l" [[ $uefi_l ]] && uefi=$uefi_l [[ $uefi_stub_l ]] && uefi_stub=$(path_rel_to_abs "$uefi_stub_l") [[ $uefi_splash_image_l ]] && uefi_splash_image=$(path_rel_to_abs "$uefi_splash_image_l") [[ $kernel_image_l ]] && kernel_image=$(path_rel_to_abs "$kernel_image_l") [[ $sbat_l ]] && sbat="$sbat_l" [[ $machine_id_l ]] && machine_id="$machine_id_l" if ! [[ $outfile ]]; then if [[ $machine_id != "no" ]]; then if [[ -d "$dracutsysrootdir"/efi/Default ]] \ || [[ -d "$dracutsysrootdir"/boot/Default ]] \ || [[ -d "$dracutsysrootdir"/boot/efi/Default ]]; then MACHINE_ID="Default" elif [[ -s "$dracutsysrootdir"/etc/machine-id ]]; then read -r MACHINE_ID < "$dracutsysrootdir"/etc/machine-id [[ $MACHINE_ID == "uninitialized" ]] && MACHINE_ID="Default" else MACHINE_ID="Default" fi fi if [[ $uefi == "yes" ]]; then if [[ -n $uefi_secureboot_key && -z $uefi_secureboot_cert ]] || [[ -z $uefi_secureboot_key && -n $uefi_secureboot_cert ]]; then printf "%s\n" "dracut[F]: Need 'uefi_secureboot_key' and 'uefi_secureboot_cert' both to be set." >&2 exit 1 fi if [[ -n $uefi_secureboot_key && -n $uefi_secureboot_cert ]] && ! command -v sbsign &> /dev/null; then printf "%s\n" "dracut[F]: Need 'sbsign' to create a signed UEFI executable." >&2 exit 1 fi BUILD_ID=$(cat "$dracutsysrootdir"/etc/os-release "$dracutsysrootdir"/usr/lib/os-release \ | while read -r line || [[ $line ]]; do [[ $line =~ BUILD_ID\=* ]] && eval "$line" && echo "$BUILD_ID" && break done) if [[ -z $dracutsysrootdir ]]; then if [[ -d /efi ]] && mountpoint -q /efi; then efidir=/efi/EFI else efidir=/boot/EFI if [[ -d /boot/efi/EFI ]]; then efidir=/boot/efi/EFI fi fi else efidir=/boot/EFI if [[ -d $dracutsysrootdir/boot/efi/EFI ]]; then efidir=/boot/efi/EFI fi fi mkdir -p "$dracutsysrootdir$efidir/Linux" outfile="$dracutsysrootdir$efidir/Linux/linux-$kernel${MACHINE_ID:+-${MACHINE_ID}}${BUILD_ID:+-${BUILD_ID}}.efi" else if ! [[ $initrdname ]]; then initrdname="initramfs-${kernel}.img" fi if [[ -d "$dracutsysrootdir"/efi/loader/entries || -L "$dracutsysrootdir"/efi/loader/entries ]] \ && [[ $MACHINE_ID ]] \ && [[ -d "$dracutsysrootdir"/efi/${MACHINE_ID} || -L "$dracutsysrootdir"/efi/${MACHINE_ID} ]]; then outfile="$dracutsysrootdir/efi/${MACHINE_ID}/${kernel}/initrd" elif [[ -d "$dracutsysrootdir"/boot/loader/entries || -L "$dracutsysrootdir"/boot/loader/entries ]] \ && [[ $MACHINE_ID ]] \ && [[ -d "$dracutsysrootdir"/boot/${MACHINE_ID} || -L "$dracutsysrootdir"/boot/${MACHINE_ID} ]]; then outfile="$dracutsysrootdir/boot/${MACHINE_ID}/${kernel}/initrd" elif [[ -d "$dracutsysrootdir"/boot/efi/loader/entries || -L "$dracutsysrootdir"/boot/efi/loader/entries ]] \ && [[ $MACHINE_ID ]] \ && [[ -d "$dracutsysrootdir"/boot/efi/${MACHINE_ID} || -L "$dracutsysrootdir"/boot/efi/${MACHINE_ID} ]]; then outfile="$dracutsysrootdir/boot/efi/${MACHINE_ID}/${kernel}/initrd" elif [[ -f "$dracutsysrootdir"/lib/modules/${kernel}/initrd ]]; then outfile="$dracutsysrootdir/lib/modules/${kernel}/initrd" elif [[ -e $dracutsysrootdir/boot/vmlinuz-${kernel} || -e $dracutsysrootdir/boot/vmlinux-${kernel} || -e $dracutsysrootdir/boot/kernel-${kernel} ]]; then outfile="$dracutsysrootdir/boot/$initrdname" elif [[ -z $dracutsysrootdir ]] \ && [[ $MACHINE_ID ]] \ && mountpoint -q /efi; then outfile="/efi/${MACHINE_ID}/${kernel}/initrd" elif [[ -z $dracutsysrootdir ]] \ && [[ $MACHINE_ID ]] \ && mountpoint -q /boot/efi; then outfile="/boot/efi/${MACHINE_ID}/${kernel}/initrd" else outfile="$dracutsysrootdir/boot/$initrdname" fi fi fi # eliminate IFS hackery when messing with fw_dir export DRACUT_FIRMWARE_PATH=${fw_dir// /:} fw_dir=${fw_dir//:/ } # check for logfile and try to create one if it doesn't exist if [[ -n $logfile ]]; then if [[ ! -f $logfile ]]; then if touch "$logfile"; then printf "%s\n" "dracut[W]: touch $logfile failed." >&2 fi fi fi # handle compression options. DRACUT_COMPRESS_BZIP2=${DRACUT_COMPRESS_BZIP2:-bzip2} DRACUT_COMPRESS_LBZIP2=${DRACUT_COMPRESS_LBZIP2:-lbzip2} DRACUT_COMPRESS_LZMA=${DRACUT_COMPRESS_LZMA:-lzma} DRACUT_COMPRESS_XZ=${DRACUT_COMPRESS_XZ:-xz} DRACUT_COMPRESS_GZIP=${DRACUT_COMPRESS_GZIP:-gzip} DRACUT_COMPRESS_PIGZ=${DRACUT_COMPRESS_PIGZ:-pigz} DRACUT_COMPRESS_LZOP=${DRACUT_COMPRESS_LZOP:-lzop} DRACUT_COMPRESS_ZSTD=${DRACUT_COMPRESS_ZSTD:-zstd} DRACUT_COMPRESS_LZ4=${DRACUT_COMPRESS_LZ4:-lz4} DRACUT_COMPRESS_CAT=${DRACUT_COMPRESS_CAT:-cat} if [[ $_no_compress_l == "$DRACUT_COMPRESS_CAT" ]]; then compress="$DRACUT_COMPRESS_CAT" fi check_kernel_compress_support() { local kern_compress_config case $1 in "$DRACUT_COMPRESS_LBZIP2" | "$DRACUT_COMPRESS_BZIP2" | lbzip2 | bzip2 | */lbzip2 | */bzip2) kern_compress_config=CONFIG_RD_BZIP2 ;; "$DRACUT_COMPRESS_LZMA" | lzma | */lzma) kern_compress_config=CONFIG_RD_LZMA ;; "$DRACUT_COMPRESS_XZ" | xz | */xz) kern_compress_config=CONFIG_RD_XZ ;; "$DRACUT_COMPRESS_PIGZ" | "$DRACUT_COMPRESS_GZIP" | pigz | gzip | */pigz | */gzip) kern_compress_config=CONFIG_RD_GZIP ;; "$DRACUT_COMPRESS_LZOP" | lzop | */lzop) kern_compress_config=CONFIG_RD_LZO ;; "$DRACUT_COMPRESS_ZSTD" | zstd | */zstd) kern_compress_config=CONFIG_RD_ZSTD ;; "$DRACUT_COMPRESS_LZ4" | lz4 | */lz4) kern_compress_config=CONFIG_RD_LZ4 ;; "$DRACUT_COMPRESS_CAT" | cat | */cat) return 0 ;; *) derror "unknown kernel config option for compressor $1" return 0 ;; esac check_kernel_config $kern_compress_config return $? } [[ $hostonly == yes ]] && hostonly="-h" [[ $hostonly != "-h" ]] && unset hostonly case $hostonly_mode in '') [[ $hostonly ]] && hostonly_mode="sloppy" ;; sloppy | strict) if [[ ! $hostonly ]]; then unset hostonly_mode fi ;; *) printf "%s\n" "dracut[F]: Invalid hostonly mode '$hostonly_mode'." >&2 exit 1 ;; esac [[ $reproducible == yes ]] && DRACUT_REPRODUCIBLE=1 if [[ -z $DRACUT_KMODDIR_OVERRIDE && -n $drivers_dir ]]; then drivers_basename="${drivers_dir##*/}" if [[ -n $drivers_basename && $drivers_basename != "$kernel" ]]; then printf "%s\n" "dracut[F]: The provided directory where to look for kernel modules ($drivers_basename)" >&2 printf "%s\n" "dracut[F]: does not match the kernel version set for the initramfs ($kernel)." >&2 printf "%s\n" "dracut[F]: Set DRACUT_KMODDIR_OVERRIDE=1 to ignore this check." >&2 exit 1 fi drivers_dirname="${drivers_dir%/*}/" if [[ ! $drivers_dirname =~ .*/lib/modules/$ ]]; then printf "%s\n" "dracut[F]: drivers_dir path ${drivers_dir_l:+"set via -k/--kmoddir "}must contain \"/lib/modules/\" as a parent of your kernel module directory," >&2 printf "%s\n" "dracut[F]: or modules may not be placed in the correct location inside the initramfs." >&2 printf "%s\n" "dracut[F]: was given: ${drivers_dir}" >&2 printf "%s\n" "dracut[F]: expected: ${drivers_dirname}lib/modules/${kernel}" >&2 printf "%s\n" "dracut[F]: Please move your modules into the correct directory structure and pass the new location," >&2 printf "%s\n" "dracut[F]: or set DRACUT_KMODDIR_OVERRIDE=1 to ignore this check." >&2 exit 1 fi fi TMPDIR="$(realpath -e "$tmpdir")" readonly TMPDIR [ -d "$TMPDIR" ] || { printf "%s\n" "dracut[F]: Invalid tmpdir '$tmpdir'." >&2 exit 1 } if findmnt --raw -n --target "$tmpdir" --output=options | grep -q noexec; then [[ $debug == yes ]] && printf "%s\n" "dracut[D]: Tmpdir '$tmpdir' is mounted with 'noexec'." >&2 noexec=1 fi DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.XXXXXX)" readonly DRACUT_TMPDIR [ -d "$DRACUT_TMPDIR" ] || { printf "%s\n" "dracut[F]: mktemp -p '$TMPDIR/' -d -t dracut.XXXXXX failed." >&2 exit 1 } # Cache file used to optimize get_maj_min() declare -x -r get_maj_min_cache_file="${DRACUT_TMPDIR}/majmin_cache" : > "$get_maj_min_cache_file" # clean up after ourselves no matter how we die. trap ' ret=$?; [[ $keep ]] && echo "Not removing $DRACUT_TMPDIR." >&2 || { [[ $DRACUT_TMPDIR ]] && rm -rf -- "$DRACUT_TMPDIR"; }; if [[ ${FSFROZEN} ]]; then fsfreeze -u "${FSFROZEN}" fi exit $ret; ' EXIT # clean up after ourselves no matter how we die. trap 'exit 1;' SIGINT readonly initdir="${DRACUT_TMPDIR}/initramfs" readonly squashdir="$initdir/squash_root" mkdir -p "$initdir" if [[ $early_microcode == yes ]] || { [[ $acpi_override == yes ]] && [[ -d $acpi_table_dir ]]; }; then readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio" mkdir "$early_cpio_dir" fi if ${DRACUT_LDD:-ldd} "${dracutsysrootdir}/bin/sh" | grep -q musl &> /dev/null; then musl=1 fi [[ "$dracutsysrootdir" ]] || [[ "$noexec" ]] || [[ "$musl" ]] || export DRACUT_RESOLVE_LAZY="1" if [[ $print_cmdline ]]; then stdloglvl=0 sysloglvl=0 fileloglvl=0 kmsgloglvl=0 fi if [[ -f $dracutbasedir/dracut-version.sh ]]; then # shellcheck source=./dracut-version.sh . "$dracutbasedir"/dracut-version.sh fi if systemd-detect-virt -c &> /dev/null; then export DRACUT_NO_MKNOD=1 if [[ $hostonly ]]; then printf "%s\n" "dracut[W]: Running in hostonly mode in a container!" >&2 fi fi if [[ -f $dracutbasedir/dracut-init.sh ]]; then # shellcheck source=./dracut-init.sh . "$dracutbasedir"/dracut-init.sh else printf "%s\n" "dracut[F]: Cannot find $dracutbasedir/dracut-init.sh." >&2 printf "%s\n" "dracut[F]: Are you running from a git checkout?" >&2 printf "%s\n" "dracut[F]: Try passing -l as an argument to $dracut_cmd" >&2 exit 1 fi if [[ $persistent_policy == "mapper" ]]; then unset persistent_policy elif [[ -n $persistent_policy && ! -d "/dev/disk/${persistent_policy}" ]]; then dwarn "Invalid persistent policy, your system does not have a /dev/disk/${persistent_policy} directory." unset persistent_policy fi if [[ $enhanced_cpio == "yes" ]]; then enhanced_cpio="$dracutbasedir/dracut-cpio" if [[ -x $enhanced_cpio ]]; then # align based on statfs optimal transfer size cpio_align=$(stat --file-system -c "%s" -- "$initdir") else dinfo "--enhanced-cpio ignored due to lack of dracut-cpio" unset enhanced_cpio fi else unset enhanced_cpio fi if [[ $no_kernel != yes ]] && ! [[ -d $srcmods ]]; then dfatal "Cannot find module directory $srcmods" dfatal "and --no-kernel was not specified" exit 1 fi if ! [[ $print_cmdline ]]; then inst "$DRACUT_TESTBIN" if ! $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${dracutsysrootdir:+-r "$dracutsysrootdir"} -R "$DRACUT_TESTBIN" &> /dev/null; then unset DRACUT_RESOLVE_LAZY export DRACUT_RESOLVE_DEPS=1 fi rm -fr -- "${initdir:?}"/* fi if ! check_kernel_config CONFIG_BLK_DEV_INITRD; then echo "This kernel doesn't support initramfs, skipping generation" exit 0 fi dracutfunctions=$dracutbasedir/dracut-functions.sh export dracutfunctions ((${#drivers_l[@]})) && drivers="${drivers_l[*]}" drivers=${drivers/-/_} ((${#add_drivers_l[@]})) && add_drivers+=" ${add_drivers_l[*]} " add_drivers=${add_drivers/-/_} ((${#force_drivers_l[@]})) && force_drivers+=" ${force_drivers_l[*]} " force_drivers=${force_drivers/-/_} ((${#omit_drivers_l[@]})) && omit_drivers+=" ${omit_drivers_l[*]} " omit_drivers=${omit_drivers/-/_} ((${#kernel_cmdline_l[@]})) && kernel_cmdline+=" ${kernel_cmdline_l[*]} " omit_drivers_corrected="" for d in $omit_drivers; do [[ " $drivers $add_drivers " == *\ $d\ * ]] && continue [[ " $drivers $force_drivers " == *\ $d\ * ]] && continue omit_drivers_corrected+="^$d$|" done omit_drivers="${omit_drivers_corrected%|}" unset omit_drivers_corrected # prepare args for logging for ((i = 0; i < ${#dracut_args[@]}; i++)); do [[ ${dracut_args[i]} == *\ * ]] \ && dracut_args[i]="\"${dracut_args[i]}\"" #" keep vim happy done dinfo "Executing: $dracut_cmd ${dracut_args[*]}" [[ $do_list == yes ]] && { for mod in "$dracutbasedir"/modules.d/*; do [[ -e $mod/module-setup.sh ]] || continue printf "%s\n" "${mod##*/??}" done exit 0 } # This is kinda legacy -- eventually it should go away. case $dracutmodules in "" | auto) dracutmodules="all" ;; esac abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile" # Helper function to set global variables # set_global_var [] ... set_global_var() { local _pkgconfig="$1" local _pkgvar="${2%:*}" local _var="${2#*:}" [[ -z ${!_var} || ! -d ${dracutsysrootdir}${!_var} ]] \ && export "$_var"="$(pkg-config "$_pkgconfig" --variable="$_pkgvar" 2> /dev/null)" if [[ -z ${!_var} || ! -d ${dracutsysrootdir}${!_var} ]]; then shift 2 if (($# == 1)); then export "$_var"="$1" else local _val for _val in "$@"; do _check=${_val##*:} _val=${_val%:*} [[ -e ${dracutsysrootdir}${_check} ]] && export "$_var"="$_val" done fi fi } # dbus global variables set_global_var "dbus" "dbus" "/usr/share/dbus-1" set_global_var "dbus" "dbusconfdir" "/etc/dbus-1" set_global_var "dbus" "dbusinterfaces" "${dbus}/interfaces" set_global_var "dbus" "dbusinterfacesconfdir" "${dbusconfdir}/interfaces" set_global_var "dbus" "dbusservices" "${dbus}/services" set_global_var "dbus" "dbusservicesconfdir" "${dbusconfdir}/services" set_global_var "dbus" "dbussession" "${dbus}/session.d" set_global_var "dbus" "dbussessionconfdir" "${dbusconfdir}/session.d" set_global_var "dbus" "dbussystem" "${dbus}/system.d" set_global_var "dbus" "dbussystemconfdir" "${dbusconfdir}/system.d" set_global_var "dbus" "dbussystemservices" "${dbus}/system-services" set_global_var "dbus" "dbussystemservicesconfdir" "${dbusconfdir}/system-services" # udev global variables set_global_var "udev" "udevdir" "/lib/udev:/lib/udev/ata_id" "/usr/lib/udev:/usr/lib/udev/ata_id" set_global_var "udev" "udevconfdir" "/etc/udev" set_global_var "udev" "udevrulesdir" "${udevdir}/rules.d" set_global_var "udev" "udevrulesconfdir" "${udevconfdir}/rules.d" # systemd global variables set_global_var "systemd" "prefix:systemdprefix" "/usr" set_global_var "systemd" "systemdutildir" "/lib/systemd:/lib/systemd/systemd-udevd" "/usr/lib/systemd:/usr/lib/systemd/systemd-udevd" set_global_var "systemd" "systemdutilconfdir" "/etc/systemd" set_global_var "systemd" "environment" "/usr/lib/environment.d" set_global_var "systemd" "environmentconfdir" "/etc/environment.d" set_global_var "systemd" "modulesload" "/usr/lib/modules-load.d" set_global_var "systemd" "modulesloadconfdir" "/etc/modules-load.d" set_global_var "systemd" "sysctld" "/usr/lib/sysctl.d" set_global_var "systemd" "sysctlconfdir" "/etc/sysctl.d" set_global_var "systemd" "systemdcatalog" "${systemdutildir}/catalog" set_global_var "systemd" "systemdnetwork" "${systemdutildir}/network" set_global_var "systemd" "systemdnetworkconfdir" "${systemdutilconfdir}/network" set_global_var "systemd" "systemdntpunits" "${systemdutildir}/ntp-units.d" set_global_var "systemd" "systemdntpunitsconfdir" "${systemdutilconfdir}/ntp-units.d" set_global_var "systemd" "systemdportable" "${systemdutildir}/portable" set_global_var "systemd" "systemdportableconfdir" "${systemdutilconfdir}/portable" set_global_var "systemd" "systemdsystemunitdir" "${systemdutildir}/system" set_global_var "systemd" "systemdsystemconfdir" "${systemdutilconfdir}/system" set_global_var "systemd" "systemduser" "${systemdutildir}/user" set_global_var "systemd" "systemduserconfdir" "${systemdutilconfdir}/user" set_global_var "systemd" "sysusers" "/usr/lib/sysusers.d" set_global_var "systemd" "sysusersconfdir" "/etc/sysusers.d" set_global_var "systemd" "tmpfilesdir" "/lib/tmpfiles.d" "/usr/lib/tmpfiles.d" set_global_var "systemd" "tmpfilesconfdir" "/etc/tmpfiles.d" # libkmod global variables set_global_var "libkmod" "depmodd" "/usr/lib/depmod.d" set_global_var "libkmod" "depmodconfdir" "/etc/depmod.d" if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then if ! [[ -f $srcmods/modules.dep ]]; then if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then dfatal "$srcmods/modules.dep is missing. Did you run depmod?" exit 1 else dwarn "$srcmods/modules.dep is missing. Did you run depmod?" fi fi fi if [[ ! $print_cmdline ]]; then if [[ -f $outfile && ! $force ]]; then dfatal "Will not override existing initramfs ($outfile) without --force" exit 1 fi outdir=${outfile%/*} [[ $outdir ]] || outdir="/" if [[ ! -d $outdir ]]; then dfatal "Can't write to $outdir: Directory $outdir does not exist or is not accessible." exit 1 elif [[ ! -w $outdir ]]; then dfatal "No permission to write to $outdir." exit 1 elif [[ -f $outfile && ! -w $outfile ]]; then dfatal "No permission to write $outfile." exit 1 fi if [[ $loginstall ]]; then if ! mkdir -p "$loginstall"; then dfatal "Could not create directory to log installed files to '$loginstall'." exit 1 fi loginstall=$(readlink -f "$loginstall") fi if [[ $uefi == yes ]]; then if ! command -v objcopy &> /dev/null; then dfatal "Need 'objcopy' to create a UEFI executable" exit 1 fi unset EFI_MACHINE_TYPE_NAME case "${DRACUT_ARCH:-$(uname -m)}" in x86_64) EFI_MACHINE_TYPE_NAME=x64 ;; i?86) EFI_MACHINE_TYPE_NAME=ia32 ;; aarch64) EFI_MACHINE_TYPE_NAME=aa64 ;; riscv64) EFI_MACHINE_TYPE_NAME=riscv64 ;; *) dfatal "Architecture '${DRACUT_ARCH:-$(uname -m)}' not supported to create a UEFI executable" exit 1 ;; esac if ! [[ -s $uefi_stub ]]; then uefi_stub="$dracutsysrootdir${systemdprefix}/lib/systemd/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" fi if ! [[ -s $uefi_stub ]]; then dfatal "Can't find a uefi stub '$uefi_stub' to create a UEFI executable" exit 1 fi if ! [[ $kernel_image ]]; then for kernel_image in "$dracutsysrootdir/lib/modules/$kernel/vmlinuz" "$dracutsysrootdir/boot/vmlinuz-$kernel"; do [[ -s $kernel_image ]] || continue break done fi if ! [[ -s $kernel_image ]]; then dfatal "Can't find a kernel image '$kernel_image' to create a UEFI executable" exit 1 fi fi fi if [[ $acpi_override == yes ]] && ! (check_kernel_config CONFIG_ACPI_TABLE_UPGRADE || check_kernel_config CONFIG_ACPI_INITRD_TABLE_OVERRIDE); then dwarn "Disabling ACPI override, because kernel does not support it. CONFIG_ACPI_INITRD_TABLE_OVERRIDE!=y or CONFIG_ACPI_TABLE_UPGRADE!=y" unset acpi_override fi if [[ $early_microcode == yes ]]; then if [[ $hostonly ]]; then if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then check_kernel_config CONFIG_MICROCODE || unset early_microcode else unset early_microcode fi else ! check_kernel_config CONFIG_MICROCODE \ && unset early_microcode fi # Do not complain on non-x86 architectures as it makes no sense case "${DRACUT_ARCH:-$(uname -m)}" in x86_64 | i?86) [[ $early_microcode != yes ]] \ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y" ;; *) ;; esac fi # Need to be able to have non-root users read stuff (rpcbind etc) chmod 755 "$initdir" if [[ $hostonly ]]; then for i in /sys /proc /run /dev; do if ! findmnt --target "$i" &> /dev/null; then dwarning "Turning off host-only mode: '$i' is not mounted!" unset hostonly fi done fi declare -A host_fs_types for line in "${fstab_lines[@]}"; do # shellcheck disable=SC2086 set -- $line dev="$1" #dev mp fs fsopts case "$dev" in UUID=*) dev=$(blkid -l -t "UUID=${dev#UUID=}" -o device) ;; LABEL=*) dev=$(blkid -l -t "LABEL=${dev#LABEL=}" -o device) ;; PARTUUID=*) dev=$(blkid -l -t "PARTUUID=${dev#PARTUUID=}" -o device) ;; PARTLABEL=*) dev=$(blkid -l -t "PARTLABEL=${dev#PARTLABEL=}" -o device) ;; esac [ -z "$dev" ] && dwarn "Bad fstab entry $*" && continue if [[ $3 == btrfs ]]; then for mp in $(findmnt --source "$1" -o TARGET -n); do for i in $(btrfs_devs "$mp"); do push_host_devs "$i" done done elif [[ $3 == zfs ]]; then for mp in $(zfs_devs "$1"); do push_host_devs "$mp" done fi push_user_devs "$dev" host_fs_types["$dev"]="$3" done for f in $add_fstab; do [[ -e $f ]] || continue while read -r dev rest || [ -n "$dev" ]; do push_host_devs "$dev" done < "$f" done for dev in $add_device; do push_user_devs "$dev" done if ((${#add_device_l[@]})); then add_device+=" ${add_device_l[*]} " push_user_devs "${add_device_l[@]}" fi if [[ $hostonly ]] && [[ $hostonly_default_device != "no" ]]; then # in hostonly mode, determine all devices, which have to be accessed # and examine them for filesystem types for mp in \ "/" \ "/etc" \ "/bin" \ "/sbin" \ "/lib" \ "/lib64" \ "/usr" \ "/usr/bin" \ "/usr/sbin" \ "/usr/lib" \ "/usr/lib64" \ "/boot" \ "/boot/efi" \ "/boot/zipl" \ "/efi"; do mp=$(readlink -f "$dracutsysrootdir$mp") mountpoint "$mp" > /dev/null 2>&1 || continue _dev=$(find_block_device "$mp") # shellcheck disable=SC2181 if [[ $? -eq 0 ]]; then _bdev=$(readlink -f "/dev/block/$_dev") [[ -b $_bdev ]] && _dev=$_bdev [[ $mp == "/" ]] && root_devs+=("$_dev") push_host_devs "$_dev" fi if [[ $(find_mp_fstype "$mp") == btrfs ]]; then for i in $(btrfs_devs "$mp"); do [[ $mp == "/" ]] && root_devs+=("$i") push_host_devs "$i" done elif [[ $(find_mp_fstype "$mp") == zfs ]]; then for i in $(zfs_devs "$(findmnt -n -o SOURCE "$mp")"); do [[ $mp == "/" ]] && root_devs+=("$i") push_host_devs "$i" done fi done # TODO - with sysroot, /proc/swaps is not relevant if [[ -f /proc/swaps ]] && [[ -f $dracutsysrootdir/etc/fstab ]]; then while read -r dev type rest || [ -n "$dev" ]; do [[ -b $dev ]] || continue [[ $type == "partition" ]] || continue while read -r _d _m _t _o _ || [ -n "$_d" ]; do [[ $_d == \#* ]] && continue [[ $_d ]] || continue [[ $_t != "swap" ]] && continue [[ $_m != "swap" ]] && [[ $_m != "none" ]] && continue [[ $_o == *noauto* ]] && continue _d=$(expand_persistent_dev "$_d") [[ $_d -ef $dev ]] || continue if [[ -f $dracutsysrootdir/etc/crypttab ]]; then while read -r _mapper _ _p _o || [ -n "$_mapper" ]; do [[ $_mapper == \#* ]] && continue [[ $_d -ef /dev/mapper/"$_mapper" ]] || continue [[ "$_o" ]] || _o="$_p" # skip entries with password files [[ $_p == /* ]] && [[ -f $_p ]] && continue 2 # skip mkswap swap [[ $_o == *swap* ]] && continue 2 done < "$dracutsysrootdir"/etc/crypttab fi _dev="$(readlink -f "$dev")" push_host_devs "$_dev" swap_devs+=("$_dev") break done < "$dracutsysrootdir"/etc/fstab done < /proc/swaps fi # collect all "x-initrd.mount" entries from /etc/fstab if [[ -f $dracutsysrootdir/etc/fstab ]]; then while read -r _d _m _t _o _ || [ -n "$_d" ]; do [[ $_d == \#* ]] && continue [[ $_d ]] || continue [[ $_o != *x-initrd.mount* ]] && continue _dev=$(expand_persistent_dev "$_d") _dev="$(readlink -f "$_dev")" [[ -b $_dev ]] || continue push_host_devs "$_dev" if [[ $_t == btrfs ]]; then for i in $(btrfs_devs "$_m"); do push_host_devs "$i" done elif [[ $_t == zfs ]]; then for i in $(zfs_devs "$_d"); do push_host_devs "$i" done fi done < "$dracutsysrootdir"/etc/fstab fi fi unset m unset rest _get_fs_type() { [[ $1 ]] || return if [[ -b /dev/block/$1 ]]; then ID_FS_TYPE=$(get_fs_env "/dev/block/$1") && host_fs_types["$(readlink -f "/dev/block/$1")"]="$ID_FS_TYPE" return 1 fi if [[ -b $1 ]]; then ID_FS_TYPE=$(get_fs_env "$1") && host_fs_types["$(readlink -f "$1")"]="$ID_FS_TYPE" return 1 fi if fstype=$(find_dev_fstype "$1"); then host_fs_types["$1"]="$fstype" return 1 fi return 1 } for dev in "${host_devs[@]}" "${user_devs[@]}"; do _get_fs_type "$dev" check_block_and_slaves_all _get_fs_type "$(get_maj_min "$dev")" done for dev in "${!host_fs_types[@]}"; do [[ ${host_fs_types[$dev]} == "xfs" ]] || continue rootopts=$(find_dev_fsopts "$dev") if [[ ${host_fs_types[$dev]} == "xfs" ]]; then journaldev=$(fs_get_option "$rootopts" "logdev") fi if [[ $journaldev ]]; then dev="$(readlink -f "$dev")" push_host_devs "$dev" _get_fs_type "$dev" check_block_and_slaves_all _get_fs_type "$(get_maj_min "$dev")" fi done export initdir dracutbasedir \ dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \ mods_to_load \ fw_dir drivers_dir debug no_kernel kernel_only \ omit_drivers mdadmconf lvmconf root_devs \ use_fstab fstab_lines libdirs fscks nofscks ro_mnt \ stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ host_fs_types host_devs user_devs swap_devs sshkey add_fstab \ DRACUT_VERSION \ prefix filesystems drivers \ hostonly_cmdline loginstall \ squashdir squash_compress mods_to_load="" # check all our modules to see if they should be sourced. # This builds a list of modules that we will install next. for_each_module_dir check_module for_each_module_dir check_mount dracut_module_included "fips" && export DRACUT_FIPS_MODE=1 do_print_cmdline() { local -A _mods_to_print for i in $modules_loaded $mods_to_load; do _mods_to_print[$i]=1 done # source our modules. for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do _d_mod=${moddir##*/} _d_mod=${_d_mod#[0-9][0-9]} [[ ${_mods_to_print[$_d_mod]} ]] || continue module_cmdline "$_d_mod" "$moddir" done unset moddir } if [[ $print_cmdline ]]; then do_print_cmdline printf "\n" exit 0 fi # Create some directory structure first # shellcheck disable=SC2174 [[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}" # shellcheck disable=SC2174 [[ -L $dracutsysrootdir/lib ]] || mkdir -m 0755 -p "${initdir}${prefix}/lib" [[ $prefix ]] && ln -sfn "${prefix#/}/lib" "$initdir/lib" if [[ $prefix ]]; then for d in bin etc lib sbin tmp usr var $libdirs; do d=${d#/} [[ $d == */* ]] && continue ln -sfn "${prefix#/}/${d#/}" "$initdir/$d" done fi if [[ $kernel_only != yes ]]; then for d in usr usr/bin usr/sbin bin etc lib sbin tmp var var/tmp $libdirs; do d=${d#/} [[ -e "${initdir}${prefix}/$d" ]] && continue if [ -L "/$d" ]; then inst_symlink "/$d" "${prefix}/$d" else # shellcheck disable=SC2174 mkdir -m 0755 -p "${initdir}${prefix}/$d" fi done for d in dev proc sys sysroot root run; do if [ -L "/$d" ]; then inst_symlink "/$d" else # shellcheck disable=SC2174 mkdir -m 0755 -p "$initdir/$d" fi done ln -sfn ../run "$initdir/var/run" ln -sfn ../run/lock "$initdir/var/lock" else for d in lib "$libdirs"; do [[ -e "${initdir}${prefix}/$d" ]] && continue if [ -h "/$d" ]; then inst "/$d" "${prefix}/$d" else # shellcheck disable=SC2174 mkdir -m 0755 -p "${initdir}${prefix}/$d" fi done fi mkdir -p "${initdir}"/lib/dracut if [[ $kernel_only != yes ]]; then mkdir -p "${initdir}/etc/cmdline.d" mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks # symlink to old hooks location for compatibility ln_r /var/lib/dracut/hooks /lib/dracut/hooks for _d in $hookdirs; do # shellcheck disable=SC2174 mkdir -m 0755 -p "${initdir}/lib/dracut/hooks/$_d" done if [[ $EUID == "0" ]] && ! [[ $DRACUT_NO_MKNOD ]]; then [[ -c ${initdir}/dev/null ]] || mknod "${initdir}"/dev/null c 1 3 [[ -c ${initdir}/dev/kmsg ]] || mknod "${initdir}"/dev/kmsg c 1 11 [[ -c ${initdir}/dev/console ]] || mknod "${initdir}"/dev/console c 5 1 [[ -c ${initdir}/dev/random ]] || mknod "${initdir}"/dev/random c 1 8 [[ -c ${initdir}/dev/urandom ]] || mknod "${initdir}"/dev/urandom c 1 9 fi fi dracut_module_included "squash-lib" && mkdir -p "$squashdir" _isize=0 #initramfs size modules_loaded=" " # source our modules. for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do _d_mod=${moddir##*/} _d_mod=${_d_mod#[0-9][0-9]} [[ $mods_to_load == *\ $_d_mod\ * ]] || continue if [[ $show_modules == yes ]]; then printf "%s\n" "$_d_mod" else dinfo "*** Including module: $_d_mod ***" fi if [[ $kernel_only == yes ]]; then module_installkernel "$_d_mod" "$moddir" || { dfatal "installkernel failed in module $_d_mod" exit 1 } else module_install "$_d_mod" "$moddir" if [[ $no_kernel != yes ]]; then module_installkernel "$_d_mod" "$moddir" || { dfatal "installkernel failed in module $_d_mod" exit 1 } fi fi mods_to_load=${mods_to_load// $_d_mod /} modules_loaded+="$_d_mod " #print the module install size if [ -n "$printsize" ]; then _isize_new=$(du -sk "${initdir}" | { read -r a _ echo -n "$a" }) _isize_delta=$((_isize_new - _isize)) printf "%s\n" "$_d_mod install size: ${_isize_delta}k" _isize=$_isize_new fi done unset moddir for i in $modules_loaded; do printf "%s\n" "$i" >> "$initdir"/lib/dracut/modules.txt done dinfo "*** Including modules done ***" ## final stuff that has to happen if [[ $no_kernel != yes ]]; then if [[ $hostonly_mode == "strict" ]]; then cp "$DRACUT_KERNEL_MODALIASES" "$initdir"/lib/dracut/hostonly-kernel-modules.txt fi if [[ $drivers ]]; then # shellcheck disable=SC2086 hostonly='' instmods $drivers fi if [[ -n ${add_drivers// /} ]]; then # shellcheck disable=SC2086 hostonly='' instmods -c $add_drivers fi if [[ $force_drivers ]]; then # shellcheck disable=SC2086 hostonly='' instmods -c $force_drivers if [[ $kernel_only != yes ]]; then rm -f "$initdir"/etc/cmdline.d/20-force_driver.conf for mod in $force_drivers; do echo "rd.driver.pre=$mod" >> "$initdir"/etc/cmdline.d/20-force_drivers.conf done fi fi if [[ $filesystems ]]; then # shellcheck disable=SC2086 hostonly='' instmods -c $filesystems fi dinfo "*** Installing kernel module dependencies ***" dracut_kernel_post dinfo "*** Installing kernel module dependencies done ***" if [[ $noimageifnotneeded == yes ]] && [[ $hostonly ]]; then if [[ ! -f "$initdir/lib/dracut/need-initqueue" ]] \ && [[ -f ${initdir}/lib/modules/$kernel/modules.dep && ! -s ${initdir}/lib/modules/$kernel/modules.dep ]]; then for i in "${initdir}"/etc/cmdline.d/*.conf; do # We need no initramfs image and do not generate one. [[ $i == "${initdir}/etc/cmdline.d/*.conf" ]] && exit 0 done fi fi fi if [[ $kernel_only != yes ]]; then # FIXME: handle legacy item split # shellcheck disable=SC2068 ((${#install_items[@]} > 0)) && inst_multiple ${install_items[@]} # shellcheck disable=SC2068 ((${#install_optional_items[@]} > 0)) && inst_multiple -o ${install_optional_items[@]} if [[ $kernel_cmdline ]] && [[ $uefi != yes ]]; then printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" fi for line in "${fstab_lines[@]}"; do read -r -a fstab_field <<< "$line" if [ -z "${fstab_field[1]}" ]; then # Determine device and mount options from current system mountpoint -q "${fstab_field[0]}" || derror "${fstab_field[0]} is not a mount point!" read -r -a fstab_field < <(findmnt --raw -n --target "${fstab_field[0]}" --output=source,target,fstype,options) dinfo "Line for ${fstab_field[1]}: ${fstab_field[*]}" else # Use default options [ -z "${fstab_field[3]}" ] && fstab_field[3]="defaults" fi # Default options for freq and passno [ -z "${fstab_field[4]}" ] && fstab_field[4]="0" [ -z "${fstab_field[5]}" ] && fstab_field[5]="2" strstr "${fstab_field[2]}" "nfs" && fstab_field[5]="0" echo "${fstab_field[@]}" >> "${initdir}/etc/fstab" done for f in $add_fstab; do cat "$f" >> "${initdir}/etc/fstab" done if [[ $dracutsysrootdir$systemdutildir ]]; then if [[ -d ${initdir}/$systemdutildir ]]; then mkdir -p "${initdir}"/etc/conf.d { printf "%s\n" "systemdutildir=\"$systemdutildir\"" printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\"" printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\"" printf "%s\n" "systemdnetworkconfdir=\"$systemdnetworkconfdir\"" } > "${initdir}"/etc/conf.d/systemd.conf fi fi if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then dinfo "*** Resolving executable dependencies ***" # shellcheck disable=SC2086 find "$initdir" -type f -perm /0111 -not -path '*.ko*' -print0 \ | xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${dracutsysrootdir:+-r "$dracutsysrootdir"} -R ${DRACUT_FIPS_MODE:+-f} -- # shellcheck disable=SC2181 if (($? == 0)); then dinfo "*** Resolving executable dependencies done ***" else dfatal "Resolving executable dependencies failed" exit 1 fi fi # Now we are done with lazy resolving, always install dependencies unset DRACUT_RESOLVE_LAZY export DRACUT_RESOLVE_DEPS=1 fi for ((i = 0; i < ${#include_src[@]}; i++)); do src="${include_src[$i]}" target="${include_target[$i]}" if [[ $src && $target ]]; then if [[ -f $src ]]; then inst "$src" "$target" elif [[ -d $src ]]; then ddebug "Including directory: $src" destdir="${initdir}/${target}" mkdir -p "$destdir" # check for preexisting symlinks, so we can cope with the # symlinks to $prefix # Objectname is a file or a directory reset_dotglob="$(shopt -p dotglob)" shopt -q -s dotglob for objectname in "$src"/*; do [[ -e $objectname || -L $objectname ]] || continue if [[ -d $objectname ]] && [[ ! -L $objectname ]]; then # objectname is a directory, let's compute the final directory name object_destdir=${destdir}/${objectname#"$src"/} if ! [[ -e $object_destdir ]]; then # shellcheck disable=SC2174 mkdir -m 0755 -p "$object_destdir" chmod --reference="$objectname" "$object_destdir" fi $DRACUT_CP -t "$object_destdir" "$dracutsysrootdir$objectname"/. else $DRACUT_CP -t "$destdir" "$dracutsysrootdir$objectname" fi done eval "$reset_dotglob" elif [[ -e $src ]]; then derror "$src is neither a directory nor a regular file" else derror "$src doesn't exist" fi fi done if [[ $do_hardlink == yes ]] && command -v hardlink > /dev/null; then dinfo "*** Hardlinking files ***" hardlink "$initdir" 2>&1 | ddebug dinfo "*** Hardlinking files done ***" fi # strip binaries if [[ $do_strip == yes ]]; then # Prefer strip from elfutils for package size declare strip_cmd strip_cmd=$(command -v eu-strip) [ -z "$strip_cmd" ] && strip_cmd="strip" for p in "$strip_cmd" xargs find; do if ! type -P "$p" > /dev/null; then dinfo "Could not find '$p'. Not stripping the initramfs." do_strip=no fi done kstrip_args=(-g) if [[ $aggressive_strip == yes ]]; then # `eu-strip` and `strip` both strips all unneeded parts by default strip_args=(-p) else strip_args=(-g -p) fi fi # cleanup empty ldconfig_paths directories for d in $(ldconfig_paths); do rmdir -p --ignore-fail-on-non-empty "$initdir/$d" > /dev/null 2>&1 done if [[ $early_microcode == yes ]]; then dinfo "*** Generating early-microcode cpio image ***" ucode_dir=(amd-ucode intel-ucode) ucode_dest=(AuthenticAMD.bin GenuineIntel.bin) _dest_dir="$early_cpio_dir/d/kernel/x86/microcode" _dest_idx="0 1" mkdir -p "$_dest_dir" if [[ $hostonly ]]; then [[ $(get_cpu_vendor) == "AMD" ]] && _dest_idx="0" [[ $(get_cpu_vendor) == "Intel" ]] && _dest_idx="1" fi for idx in $_dest_idx; do _fw=${ucode_dir[$idx]} for _fwdir in $fw_dir; do if [[ -d $_fwdir && -d $_fwdir/$_fw ]]; then _src="*" dinfo "*** Constructing ${ucode_dest[$idx]} ***" if [[ $hostonly ]]; then _src=$(get_ucode_file) [[ $_src ]] || break if [[ -r "$_fwdir/$_fw/${_src}.early" ]]; then _src="${_src}.early" elif [[ -r "$_fwdir/$_fw/${_src}.initramfs" ]]; then _src="${_src}.initramfs" else [[ -r $_fwdir/$_fw/$_src ]] || break fi fi for i in $_fwdir/$_fw/$_src; do [ -e "$i" ] && break break 2 done for i in $_fwdir/$_fw/$_src; do [[ -e $i ]] || continue # skip README{.xz,.zst,...} str_starts "$i" "$_fwdir/$_fw/README" && continue # skip gpg files str_ends "$i" ".asc" && continue cat "$i" >> "$_dest_dir/${ucode_dest[$idx]}" done create_early_cpio="yes" fi done if [[ ! -e "$_dest_dir/${ucode_dest[$idx]}" ]]; then if cd "$early_cpio_dir/d"; then for _ucodedir in "${early_microcode_image_dir[@]}"; do for _ucodename in "${early_microcode_image_name[@]}"; do [[ -e "$_ucodedir/$_ucodename" ]] \ && cpio --extract --file "$_ucodedir/$_ucodename" --quiet \ "kernel/x86/microcode/${ucode_dest[$idx]}" if [[ -e "$_dest_dir/${ucode_dest[$idx]}" ]]; then dinfo "*** Using microcode found in '$_ucodedir/$_ucodename' ***" create_early_cpio="yes" break 2 fi done done fi fi done fi if [[ $acpi_override == yes ]] && [[ -d $acpi_table_dir ]]; then dinfo "*** Packaging ACPI tables to override BIOS provided ones ***" _dest_dir="$early_cpio_dir/d/kernel/firmware/acpi" mkdir -p "$_dest_dir" for table in "$acpi_table_dir"/*.aml; do dinfo " Adding ACPI table: $table" $DRACUT_CP "$table" "$_dest_dir" create_early_cpio="yes" done fi dinfo "*** Store current command line parameters ***" if ! (echo "$PARMS_TO_STORE" > "$initdir"/lib/dracut/build-parameter.txt); then dfatal "Could not store the current command line parameters" exit 1 fi if [[ $hostonly_cmdline == "yes" ]]; then unset _stored_cmdline if [[ -d $initdir/etc/cmdline.d ]]; then dinfo "Stored kernel commandline:" for conf in "$initdir"/etc/cmdline.d/*.conf; do [ -e "$conf" ] || continue dinfo "$(< "$conf")" _stored_cmdline=1 done fi if ! [[ $_stored_cmdline ]]; then dinfo "No dracut internal kernel commandline stored in the initramfs" fi fi if [[ $kernel_only != yes ]]; then # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so for _dir in $libdirs; do for _f in "$dracutsysrootdir$_dir/libpthread.so"*; do [[ -e $_f ]] || continue inst_libdir_file "libgcc_s.so*" break 2 done done # FIPS workaround for Fedora/RHEL: libcrypto needs libssl when FIPS is enabled if [[ $DRACUT_FIPS_MODE ]]; then for _dir in $libdirs; do for _f in "$dracutsysrootdir$_dir/libcrypto.so"*; do [[ -e $_f ]] || continue inst_libdir_file -o "libssl.so*" break 2 done done fi fi if [[ $kernel_only != yes ]]; then # make sure that library links are correct and up to date build_ld_cache fi if [[ $do_strip == yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then # stripping files negates (dedup) benefits of using reflink [[ -n $enhanced_cpio ]] && ddebug "strip is enabled alongside cpio reflink" dinfo "*** Stripping files ***" find "$initdir" -type f \ -executable -not -path '*/lib/modules/*.ko*' -print0 \ | xargs -r -0 "$strip_cmd" "${strip_args[@]}" 2> /dev/null # strip kernel modules, but do not touch signed modules find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \ | while read -r -d $'\0' f || [ -n "$f" ]; do SIG=$(tail -c 28 "$f" | tr -d '\000') [[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; } done | xargs -r -0 "$strip_cmd" "${kstrip_args[@]}" dinfo "*** Stripping files done ***" fi if dracut_module_included "squash-lib"; then dinfo "*** Squashing the files inside the initramfs ***" DRACUT_SQUASH_POST_INST=1 module_install "squash-lib" || exit 1 rm -rf "$squashdir" dinfo "*** Squashing the files inside the initramfs done ***" # Skip initramfs compress compress="cat" fi dinfo "*** Creating image file '$outfile' ***" if [[ $uefi == yes ]]; then readonly uefi_outdir="$DRACUT_TMPDIR/uefi" mkdir -p "$uefi_outdir" fi if [[ $DRACUT_REPRODUCIBLE ]]; then find "$initdir" -newer "$dracutbasedir/dracut-functions.sh" -print0 \ | xargs -r -0 touch -h -m -c -r "$dracutbasedir/dracut-functions.sh" if [[ "$(cpio --help)" == *--reproducible* ]]; then CPIO_REPRODUCIBLE=1 else dinfo "cpio does not support '--reproducible'. Resulting image will not be reproducible." fi fi [[ $EUID != 0 ]] && cpio_owner="0:0" if [[ $create_early_cpio == yes ]]; then echo 1 > "$early_cpio_dir/d/early_cpio" if [[ $DRACUT_REPRODUCIBLE ]]; then find "$early_cpio_dir/d" -newer "$dracutbasedir/dracut-functions.sh" -print0 \ | xargs -r -0 touch -h -m -c -r "$dracutbasedir/dracut-functions.sh" fi # The microcode blob is _before_ the initramfs blob, not after if [[ -n $enhanced_cpio ]]; then if ! ( umask 077 cd "$early_cpio_dir/d" find . -print0 | sort -z \ | $enhanced_cpio --null ${cpio_owner:+--owner "$cpio_owner"} \ --mtime 0 --data-align "$cpio_align" --truncate-existing \ "${DRACUT_TMPDIR}/initramfs.img" ); then dfatal "dracut-cpio: creation of $outfile failed" exit 1 fi else if ! ( umask 077 cd "$early_cpio_dir/d" find . -print0 | sed -e 's,\./,,g' | sort -z \ | cpio -o ${CPIO_REPRODUCIBLE:+--reproducible} --null \ ${cpio_owner:+-R "$cpio_owner"} -H newc --quiet > "${DRACUT_TMPDIR}/initramfs.img" ); then dfatal "Creation of $outfile failed" exit 1 fi fi fi if [[ $compress && $compress != cat ]]; then if ! command -v "${compress%% *}" &> /dev/null; then derror "Cannot execute compression command '$compress', falling back to default" compress= elif ! check_kernel_compress_support "${compress%% *}"; then derror "The target kernel does not support '$compress', falling back to default" compress= fi fi if ! [[ $compress ]]; then # check all known compressors, if none specified for i in $DRACUT_COMPRESS_ZSTD $DRACUT_COMPRESS_PIGZ $DRACUT_COMPRESS_GZIP $DRACUT_COMPRESS_LZ4 $DRACUT_COMPRESS_LZOP $DRACUT_COMPRESS_LZMA $DRACUT_COMPRESS_XZ $DRACUT_COMPRESS_LBZIP2 $DRACUT_COMPRESS_BZIP2 $DRACUT_COMPRESS_CAT; do command -v "$i" &> /dev/null || continue check_kernel_compress_support "$i" || continue compress="$i" break done if [[ $compress == cat ]]; then dwarn "No compression tool available. Initramfs image is going to be big." else dinfo "Using auto-determined compression method '$compress'" fi fi # choose the right arguments for the compressor case $compress in bzip2 | lbzip2) if [[ $compress == lbzip2 ]] || command -v "$DRACUT_COMPRESS_LBZIP2" &> /dev/null; then compress="$DRACUT_COMPRESS_LBZIP2 -9" else compress="$DRACUT_COMPRESS_BZIP2 -9" fi ;; lzma) compress="$DRACUT_COMPRESS_LZMA -9 -T0" ;; xz) compress="$DRACUT_COMPRESS_XZ --check=crc32 --lzma2=dict=1MiB -T0" ;; gzip | pigz) if [[ $compress == pigz ]] || command -v "$DRACUT_COMPRESS_PIGZ" &> /dev/null; then compress="$DRACUT_COMPRESS_PIGZ -9 -n -T -R" elif command -v gzip &> /dev/null && $DRACUT_COMPRESS_GZIP --help 2>&1 | grep -q rsyncable; then compress="$DRACUT_COMPRESS_GZIP -n -9 --rsyncable" else compress="$DRACUT_COMPRESS_GZIP -n -9" fi ;; lzo | lzop) compress="$DRACUT_COMPRESS_LZOP -9" ;; lz4) compress="$DRACUT_COMPRESS_LZ4 -l -9" ;; zstd) compress="$DRACUT_COMPRESS_ZSTD -15 -q -T0" ;; esac if [[ -n $enhanced_cpio ]]; then if [[ $compress == "cat" ]]; then # dracut-cpio appends by default, so any ucode remains cpio_outfile="${DRACUT_TMPDIR}/initramfs.img" else ddebug "$compress compression enabled alongside cpio reflink" # dracut-cpio doesn't output to stdout, so stage for compression cpio_outfile="${DRACUT_TMPDIR}/initramfs.img.uncompressed" fi if ! ( umask 077 cd "$initdir" find . -print0 | sort -z \ | $enhanced_cpio --null ${cpio_owner:+--owner "$cpio_owner"} \ --mtime 0 --data-align "$cpio_align" "$cpio_outfile" || exit 1 [[ $compress == "cat" ]] && exit 0 $compress < "$cpio_outfile" >> "${DRACUT_TMPDIR}/initramfs.img" \ && rm "$cpio_outfile" ); then dfatal "dracut-cpio: creation of $outfile failed" exit 1 fi unset cpio_outfile else if ! ( umask 077 cd "$initdir" find . -print0 | sed -e 's,\./,,g' | sort -z \ | cpio -o ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc --quiet \ | $compress >> "${DRACUT_TMPDIR}/initramfs.img" ); then dfatal "Creation of $outfile failed" exit 1 fi fi if ((maxloglvl >= 5)) && ((verbosity_mod_l >= 0)); then if [[ $allowlocal ]]; then "$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img" | ddebug else lsinitrd "${DRACUT_TMPDIR}/initramfs.img" | ddebug fi fi umask 077 SBAT_DEFAULT="sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md" sbat_out=$uefi_outdir/uki.sbat clean_sbat_string() { local inp=$1 local temp=$uefi_outdir/temp.sbat sed "/${SBAT_DEFAULT//\//\\/}/d" "$inp" > "$temp" [[ -s $temp ]] && cat "$temp" >> "$sbat_out" rm "$temp" } get_sbat_string() { local inp=$1 local out=$uefi_outdir/$2 objcopy -O binary --only-section=.sbat "$inp" "$out" clean_sbat_string "$out" } if [[ $uefi == yes ]]; then if [[ $kernel_cmdline ]]; then echo -n "$kernel_cmdline" > "$uefi_outdir/cmdline.txt" elif [[ $hostonly_cmdline == yes ]]; then if [ -d "$initdir/etc/cmdline.d" ]; then for conf in "$initdir"/etc/cmdline.d/*.conf; do [ -e "$conf" ] || continue printf "%s " "$(< "$conf")" >> "$uefi_outdir/cmdline.txt" done elif [ -e "/proc/cmdline" ]; then printf "%s " "$(< "/proc/cmdline")" > "$uefi_outdir/cmdline.txt" fi fi offs=$(($(objdump -h "$uefi_stub" 2> /dev/null | awk 'NF==7 {size=$3; offset=$4} END {print "16#"size" + 16#"offset}'))) if [[ $offs -eq 0 ]]; then dfatal "Failed to get the size of $uefi_stub to create UEFI image file" exit 1 fi align=$(pe_get_section_align "$uefi_stub") if [[ $? -eq 1 ]]; then dfatal "Failed to get the SectionAlignment of the stub PE header to create the UEFI image file" exit 1 fi offs=$((offs + "$align" - offs % "$align")) [[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release" [[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release" [[ -s $uefi_osrelease ]] \ && uefi_osrelease_offs=${offs} \ && offs=$((offs + $(stat -Lc%s "$uefi_osrelease"))) \ && offs=$((offs + "$align" - offs % "$align")) if [[ $kernel_cmdline ]] || [[ $hostonly_cmdline == yes && -e "${uefi_outdir}/cmdline.txt" ]]; then echo -ne "\x00" >> "$uefi_outdir/cmdline.txt" dinfo "Using UEFI kernel cmdline:" dinfo "$(tr -d '\000' < "$uefi_outdir/cmdline.txt")" uefi_cmdline="${uefi_outdir}/cmdline.txt" uefi_cmdline_offs=${offs} offs=$((offs + $(stat -Lc%s "$uefi_cmdline"))) offs=$((offs + "$align" - offs % "$align")) else unset uefi_cmdline fi if [[ -s ${dracutsysrootdir}${uefi_splash_image} ]]; then uefi_splash_image="${dracutsysrootdir}${uefi_splash_image}" uefi_splash_offs=${offs} offs=$((offs + $(stat -Lc%s "$uefi_splash_image"))) offs=$((offs + "$align" - offs % "$align")) else unset uefi_splash_image fi echo "$SBAT_DEFAULT" > "$sbat_out" if [[ -n $sbat ]]; then echo "$sbat" | sed "/${SBAT_DEFAULT//\//\\/}/d" >> "$sbat_out" fi get_sbat_string "$kernel_image" kernel.sbat get_sbat_string "$uefi_stub" stub.sbat uefi_sbat_offs="${offs}" offs=$((offs + $(stat -Lc%s "$sbat_out"))) offs=$((offs + "$align" - offs % "$align")) uefi_linux_offs="${offs}" offs=$((offs + $(stat -Lc%s "$kernel_image"))) offs=$((offs + "$align" - offs % "$align")) uefi_initrd_offs="${offs}" base_image=$(pe_get_image_base "$uefi_stub") if [[ $? -eq 1 ]]; then dfatal "Failed to get ImageBase data of $uefi_stub to create UEFI image file" exit 1 fi tmp_uefi_stub=$uefi_outdir/elf.stub cp "$uefi_stub" "$tmp_uefi_stub" objcopy --remove-section .sbat "$tmp_uefi_stub" &> /dev/null if objcopy \ ${DRACUT_REPRODUCIBLE:+--enable-deterministic-archives --preserve-dates} \ ${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=$(printf 0x%x "$uefi_osrelease_offs")} \ ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=$(printf 0x%x "$uefi_cmdline_offs")} \ ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=$(printf 0x%x "$uefi_splash_offs")} \ --add-section .sbat="$sbat_out" --change-section-vma .sbat="$(printf 0x%x "$uefi_sbat_offs")" \ --add-section .linux="$kernel_image" --change-section-vma .linux="$(printf 0x%x "$uefi_linux_offs")" \ --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="$(printf 0x%x "$uefi_initrd_offs")" \ --image-base="$(printf 0x%x "$base_image")" \ "$tmp_uefi_stub" "${uefi_outdir}/linux.efi"; then if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then if sbsign \ ${uefi_secureboot_engine:+--engine "$uefi_secureboot_engine"} \ --key "${uefi_secureboot_key}" \ --cert "${uefi_secureboot_cert}" \ --output "$outfile" "${uefi_outdir}/linux.efi" \ && sbverify --cert "${uefi_secureboot_cert}" "$outfile" > /dev/null 2>&1; then dinfo "*** Creating signed UEFI image file '$outfile' done ***" else rm -f -- "$outfile" dfatal "*** Creating signed UEFI image file '$outfile' failed ***" exit 1 fi else if cp --reflink=auto "${uefi_outdir}/linux.efi" "$outfile"; then dinfo "*** Creating UEFI image file '$outfile' done ***" else rm -f -- "$outfile" dfatal "Creation of $outfile failed" exit 1 fi fi else rm -f -- "$outfile" dfatal "*** Creating UEFI image file '$outfile' failed ***" exit 1 fi else if cp --reflink=auto "${DRACUT_TMPDIR}/initramfs.img" "$outfile"; then dinfo "*** Creating initramfs image file '$outfile' done ***" else rm -f -- "$outfile" dfatal "Creation of $outfile failed" exit 1 fi fi btrfs_uuid() { btrfs filesystem show "$1" | sed -n '1s/^.*uuid: //p' } freeze_ok_for_btrfs() { local mnt uuid1 uuid2 # If the output file is on btrfs, we need to make sure that it's # not on a subvolume of the same file system as the root FS. # Otherwise, fsfreeze() might freeze the entire system. # This is most conveniently checked by comparing the FS uuid. [[ "$(stat -f -c %T -- "/")" == "btrfs" ]] || return 0 mnt=$(stat -c %m -- "$1") uuid1=$(btrfs_uuid "$mnt") uuid2=$(btrfs_uuid "/") [[ $uuid1 && $uuid2 && $uuid1 != "$uuid2" ]] } freeze_ok_for_fstype() { local outfile=$1 local fstype [[ "$(stat -c %m -- "$outfile")" == "/" ]] && return 1 fstype=$(stat -f -c %T -- "$outfile") case $fstype in msdos) return 1 ;; zfs) return 1 ;; tmpfs) return 1 ;; btrfs) freeze_ok_for_btrfs "$outfile" ;; *) return 0 ;; esac } # We sync/fsfreeze only if we're operating on a live booted system. # It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent, # and there's no reason to sync, and *definitely* no reason to fsfreeze. # Another case where this happens is rpm-ostree, which performs its own sync/fsfreeze # globally. See e.g. https://github.com/ostreedev/ostree/commit/8642ef5ab3fec3ac8eb8f193054852f83a8bc4d0 if [[ -d $dracutsysrootdir/run/systemd/system ]]; then if ! sync "$outfile" 2> /dev/null; then dinfo "sync operation on newly created initramfs $outfile failed" exit 1 fi # use fsfreeze only if we're not writing to / if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then FSFROZEN="$(dirname "$outfile")" if ! (fsfreeze -f "${FSFROZEN}" 2> /dev/null && fsfreeze -u "${FSFROZEN}" 2> /dev/null); then dwarn "Could not fsfreeze $(dirname "$outfile")" fi unset FSFROZEN fi fi exit 0 dracut-ng-dracut-ng-3e4cfdd/install.d/000077500000000000000000000000001474727335100177435ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/install.d/50-dracut.install000077500000000000000000000046231474727335100230470ustar00rootroot00000000000000#!/bin/bash COMMAND="${1:?}" KERNEL_VERSION="${2:?}" #shellcheck disable=SC2034 BOOT_DIR_ABS="$3" KERNEL_IMAGE="$4" # If the initrd was provided on the kernel command line, we shouldn't generate our own. if [[ "$COMMAND" != "add" || "$#" -gt 4 ]]; then exit 0 fi # Do not attempt to create initramfs if the supplied image is already a UKI if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then exit 0 fi if [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" = "dracut" ]]; then # We are the initrd generator IMAGE="initrd" UEFI_OPTS="--no-uefi" else exit 0 fi if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then # We are chosen to generate the UKI as well as initrd IMAGE="uki.efi" UEFI_OPTS="--uefi" fi if [[ -f ${KERNEL_IMAGE%/*}/$IMAGE ]]; then # we found an initrd or uki.efi at the same place as the kernel # use this and don't generate a new one [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \ "There is an $IMAGE image at the same place as the kernel, skipping generating a new one" cp --reflink=auto "${KERNEL_IMAGE%/*}/$IMAGE" "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ && chown root:root "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ && chmod 0600 "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ && exit 0 fi if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline" fi elif [[ -f /etc/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline elif [[ -f /usr/lib/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline else declare -a BOOT_OPTIONS read -r -d '' -a line < /proc/cmdline for i in "${line[@]}"; do [[ ${i#initrd=*} != "$i" ]] && continue BOOT_OPTIONS+=("$i") done fi unset noimageifnotneeded for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do # shellcheck disable=SC1001 if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then noimageifnotneeded="yes" break fi done # shellcheck disable=SC2046 dracut -f \ --add-confdir hostonly \ ${noimageifnotneeded:+--noimageifnotneeded} \ $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \ $([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \ "$UEFI_OPTS" \ --kver "$KERNEL_VERSION" \ "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" || exit 1 dracut-ng-dracut-ng-3e4cfdd/install.d/51-dracut-rescue.install000077500000000000000000000114741474727335100243360ustar00rootroot00000000000000#!/bin/bash export LANG=C COMMAND="${1:?}" KERNEL_VERSION="${2:?}" BOOT_DIR_ABS="${3%/*}/0-rescue" KERNEL_IMAGE="$4" # If the initrd was provided on the kernel command line, we shouldn't generate our own. if [[ "$COMMAND" = "add" && "$#" -gt 4 ]]; then exit 0 fi # Do not attempt to create initramfs if the supplied image is already a UKI if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then exit 0 fi if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then # Rescue images currently not compatible with UKIs exit 0 elif [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]]; then # We are not the initrd generator exit 0 fi dropindirs_sort() { suffix=$1 shift args=("$@") files=$( while (($# > 0)); do for i in "${1}"/*"${suffix}"; do [[ -f $i ]] && echo "${i##*/}" done shift done | sort -Vu ) for f in $files; do for d in "${args[@]}"; do if [[ -f "$d/$f" ]]; then echo "$d/$f" continue 2 fi done done } if [[ -f /etc/os-release ]]; then . /etc/os-release elif [[ -f /usr/lib/os-release ]]; then . /usr/lib/os-release fi [[ -n $PRETTY_NAME ]] || PRETTY_NAME="Linux $KERNEL_VERSION" if [[ ${KERNEL_INSTALL_MACHINE_ID+x} ]]; then MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID elif [[ -f /etc/machine-id ]]; then read -r MACHINE_ID < /etc/machine-id fi if ! [[ $MACHINE_ID ]]; then exit 0 fi if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline" fi elif [[ -f /etc/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline elif [[ -f /usr/lib/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline else declare -a BOOT_OPTIONS read -r -d '' -a line < /proc/cmdline for i in "${line[@]}"; do [[ ${i#initrd=*} != "$i" ]] && continue BOOT_OPTIONS+=("$i") done fi if [[ -d ${BOOT_DIR_ABS%/*} ]]; then BOOT_DIR="/${MACHINE_ID}/0-rescue" BOOT_ROOT=${BOOT_DIR_ABS%"$BOOT_DIR"} LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf" KERNEL="linux" INITRD="initrd" else BLS_DIR="/boot/loader/entries" BOOT_DIR_ABS="/boot" LOADER_ENTRY="$BLS_DIR/${MACHINE_ID}-0-rescue.conf" KERNEL="vmlinuz-0-rescue-${MACHINE_ID}" INITRD="initramfs-0-rescue-${MACHINE_ID}.img" fi ret=0 case "$COMMAND" in add) if [[ -f $LOADER_ENTRY ]] && [[ -f "$BOOT_DIR_ABS/$KERNEL" ]] \ && [[ -f "$BOOT_DIR_ABS/$INITRD" ]]; then [[ $KERNEL_INSTALL_VERBOSE == 1 ]] \ && echo "Skipping, there is already a rescue image generated with the same input parameters" exit 0 fi # source our config dir for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do if [[ -e $f ]]; then # shellcheck disable=SC1090 . "$f" fi done if [[ $dracut_rescue_image != "yes" ]]; then [[ $KERNEL_INSTALL_VERBOSE == 1 ]] \ && echo "Skipping, 'dracut_rescue_image' not set to 'yes' in any dracut configuration file" exit 0 fi [[ -d $BOOT_DIR_ABS ]] || mkdir -p "$BOOT_DIR_ABS" if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2 fi if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then # shellcheck disable=SC2046 dracut -f \ --add-confdir rescue \ $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \ --kver "$KERNEL_VERSION" \ "$BOOT_DIR_ABS/$INITRD" ((ret += $?)) fi [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo "Creating $LOADER_ENTRY" if [[ ${BOOT_DIR_ABS} != "/boot" ]]; then { echo "title $PRETTY_NAME - Rescue Image" echo "version $KERNEL_VERSION" echo "machine-id $MACHINE_ID" echo "options ${BOOT_OPTIONS[*]}" echo "linux $BOOT_DIR/linux" echo "initrd $BOOT_DIR/initrd" } > "$LOADER_ENTRY" else if [[ -e "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" ]]; then cp -aT "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" "$LOADER_ENTRY" else cp -aT "${KERNEL_IMAGE%/*}/bls.conf" "$LOADER_ENTRY" fi sed -i "s/${KERNEL_VERSION}/0-rescue-${MACHINE_ID}/" "$LOADER_ENTRY" fi ((ret += $?)) ;; remove) exit 0 ;; esac exit $ret dracut-ng-dracut-ng-3e4cfdd/lsinitrd.sh000077500000000000000000000375161474727335100202560ustar00rootroot00000000000000#!/bin/bash # # Copyright 2005-2010 Harald Hoyer # Copyright 2005-2010 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # usage() { { echo "Usage: ${0##*/} [options] [ [ [ [...] ]]]" echo "Usage: ${0##*/} [options] -k " echo echo "-h, --help print a help message and exit." echo "-s, --size sort the contents of the initramfs by size." echo "-m, --mod list modules." echo "-f, --file print the contents of ." echo "--unpack unpack the initramfs, instead of displaying the contents." echo " If optional filenames are given, will only unpack specified files," echo " else the whole image will be unpacked. Won't unpack anything from early cpio part." echo "--unpackearly unpack the early microcode part of the initramfs." echo " Same as --unpack, but only unpack files from early cpio part." echo "-v, --verbose unpack verbosely." echo "-k, --kver inspect the initramfs of ." echo } >&2 } [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut sorted=0 modules=0 unset verbose declare -A filenames unset POSIXLY_CORRECT TEMP=$(getopt \ -o "vshmf:k:" \ --long kver: \ --long file: \ --long mod \ --long help \ --long size \ --long unpack \ --long unpackearly \ --long verbose \ -- "$@") # shellcheck disable=SC2181 if (($? != 0)); then usage exit 1 fi eval set -- "$TEMP" while (($# > 0)); do case $1 in -k | --kver) KERNEL_VERSION="$2" shift ;; -f | --file) filenames[${2#/}]=1 shift ;; -s | --size) sorted=1 ;; -h | --help) usage exit 0 ;; -m | --mod) modules=1 ;; -v | --verbose) verbose="--verbose" ;; --unpack) unpack=1 ;; --unpackearly) unpackearly=1 ;; --) shift break ;; *) usage exit 1 ;; esac shift done if ! [[ $KERNEL_VERSION ]]; then if type -P systemd-detect-virt &> /dev/null && systemd-detect-virt -c &> /dev/null; then # shellcheck disable=SC2012 KERNEL_VERSION="$(cd /lib/modules && ls -1 | tail -1)" # shellcheck disable=SC2012 [[ $KERNEL_VERSION ]] || KERNEL_VERSION="$(cd /usr/lib/modules && ls -1 | tail -1)" fi [[ $KERNEL_VERSION ]] || KERNEL_VERSION="$(uname -r)" fi find_initrd_for_kernel_version() { local kernel_version="$1" local base_path files initrd machine_id if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then machine_id="Default" elif [[ -s /etc/machine-id ]]; then read -r machine_id < /etc/machine-id [[ $machine_id == "uninitialized" ]] && machine_id="Default" else machine_id="Default" fi if [ -n "$machine_id" ]; then for base_path in /efi /boot /boot/efi; do initrd="${base_path}/${machine_id}/${kernel_version}/initrd" if [ -f "$initrd" ]; then echo "$initrd" return fi done fi if [[ -f /lib/modules/${kernel_version}/initrd ]]; then echo "/lib/modules/${kernel_version}/initrd" elif [[ -f /lib/modules/${kernel_version}/initramfs.img ]]; then echo "/lib/modules/${kernel_version}/initramfs.img" elif [[ -f /boot/initramfs-${kernel_version}.img ]]; then echo "/boot/initramfs-${kernel_version}.img" elif [[ -f /usr/lib/modules/${kernel_version}/initramfs.img ]]; then echo "/usr/lib/modules/${kernel_version}/initramfs.img" else files=(/boot/initr*"${kernel_version}"*) if [ "${#files[@]}" -ge 1 ] && [ -e "${files[0]}" ]; then echo "${files[0]}" fi fi } if [[ $1 ]]; then image="$1" if ! [[ -f $image ]]; then { echo "$image does not exist" echo } >&2 usage exit 1 fi else image=$(find_initrd_for_kernel_version "$KERNEL_VERSION") fi shift while (($# > 0)); do filenames[${1#/}]=1 shift done if ! [[ -f $image ]]; then { echo "No specified and the default image '$image' cannot be accessed!" echo } >&2 usage exit 1 fi TMPDIR="$(mktemp -d -t lsinitrd.XXXXXX)" # shellcheck disable=SC2064 trap "rm -rf '$TMPDIR'" EXIT dracutlibdirs() { for d in lib64/dracut lib/dracut usr/lib64/dracut usr/lib/dracut; do echo "$d/$1" done } SQUASH_TMPFILE="" SQUASH_EXTRACT="$TMPDIR/squash-extract" extract_squash_img() { local _img _tmp [[ $SQUASH_TMPDIR == none ]] && return 1 [[ -s $SQUASH_TMPFILE ]] && return 0 # Before dracut 104 the image was named squash-root.img. Keep the old name # so newer versions of lsinitrd can inspect initrds build with older dracut # versions. for _img in squash-root.img squashfs-root.img erofs-root.img; do _tmp="$TMPDIR/$_img" $CAT "$image" 2> /dev/null | cpio --extract --verbose --quiet --to-stdout -- \ $_img > "$_tmp" 2> /dev/null [[ -s $_tmp ]] || continue SQUASH_TMPFILE="$_tmp" # fsck.erofs doesn't allow extracting single files or listing the # content of the image. So always extract the full image. if [[ $_img == erofs-root.img ]]; then mkdir -p "$SQUASH_EXTRACT" fsck.erofs --extract="$SQUASH_EXTRACT/erofs-root" --overwrite "$SQUASH_TMPFILE" 2> /dev/null ((ret += $?)) fi break done if [[ -z $SQUASH_TMPFILE ]]; then SQUASH_TMPFILE=none return 1 fi return 0 } extract_files() { local nofileinfo ((${#filenames[@]} == 1)) && nofileinfo=1 for f in "${!filenames[@]}"; do [[ $nofileinfo ]] || echo "initramfs:/$f" [[ $nofileinfo ]] || echo "========================================================================" # shellcheck disable=SC2001 [[ $f == *"\\x"* ]] && f=$(echo "$f" | sed 's/\\x.\{2\}/????/g') case $f in squashfs-root/*) extract_squash_img unsquashfs -force -d "$SQUASH_EXTRACT" -no-progress "$SQUASH_TMPFILE" "${f#squashfs-root/}" &> /dev/null ((ret += $?)) cat "$SQUASH_EXTRACT/${f#squashfs-root/}" 2> /dev/null ;; erofs-root/*) extract_squash_img cat "$SQUASH_EXTRACT/$f" 2> /dev/null ;; *) $CAT "$image" 2> /dev/null | cpio --extract --verbose --quiet --to-stdout "$f" 2> /dev/null ((ret += $?)) ;; esac [[ $nofileinfo ]] || echo "========================================================================" [[ $nofileinfo ]] || echo done } list_modules() { echo "dracut modules:" # shellcheck disable=SC2046 $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \ $(dracutlibdirs modules.txt) 2> /dev/null ((ret += $?)) } list_files() { echo "========================================================================" if [ "$sorted" -eq 1 ]; then $CAT "$image" 2> /dev/null | cpio --extract --verbose --quiet --list | sort -n -k5 else $CAT "$image" 2> /dev/null | cpio --extract --verbose --quiet --list | sort -k9 fi ((ret += $?)) echo "========================================================================" } list_squash_content() { extract_squash_img || return 0 echo "Squashed content (${SQUASH_TMPFILE##*/}):" echo "========================================================================" case $SQUASH_TMPFILE in */squash-root.img | */squashfs-root.img) unsquashfs -ll "$SQUASH_TMPFILE" | tail -n +4 ;; */erofs-root.img) ( cd "$SQUASH_EXTRACT" || return 1 find erofs-root/ -ls ) ;; esac echo "========================================================================" } list_cmdline() { echo "dracut cmdline:" # shellcheck disable=SC2046 $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \ etc/cmdline.d/\*.conf 2> /dev/null ((ret += $?)) extract_squash_img || return 0 case $SQUASH_TMPFILE in */squash-root.img | */squashfs-root.img) unsquashfs -force -d "$SQUASH_EXTRACT" -no-progress "$SQUASH_TMPFILE" etc/cmdline.d/\*.conf &> /dev/null ((ret += $?)) cat "$SQUASH_EXTRACT"/etc/cmdline.d/*.conf 2> /dev/null ;; */erofs-root.img) cat "$SQUASH_EXTRACT"/erofs-root/etc/cmdline.d/*.conf 2> /dev/null ;; esac } unpack_files() { if ((${#filenames[@]} > 0)); then for f in "${!filenames[@]}"; do # shellcheck disable=SC2001 [[ $f == *"\\x"* ]] && f=$(echo "$f" | sed 's/\\x.\{2\}/????/g') case $f in squashfs-root/*) extract_squash_img || continue unsquashfs -force -d "squashfs-root" -no-progress "$SQUASH_TMPFILE" "${f#squashfs-root/}" > /dev/null ((ret += $?)) ;; erofs-root/*) extract_squash_img || continue mkdir -p "${f%/*}" cp -rf "$SQUASH_EXTRACT/$f" "$f" ;; *) $CAT "$image" 2> /dev/null | cpio -id --quiet $verbose "$f" ((ret += $?)) ;; esac done else $CAT "$image" 2> /dev/null | cpio -id --quiet $verbose ((ret += $?)) extract_squash_img || return 0 case $SQUASH_TMPFILE in */squash-root.img | */squashfs-root.img) unsquashfs -d "squashfs-root" -no-progress "$SQUASH_TMPFILE" > /dev/null ((ret += $?)) ;; */erofs-root.img) cp -rf "$SQUASH_EXTRACT/erofs-root" . ;; esac fi } read -r -N 2 bin < "$image" if [ "$bin" = "MZ" ]; then command -v objcopy > /dev/null || { echo "Need 'objcopy' to unpack an UEFI executable." exit 1 } objcopy \ --dump-section .linux="$TMPDIR/vmlinuz" \ --dump-section .initrd="$TMPDIR/initrd.img" \ --dump-section .cmdline="$TMPDIR/cmdline.txt" \ --dump-section .osrel="$TMPDIR/osrel.txt" \ "$image" /dev/null uefi="$image" image="$TMPDIR/initrd.img" [ -f "$image" ] || exit 1 fi if ((${#filenames[@]} <= 0)) && [[ -z $unpack ]] && [[ -z $unpackearly ]]; then if [ -n "$uefi" ]; then echo -n "initrd in UEFI: $uefi: " du -h "$image" | while read -r a _ || [ -n "$a" ]; do echo "$a"; done if [ -f "$TMPDIR/osrel.txt" ]; then name=$(sed -En '/^PRETTY_NAME/ s/^\w+=["'"'"']?([^"'"'"'$]*)["'"'"']?/\1/p' "$TMPDIR/osrel.txt") id=$(sed -En '/^ID/ s/^\w+=["'"'"']?([^"'"'"'$]*)["'"'"']?/\1/p' "$TMPDIR/osrel.txt") build=$(sed -En '/^BUILD_ID/ s/^\w+=["'"'"']?([^"'"'"'$]*)["'"'"']?/\1/p' "$TMPDIR/osrel.txt") echo "OS Release: $name (${id}-${build})" fi if [ -f "$TMPDIR/vmlinuz" ]; then version=$(strings -n 20 "$TMPDIR/vmlinuz" | sed -En '/[0-9]+\.[0-9]+\.[0-9]+/ { p; q 0 }') echo "Kernel Version: $version" fi if [ -f "$TMPDIR/cmdline.txt" ]; then echo "Command line:" sed -En 's/\s+/\n/g; s/\x00/\n/; p' "$TMPDIR/cmdline.txt" fi else echo -n "Image: $image: " du -h "$image" | while read -r a _ || [ -n "$a" ]; do echo "$a"; done fi echo "========================================================================" fi read -r -N 6 bin < "$image" case $bin in $'\x71\xc7'* | 070701) CAT="cat --" is_early=$(cpio --extract --verbose --quiet --to-stdout -- 'early_cpio' < "$image" 2> /dev/null) # Debian mkinitramfs does not create the file 'early_cpio', so let's check if firmware files exist [[ "$is_early" ]] || is_early=$(cpio --list --verbose --quiet --to-stdout -- 'kernel/*/microcode/*.bin' < "$image" 2> /dev/null) if [[ "$is_early" ]]; then if [[ -n $unpack ]]; then # should use --unpackearly for early CPIO : elif [[ -n $unpackearly ]]; then unpack_files elif ((${#filenames[@]} > 0)); then extract_files else echo "Early CPIO image" list_files fi if [[ -f "$dracutbasedir/src/skipcpio/skipcpio" ]]; then SKIP="$dracutbasedir/src/skipcpio/skipcpio" else SKIP="$dracutbasedir/skipcpio" fi if ! [[ -x $SKIP ]]; then echo echo "'$SKIP' not found, cannot display remaining contents!" >&2 echo exit 0 fi fi ;; esac if [[ $SKIP ]]; then bin="$($SKIP "$image" | { read -r -N 6 bin && echo "$bin"; })" else read -r -N 6 bin < "$image" fi case $bin in $'\x1f\x8b'*) CAT="zcat --" ;; BZh*) CAT="bzcat --" ;; $'\x71\xc7'* | 070701) CAT="cat --" ;; $'\x02\x21'*) CAT="lz4 -d -c" ;; $'\x89'LZO$'\0'*) CAT="lzop -d -c" ;; $'\x28\xB5\x2F\xFD'*) CAT="zstd -d -c" ;; *) if echo "test" | xz | xzcat --single-stream > /dev/null 2>&1; then CAT="xzcat --single-stream --" else CAT="xzcat --" fi ;; esac type "${CAT%% *}" > /dev/null 2>&1 || { echo "Need '${CAT%% *}' to unpack the initramfs." exit 1 } # shellcheck disable=SC2317 # assigned to CAT and $CAT called later skipcpio() { $SKIP "$@" | $ORIG_CAT } if [[ $SKIP ]]; then ORIG_CAT="$CAT" CAT=skipcpio fi if ((${#filenames[@]} > 1)); then TMPFILE="$TMPDIR/initrd.cpio" $CAT "$image" 2> /dev/null > "$TMPFILE" # shellcheck disable=SC2317 # assigned to CAT and $CAT called later pre_decompress() { cat "$TMPFILE" } CAT=pre_decompress fi ret=0 if [[ -n $unpack ]]; then unpack_files elif ((${#filenames[@]} > 0)); then extract_files else # shellcheck disable=SC2046 version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \ $(dracutlibdirs 'dracut-*') 2> /dev/null) ((ret += $?)) echo "Version: $version" echo if [ "$modules" -eq 1 ]; then list_modules echo "========================================================================" else echo -n "Arguments: " # shellcheck disable=SC2046 $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \ $(dracutlibdirs build-parameter.txt) 2> /dev/null echo list_modules list_files list_squash_content echo list_cmdline fi fi exit "$ret" dracut-ng-dracut-ng-3e4cfdd/man/000077500000000000000000000000001474727335100166265ustar00rootroot00000000000000dracut-ng-dracut-ng-3e4cfdd/man/asciidoc.conf000066400000000000000000000037001474727335100212530ustar00rootroot00000000000000## man: macro # # Usage: man:command[manpage-section] # # Note, {0} is the manpage section, while {target} is the command. # # Show man link as: (
); if section is defined, else just show # the command. # # NOTE(ianw): lightly modified from # https://github.com/git/git/blob/master/Documentation/asciidoc.conf#L10 [macros] (?su)[\\]?(?Pman):(?P\S*?)\[(?P.*?)(,external)?\]= [attributes] asterisk=* plus=+ caret=^ startsb=[ endsb=] backslash=\ tilde=~ apostrophe=' backtick=` litdd=-- ifdef::backend-docbook[] [man-inlinemacro] {0%{target}} {0#} {0#{target}{0}} {0#} endif::backend-docbook[] ifdef::backend-docbook[] ifdef::doctype-manpage[] # The following two small workarounds insert a simple paragraph after screen [listingblock] {title} | {title#} [verseblock] {title} {title%} {title#} | {title#} {title%} endif::doctype-manpage[] endif::backend-docbook[] ifdef::doctype-manpage[] ifdef::backend-docbook[] [header] template::[header-declarations] {mantitle} {manvolnum} {mansource} {manversion} {manmanual} {manname} {manpurpose} endif::backend-docbook[] endif::doctype-manpage[] ifdef::backend-xhtml11[] [attributes] git-relative-html-prefix= [man-inlinemacro] {target}{0?({0})} endif::backend-xhtml11[] dracut-ng-dracut-ng-3e4cfdd/man/dracut-catimages.8.adoc000066400000000000000000000024611474727335100230440ustar00rootroot00000000000000DRACUT-CATIMAGES(8) =================== :doctype: manpage :man source: dracut :man manual: dracut NAME ---- dracut-catimages - creates initial ramdisk image by concatenating images SYNOPSIS -------- **dracut-catimages** [_OPTION_...] __ [__...] DESCRIPTION ----------- dracut-catimages creates an initial ramdisk image by concatenating several images from the command line and /boot/dracut/*.img OPTIONS ------- **-f, --force**:: overwrite existing initramfs file. **-i, --imagedir**:: Directory with additional images to add (default: /boot/dracut/) **-o, --overlaydir**:: Overlay directory, which contains additional files that will be used to create an additional image **--nooverlay**:: Do not use the overlay directory **--noimagedir**:: Do not use the additional image directory **-h, --help**:: display help text and exit. **--debug**:: output debug information of the build process **-v, --verbose**:: verbose output during the build process FILES ----- _/boot/dracut/*.img_:: images to work with AUTHORS ------- Harald Hoyer AVAILABILITY ------------ The dracut-catimages command is part of the dracut package and is available from link:$$https://github.com/dracut-ng/dracut-ng$$[https://github.com/dracut-ng/dracut-ng] SEE ALSO -------- man:dracut[8] dracut-ng-dracut-ng-3e4cfdd/man/dracut.8.adoc000066400000000000000000000607061474727335100211170ustar00rootroot00000000000000DRACUT(8) ========= :doctype: manpage :man source: dracut :man manual: dracut :man version: {version} NAME ---- dracut - low-level tool for generating an initramfs/initrd image SYNOPSIS -------- *dracut* [__OPTION...__] [____ [____]] DESCRIPTION ----------- Create an initramfs for the kernel with the version . If is omitted, then the version of the actual running kernel is used. If is omitted or empty, the default location will be determined by the local configuration or Linux distribution policy. dracut creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem, mounting the root filesystem and booting into the real system. At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system. All finding of the root device happens in this early userspace. Initramfs images are also called "initrd". For a complete list of kernel command line options see man:dracut.cmdline[7]. If you are dropped to an emergency shell, while booting your initramfs, the file _/run/initramfs/rdsosreport.txt_ is created, which can be saved to a (to be mounted by hand) partition (usually /boot) or a USB stick. Additional debugging info can be produced by adding **rd.debug** to the kernel command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools. It should be attached to any report about dracut problems. USAGE ----- include::dracut.usage.adoc[] OPTIONS ------- **--kver** __:: Set the kernel version. This enables to specify the kernel version, without specifying the location of the initramfs image. For example: ---- # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64 ---- **-f, --force**:: Overwrite existing initramfs file. __ **--rebuild**:: Append the current arguments to those with which the input initramfs image was built. This option helps in incrementally building the initramfs for testing. If optional __ is not provided, the input initramfs provided to rebuild will be used as output file. **-a, --add** __:: Add a space-separated list of dracut modules to the default set of modules. If a module appears in both _add_ and _omit_ lists, it will be omitted. This parameter can be specified multiple times. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --add "module1 module2" ... ---- =============================== **--force-add** __:: A space-separated list of dracut modules appended to the default set of modules when _host-only_ (`-H`) mode is specified. Unlike `--add`, `--force-add` will _override_ omittied (`-o`) modules; it is thus useful to ensure that a module is added even if it is specified as omitted in configuration files. This parameter can be specified multiple times. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --force-add "module1 module2" ... ---- =============================== **-o, --omit** __:: Omit a space-separated list of dracut modules. This parameter can be specified multiple times. Warning: Avoid manually omitting dracut modules, as you may inadvertently remove essential ones that dracut can't detect or warn you about. Using this option is not recommended and is at your own risk. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --omit "module1 module2" ... ---- =============================== **-m, --modules** __:: Specify a space-separated list of dracut modules to call when building the initramfs. Modules are located in _/usr/lib/dracut/modules.d_. This parameter can be specified multiple times. This option forces dracut to only include the specified dracut modules. In most cases the "--add" option is what you want to use. This option is not recommended to use (use at your own risk). + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --modules "module1 module2" ... ---- =============================== **-d, --drivers** __:: Specify a space-separated list of kernel modules to exclusively include in the initramfs. The kernel modules have to be specified without the ".ko" suffix. This parameter can be specified multiple times. This option forces dracut to only include the specified kernel modules. In most cases the "--add-drivers" option is what you want to use. This option is not recommended to use (use at your own risk). + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --drivers "kmodule1 kmodule2" ... ---- =============================== **--add-drivers** __:: Specify a space-separated list of kernel modules to add to the initramfs. The kernel modules have to be specified without the ".ko" suffix. This parameter can be specified multiple times. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --add-drivers "kmodule1 kmodule2" ... ---- =============================== **--force-drivers** __:: See add-drivers above. But in this case it is ensured that the drivers are tried to be loaded early via modprobe. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --force-drivers "kmodule1 kmodule2" ... ---- =============================== **--omit-drivers** __:: Specify a space-separated list of kernel modules not to add to the initramfs. The kernel modules have to be specified without the ".ko" suffix. This parameter can be specified multiple times. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --omit-drivers "kmodule1 kmodule2" ... ---- =============================== **--filesystems** __:: Specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. This parameter can be specified multiple times. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --filesystems "filesystem1 filesystem2" ... ---- =============================== **-k, --kmoddir** __:: Specify the directory, where to look for kernel modules. **--fwdir** _[:...]++_:: Specify additional directories, where to look for firmwares. This parameter can be specified multiple times. **--libdirs** __:: Specify a space-separated list of directories to look for libraries to include in the generic initramfs. This parameter can be specified multiple times. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --libdirs "dir1 dir2" ... ---- =============================== **--kernel-cmdline **:: Specify default kernel command line parameters. Despite its name, this command only sets initrd parameters. **--kernel-only**:: Only install kernel drivers and firmware files. **--no-kernel**:: Do not install kernel drivers and firmware files. **--early-microcode**:: Combine early microcode with ramdisk. **--no-early-microcode**:: Do not combine early microcode with ramdisk. **--print-cmdline**:: Print part of the kernel command line required to boot for the current disk layout. This option does not return all kernel command line options that dracut might add to the initrd. **--mdadmconf**:: Include local _/etc/mdadm.conf_ file. **--nomdadmconf**:: Do not include local _/etc/mdadm.conf_ file. **--lvmconf**:: Include local _/etc/lvm/lvm.conf_ file. **--nolvmconf**:: Do not include local _/etc/lvm/lvm.conf_ file. **--fscks** __:: Add a space-separated list of fsck tools, in addition to _dracut.conf_'s specification; the installation is opportunistic (non-existing tools are ignored). + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --fscks "fsck.foo barfsck" ... ---- =============================== **--nofscks**:: Inhibit installation of any fsck tools. **--strip**:: Strip binaries in the initramfs (default). **--aggressive-strip**:: Strip more than just debug symbol and sections, for a smaller initramfs build. The --strip option must also be specified. **--nostrip**:: Do not strip binaries in the initramfs. **--hardlink**:: Hardlink files in the initramfs (default). **--nohardlink**:: Do not hardlink files in the initramfs. **--prefix** __:: Prefix initramfs files with the specified directory. **--noprefix**:: Do not prefix initramfs files (default). **-h, --help**:: Display help text and exit. **--debug**:: Output debug information of the build process. **-v, --verbose**:: Increase verbosity level (default is info(4)). **--version**:: Display version and exit. **-q, --quiet**:: Decrease verbosity level (default is info(4)). **-c, --conf** __:: Specify configuration file to use. + Default: _/etc/dracut.conf_ **--confdir** __:: Specify configuration directory to use. + Default: _/etc/dracut.conf.d_ **--add-confdir** __:: Add an extra configuration directory to use *.conf files from. If the directory is not existed, will look for subdirectory under confdir. + Default: _empty_ **--tmpdir** __:: Specify temporary directory to use. + Default: _/var/tmp_ **-r, --sysroot** __:: Specify the sysroot directory to collect files from. This is useful to create the initramfs image from a cross-compiled sysroot directory. For the extra helper variables, see *ENVIRONMENT* below. + Default: _empty_ **--sshkey** __:: SSH key file used with ssh-client module. **--logfile** __:: Logfile to use; overrides any setting from the configuration files. + Default: _/var/log/dracut.log_ **-l, --local**:: Activates the local mode. dracut will use modules from the current working directory instead of the system-wide installed modules in _/usr/lib/dracut/modules.d_. This is useful when running dracut from a git checkout. **-H, --hostonly**:: Host-only mode: Install only what is needed for booting the local host instead of a generic host and generate host-specific configuration. + [WARNING] ==== If chrooted to another root other than the real root device, use "--fstab" and provide a valid _/etc/fstab_. ==== **-N, --no-hostonly**:: Disable host-only mode. **--hostonly-mode __**:: Specify the host-only mode to use. __ could be one of "sloppy" or "strict". In "sloppy" host-only mode, extra drivers and modules will be installed, so minor hardware change won't make the image unbootable (e.g. changed keyboard), and the image is still portable among similar hosts. With "strict" mode enabled, anything not necessary for booting the local host in its current state will not be included, and modules may do some extra job to save more space. Minor change of hardware or environment could make the image unbootable. + Default: _sloppy_ **--hostonly-cmdline**:: Store kernel command line arguments needed in the initramfs. **--no-hostonly-cmdline**:: Do not store kernel command line arguments needed in the initramfs. **--no-hostonly-default-device**:: Do not generate implicit host devices like root, swap, fstab, etc. Use "--mount" or "--add-device" to explicitly add devices as needed. **--hostonly-i18n**:: Install only needed keyboard and font files according to the host configuration (default). **--no-hostonly-i18n**:: Install all keyboard and font files available. **--hostonly-nics** __:: Only enable listed NICs in the initramfs. The list can be empty, so other modules can install only the necessary network drivers. **--persistent-policy** __:: Use __ to address disks and partitions. __ can be any directory name found in /dev/disk (e.g. "by-uuid", "by-label"), or "mapper" to use /dev/mapper device names (default). **--fstab**:: Use _/etc/fstab_ instead of _/proc/self/mountinfo_. **--add-fstab** __:: Add entries of __ to the initramfs /etc/fstab. **--mount** "__ __ __ [__ [__ [__]]]":: Mount __ on __ with __ in the initramfs. __, __ and __ can be specified, see fstab manpage for the details. The default __ is "defaults". The default __ is "0". The default __ is "2". **--mount** "__":: Like above, but __, __ and __ are determined by looking at the current mounts. **--add-device** __ :: Bring up __ in initramfs, __ should be the device name. This can be useful in host-only mode for resume support when your swap is on LVM or an encrypted partition. [NB --device can be used for compatibility with earlier releases] **-i, --include** __ __:: Include the files in the SOURCE directory into the TARGET directory in the final initramfs. If SOURCE is a file, it will be installed to TARGET in the final initramfs. This parameter can be specified multiple times. **-I, --install** __:: Install the space separated list of files into the initramfs. + [NOTE] =============================== If the list has multiple arguments, then you have to put these in quotes. For example: ---- # dracut --install "/bin/foo /sbin/bar" ... ---- =============================== **--install-optional** __:: Install the space separated list of files into the initramfs, if they exist. **--gzip**:: Compress the generated initramfs using gzip. + [WARNING] ==== Make sure your kernel has gzip decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=gzip -9". ==== **--bzip2**:: Compress the generated initramfs using bzip2. + [WARNING] ==== Make sure your kernel has bzip2 decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=bzip2 -9". ==== **--lzma**:: Compress the generated initramfs using lzma. + [WARNING] ==== Make sure your kernel has lzma decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=lzma -9 -T0". ==== **--xz**:: Compress the generated initramfs using xz. + [WARNING] ==== Make sure your kernel has xz decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=xz --check=crc32 --lzma2=dict=1MiB -T0". ==== **--lzo**:: Compress the generated initramfs using lzop. + [WARNING] ==== Make sure your kernel has lzo decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=lzop -9". ==== **--lz4**:: Compress the generated initramfs using lz4. + [WARNING] ==== Make sure your kernel has lz4 decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=lz4 -l -9". ==== **--zstd**:: Compress the generated initramfs using Zstandard. + [WARNING] ==== Make sure your kernel has zstd decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=zstd -15 -q -T0". ==== **--compress** __:: Compress the generated initramfs using the passed compression program. If you pass it just the name of a compression program, it will call that program with known-working arguments. If you pass a quoted string with arguments, it will be called with exactly those arguments. Depending on what you pass, this may result in an initramfs that the kernel cannot decompress. The default value can also be set via the _INITRD_COMPRESS_ environment variable. **--squash-compressor** __:: Compress the squashfs image using the passed compressor and compressor specific options for mksquashfs. You can refer to mksquashfs manual for supported compressors and compressor specific options. If squash module is not called when building the initramfs, this option will not take effect. **--no-compress**:: Do not compress the generated initramfs. This will override any other compression options. **--reproducible**:: Create reproducible images. **--no-reproducible**:: Do not create reproducible images. **--list-modules**:: List all available dracut modules. **-M, --show-modules**:: Print included module's name to standard output during build. **--keep**:: Keep the initramfs temporary directory for debugging purposes. **--printsize**:: Print out the module install size. **--profile**:: Output profile information of the build process. **--ro-mnt**:: Mount / and /usr read-only by default. **-L, --stdlog** __:: [0-6] Specify logging level (to standard error). ---- 0 - suppress any messages 1 - only fatal errors 2 - all errors 3 - warnings 4 - info 5 - debug info (here starts lots of output) 6 - trace info (and even more) ---- **--regenerate-all**:: Regenerate all initramfs images at the default location with the kernel versions found on the system. Additional parameters are passed through. **-p, --parallel**:: Try to execute tasks in parallel. Currently only supported with **--regenerate-all** (build initramfs images for all kernel versions simultaneously). **--noimageifnotneeded**:: Do not create an image in host-only mode, if no kernel driver is needed and no /etc/cmdline/*.conf will be generated into the initramfs. **--loginstall __**:: Log all files installed from the host to __. **--uefi**:: Instead of creating an initramfs image, dracut will create an UEFI executable, which can be executed by an UEFI BIOS. The default output filename is _/EFI/Linux/linux-$kernel$--.efi_. might be _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP partition is mounted. The is taken from BUILD_ID in _/usr/lib/os-release_ or if it exists _/etc/os-release_ and is left out, if BUILD_ID is non-existent or empty. **--no-uefi**:: Disables UEFI mode. **--no-machineid**:: Affects the default output filename of **--uefi** and will discard the part. **--uefi-stub __**:: Specifies the UEFI stub loader, which will load the attached kernel, initramfs and kernel command line and boots the kernel. The default is _$prefix/lib/systemd/boot/efi/linux.efi.stub_. **--uefi-splash-image __**:: Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**) image format. **--kernel-image __**:: Specifies the kernel image, which to include in the UEFI executable. The default is _/lib/modules//vmlinuz_ or _/boot/vmlinuz-_. **--sbat **:: Specifies the SBAT parameters, which to include in the UEFI executable. By default the default SBAT string added is "sbat,1,SBAT Version,sbat,1, https://github.com/rhboot/shim/blob/main/SBAT.md". **--enhanced-cpio**:: Attempt to use the dracut-cpio binary, which optimizes archive creation for copy-on-write filesystems by using the man:copy_file_range[2] syscall via Rust's io::copy(). When specified, initramfs archives are also padded to ensure optimal data alignment for extent sharing. To retain reflink data deduplication benefits, this should be used alongside the **--no-compress** and **--nostrip** parameters, with initramfs source files, **--tmpdir** staging area and destination all on the same copy-on-write capable filesystem. ENVIRONMENT ----------- _INITRD_COMPRESS_:: sets the default compression program. See **--compress**. _DRACUT_LDCONFIG_:: sets the _ldconfig_ program path and options. Optional. Used for **--sysroot**. + Default: _ldconfig_ _DRACUT_LDD_:: sets the _ldd_ program path and options. Optional. Used for **--sysroot**. + Default: _ldd_ _DRACUT_TESTBIN_:: sets the initially tested binary for detecting library paths. Optional. Used for **--sysroot**. In the cross-compiled sysroot, the default value (_/bin/sh_) is unusable, as it is an absolute symlink and points outside the sysroot directory. + Default: _/bin/sh_ _DRACUT_INSTALL_:: overrides path and options for executing _dracut-install_ internally. Optional. Can be used to debug _dracut-install_ while running the main dracut script. + Default: _dracut-install_ + Example: DRACUT_INSTALL="valgrind dracut-install" _DRACUT_COMPRESS_BZIP2_:: _DRACUT_COMPRESS_LBZIP2_:: _DRACUT_COMPRESS_LZMA_:: _DRACUT_COMPRESS_XZ_:: _DRACUT_COMPRESS_GZIP_:: _DRACUT_COMPRESS_PIGZ_:: _DRACUT_COMPRESS_LZOP_:: _DRACUT_COMPRESS_ZSTD_:: _DRACUT_COMPRESS_LZ4_:: _DRACUT_COMPRESS_CAT_:: overrides for compression utilities to support using them from non-standard paths. + Default values are the default compression utility names to be found in **PATH**. _DRACUT_ARCH_:: overrides the value of **uname -m**. Used for **--sysroot**. + Default: _empty_ (the value of **uname -m** on the host system) _SYSTEMD_VERSION_:: overrides systemd version. Used for **--sysroot**. _SYSTEMCTL_:: overrides the systemctl binary. Used for **--sysroot**. _NM_VERSION_:: overrides the NetworkManager version. Used for **--sysroot**. _DRACUT_INSTALL_PATH_:: overrides **PATH** environment for **dracut-install** to look for binaries relative to **--sysroot**. In a cross-compiled environment (e.g. Yocto), PATH points to natively built binaries that are not in the host's /bin, /usr/bin, etc. **dracut-install** still needs plain /bin and /usr/bin that are relative to the cross-compiled sysroot. + Default: _PATH_ _DRACUT_INSTALL_LOG_TARGET_:: overrides **DRACUT_LOG_TARGET** for **dracut-install**. It allows running **dracut-install* to run with different log target that **dracut** runs with. + Default: _DRACUT_LOG_TARGET_ _DRACUT_INSTALL_LOG_LEVEL_:: overrides **DRACUT_LOG_LEVEL** for **dracut-install**. It allows running **dracut-install* to run with different log level that **dracut** runs with. + Default: _DRACUT_LOG_LEVEL_ FILES ----- _/var/log/dracut.log_:: logfile of initramfs image creation _/tmp/dracut.log_:: logfile of initramfs image creation, if _/var/log/dracut.log_ is not writable _/etc/dracut.conf_:: see dracut.conf5 _/etc/dracut.conf.d/*.conf_:: see dracut.conf5 _/usr/lib/dracut/dracut.conf.d/*.conf_:: see dracut.conf5 Configuration in the initramfs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _/etc/conf.d/_:: Any files found in _/etc/conf.d/_ will be sourced in the initramfs to set initial values. Command line options will override these values set in the configuration files. _/etc/cmdline_:: Can contain additional command line options. Deprecated, better use /etc/cmdline.d/*.conf. _/etc/cmdline.d/*.conf_:: Can contain additional command line options. AVAILABILITY ------------ The dracut command is part of the dracut package and is available from link:$$https://github.com/dracut-ng/dracut-ng$$[https://github.com/dracut-ng/dracut-ng] AUTHORS ------- Harald Hoyer Victor Lowther Amadeusz Żołnowski Hannes Reinecke Daniel Molkentin Will Woods Philippe Seewer Warren Togami SEE ALSO -------- man:dracut.cmdline[7] man:dracut.conf[5] man:lsinitrd[1] dracut-ng-dracut-ng-3e4cfdd/man/dracut.bootup.7.adoc000066400000000000000000000140441474727335100224170ustar00rootroot00000000000000DRACUT.BOOTUP(7) ================ :doctype: manpage :man source: dracut :man manual: dracut :man version: {version} NAME ---- dracut.bootup - boot ordering in the initramfs DESCRIPTION ----------- This flow chart illustrates the ordering of the services, if systemd is used in the dracut initramfs. ---- systemd-journal.socket | v dracut-cmdline.service | v dracut-pre-udev.service | v systemd-udevd.service | v local-fs-pre.target dracut-pre-trigger.service | | v v (various mounts) (various swap systemd-udev-trigger.service | devices...) | (various low-level (various low-level | | | services: seed, API VFS mounts: v v v tmpfiles, random mqueue, configfs, local-fs.target swap.target dracut-initqueue.service sysctl, ...) debugfs, ...) | | | | | \_______________|____________________ | ___________________|____________________/ \|/ v sysinit.target | _________________/|\___________________ / | \ | | | v | v (various | rescue.service sockets...) | | | | v v | rescue.target sockets.target | | | \_________________ | emergency.service \| | v v basic.target emergency.target | ______________________/| / | | v | initrd-root-device.target | | | v | dracut-pre-mount.service | | | v | sysroot.mount | | | v | initrd-root-fs.target (custom initrd services) | | v | dracut-mount.service | | | v | initrd-parse-etc.service | | | v | (sysroot-usr.mount and | various mounts marked | with fstab option | x-initrd.mount) | | | v | initrd-fs.target \______________________ | \| v initrd.target | v dracut-pre-pivot.service | v initrd-cleanup.service isolates to initrd-switch-root.target | v ______________________/| / | | initrd-udevadm-cleanup-db.service | | (custom initrd services) | | | \______________________ | \| v initrd-switch-root.target | v initrd-switch-root.service | v switch-root ---- AUTHOR ------ Harald Hoyer SEE ALSO -------- man:dracut[8] man:bootup[7,external] dracut-ng-dracut-ng-3e4cfdd/man/dracut.cmdline.7.adoc000066400000000000000000001507601474727335100225300ustar00rootroot00000000000000DRACUT.CMDLINE(7) ================= :doctype: manpage :man source: dracut :man manual: dracut :man version: {version} NAME ---- dracut.cmdline - dracut kernel command line options DESCRIPTION ----------- The root device used by the kernel is specified in the boot configuration file on the kernel command line, as always. The traditional _root=/dev/sda1_ style device specification is allowed, but not encouraged. The root device should better be identified by LABEL or UUID. If a label is used, as in _root=LABEL=_ the initramfs will search all available devices for a filesystem with the appropriate label, and mount that device as the root filesystem. _root=UUID=_ will mount the partition with that UUID as the root filesystem. In the following all kernel command line parameters, which are processed by dracut, are described. "rd.*" parameters mentioned without "=" are boolean parameters. They can be turned on/off by setting them to {0|1}. If the assignment with "=" is missing "=1" is implied. For example _rd.info_ can be turned off with _rd.info=0_ or turned on with _rd.info=1_ or _rd.info_. The last value in the kernel command line is the value, which is honored. Standard ~~~~~~~~ **init=**____:: specify the path to the init program to be started after the initramfs has finished **root=**____:: specify the block device to use as the root filesystem. + [listing] .Example -- root=/dev/sda1 root=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 root=/dev/disk/by-label/Root root=LABEL=Root root=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7 root=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 root=PARTUUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 -- **rootfstype=**____:: "auto" if not specified. + [listing] .Example -- rootfstype=ext4 -- **rootflags=**____:: specify additional mount options for the root filesystem. If not set, _/etc/fstab_ of the real root will be parsed for special mount options and mounted accordingly. **ro**:: force mounting _/_ and _/usr_ (if it is a separate device) read-only. If none of ro and rw is present, both are mounted according to _/etc/fstab_. **rw**:: force mounting _/_ and _/usr_ (if it is a separate device) read-write. See also ro option. **rootfallback=**____:: specify the block device to use as the root filesystem, if the normal root cannot be found. This can only be a simple block device with a simple file system, for which the filesystem driver is either compiled in, or added manually to the initramfs. This parameter can be specified multiple times. **rd.auto** **rd.auto=1**:: enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or lvm. Default is off as of dracut version >= 024. **rd.hostonly=0**:: removes all compiled in configuration of the host system the initramfs image was built on. This helps booting, if any disk layout changed, especially in combination with rd.auto or other parameters specifying the layout. **rd.cmdline=ask**:: prompts the user for additional kernel command line parameters **rd.fstab=0**:: do not honor special mount options for the root filesystem found in _/etc/fstab_ of the real root. **resume=**____:: resume from a swap partition + [listing] .Example -- resume=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 resume=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7 resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 -- **rd.skipfsck**:: skip fsck for rootfs and _/usr_. If you're mounting _/usr_ read-only and the init system performs fsck before remount, you might want to use this option to avoid duplication. iso-scan/filename ~~~~~~~~~~~~~~~~~ Mount all mountable devices and search for ISO pointed by the argument. When the ISO is found set it up as a loop device. Device containing this ISO image will stay mounted at /run/initramfs/isoscandev. Using iso-scan/filename with a Fedora/Red Hat/CentOS Live iso should just work by copying the original kernel cmdline parameters. [listing] .Example -- menuentry 'Live Fedora 20' --class fedora --class gnu-linux --class gnu --class os { set isolabel=Fedora-Live-LXDE-x86_64-20-1 set isofile="/boot/iso/Fedora-Live-LXDE-x86_64-20-1.iso" loopback loop $isofile linux (loop)/isolinux/vmlinuz0 boot=isolinux iso-scan/filename=$isofile root=live:LABEL=$isolabel ro rd.live.image quiet rhgb initrd (loop)/isolinux/initrd0.img } -- Misc ~~~~ **rd.emergency=**__[reboot|poweroff|halt]__:: specify, what action to execute in case of a critical failure. rd.shell=0 must also be specified. **rd.driver.blacklist=**____[,____,...]:: do not load kernel module . This parameter can be specified multiple times. **rd.driver.pre=**____[,____,...]:: force loading kernel module . This parameter can be specified multiple times. **rd.driver.post=**____[,____,...]:: force loading kernel module after all automatic loading modules have been loaded. This parameter can be specified multiple times. **rd.retry=**____:: specify how long dracut should retry the initqueue to configure devices. The default is 180 seconds. After 2/3 of the time, degraded raids are force started. If you have hardware, which takes a very long time to announce its drives, you might want to extend this value. **rd.timeout=**____:: specify how long dracut should wait for devices to appear. The default is '0', which means 'forever'. Note that this timeout should be longer than rd.retry to allow for proper configuration. **rd.noverifyssl**:: accept self-signed certificates for ssl downloads. **rd.ctty=**____:: specify the controlling terminal for the console. This is useful, if you have multiple "console=" arguments. **rd.shutdown.timeout.umount=**____:: specify how long dracut should wait for an individual umount to finish during shutdown. This avoids the system from blocking when unmounting a file system cannot complete and waits indefinitely. Value '0' means to wait 'forever'. The default is 90 seconds. [[dracutkerneldebug]] Debug ~~~~~ If you are dropped to an emergency shell, the file _/run/initramfs/rdsosreport.txt_ is created, which can be saved to a (to be mounted by hand) partition (usually /boot) or a USB stick. Additional debugging info can be produced by adding **rd.debug** to the kernel command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools. It should be attached to any report about dracut problems. **rd.info**:: print informational output though "quiet" is set **rd.shell**:: allow dropping to a shell, if root mounting fails **rd.debug**:: set -x for the dracut shell. If systemd is active in the initramfs, all output is logged to the systemd journal, which you can inspect with "journalctl -ab". If systemd is not active, the logs are written to dmesg and _/run/initramfs/init.log_. If "quiet" is set, it also logs to the console. **rd.memdebug=[0-5]**:: Print memory usage info at various points, set the verbose level from 0 to 5. + Higher level means more debugging output: + ---- 0 - no output 1 - partial /proc/meminfo 2 - /proc/meminfo 3 - /proc/meminfo + /proc/slabinfo 4 - /proc/meminfo + /proc/slabinfo + memstrack summary NOTE: memstrack is a memory tracing tool that tracks the total memory consumption, and peak memory consumption of each kernel modules and userspace progress during the whole initramfs runtime, report is generated and the end of initramfs run. 5 - /proc/meminfo + /proc/slabinfo + memstrack (with top memory stacktrace) NOTE: memstrack (with top memory stacktrace) will print top memory allocation stack traces during the whole initramfs runtime. ---- **rd.break**:: drop to a shell at the end **rd.break=**__{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}__:: drop to a shell before the defined breakpoint starts. This parameter can be specified multiple times. **rd.udev.log_level=**__{err|info|debug}__:: set udev log level. The default is 'err'. I18N ~~~~ **rd.vconsole.keymap=**____:: keyboard translation table loaded by loadkeys; taken from keymaps directory; will be written as KEYMAP to _/etc/vconsole.conf_ in the initramfs. + [listing] .Example -- rd.vconsole.keymap=de-latin1-nodeadkeys -- **rd.vconsole.keymap.ext=**____:: list of extra keymaps to bo loaded (sep. by space); will be written as EXT_KEYMAP to _/etc/vconsole.conf_ in the initramfs **rd.vconsole.unicode**:: boolean, indicating UTF-8 mode; will be written as UNICODE to _/etc/vconsole.conf_ in the initramfs **rd.vconsole.font=**____:: console font; taken from consolefonts directory; will be written as FONT to _/etc/vconsole.conf_ in the initramfs. + [listing] .Example -- rd.vconsole.font=eurlatgr -- **rd.vconsole.font.map=**____:: see description of '-m' parameter in setfont manual; taken from consoletrans directory; will be written as FONT_MAP to _/etc/vconsole.conf_ in the initramfs **rd.vconsole.font.unimap=**____:: see description of '-u' parameter in setfont manual; taken from unimaps directory; will be written as FONT_UNIMAP to _/etc/vconsole.conf_ in the initramfs **rd.locale.LANG=**____:: taken from the environment; if no UNICODE is defined we set its value in basis of LANG value (whether it ends with ".utf8" (or similar) or not); will be written as LANG to _/etc/locale.conf_ in the initramfs. + [listing] .Example -- rd.locale.LANG=pl_PL.utf8 -- **rd.locale.LC_ALL=**____:: taken from the environment; will be written as LC_ALL to _/etc/locale.conf_ in the initramfs LVM ~~~ **rd.lvm=0**:: disable LVM detection **rd.lvm.vg=**____:: only activate all logical volumes in the the volume groups with the given name. rd.lvm.vg can be specified multiple times on the kernel command line. **rd.lvm.lv=**__/__:: only activate the logical volumes with the given name. rd.lvm.lv can be specified multiple times on the kernel command line. **rd.lvm.conf=0**:: remove any _/etc/lvm/lvm.conf_, which may exist in the initramfs crypto LUKS ~~~~~~~~~~~ **rd.luks=0**:: disable crypto LUKS detection **rd.luks.uuid=**____:: only activate the LUKS partitions with the given UUID. Any "luks-" of the LUKS UUID is removed before comparing to __. The comparisons also matches, if __ is only the beginning of the LUKS UUID, so you don't have to specify the full UUID. This parameter can be specified multiple times. __ may be prefixed by the keyword `keysource:`, see _rd.luks.key_ below. **rd.luks.allow-discards=**____:: Allow using of discards (TRIM) requests for LUKS partitions with the given UUID. Any "luks-" of the LUKS UUID is removed before comparing to __. The comparisons also matches, if __ is only the beginning of the LUKS UUID, so you don't have to specify the full UUID. This parameter can be specified multiple times. **rd.luks.allow-discards**:: Allow using of discards (TRIM) requests on all LUKS partitions. **rd.luks.crypttab=0**:: do not check, if LUKS partition is in _/etc/crypttab_ **rd.luks.timeout=**____:: specify how long dracut should wait when waiting for the user to enter the password. This avoid blocking the boot if no password is entered. It does not apply to luks key. The default is '0', which means 'forever'. crypto LUKS - key on removable device support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NB: If systemd is included in the dracut initrd, dracut's built in removable device keying support won't work. systemd will prompt for a password from the console even if you've supplied **rd.luks.key**. You may be able to use standard systemd man:fstab[5,external] syntax to get the same effect. If you do need **rd.luks.key** to work, you will have to exclude the "systemd" dracut module and any modules that depend on it. See man:dracut.conf[5] and https://bugzilla.redhat.com/show_bug.cgi?id=905683 for more information. **rd.luks.key=**_[:[:]]_:: __ is the pathname of a key file, relative to the root of the filesystem on some device. It's REQUIRED. When __ ends with '.gpg' it's considered to be key encrypted symmetrically with GPG. You will be prompted for the GPG password on boot. GPG support comes with the 'crypt-gpg' module, which needs to be added explicitly. + __ identifies the device on which the key file resides. It may be the kernel name of the device (should start with "/dev/"), a UUID (prefixed with "UUID=") or a label (prefix with "LABEL="). You don't have to specify a full UUID. Just its beginning will suffice, even if its ambiguous. All matching devices will be probed. This parameter is recommended, but not required. If it's not present, all block devices will be probed, which may significantly increase boot time. + If __ is given, the specified key will only be used for the specified LUKS device. Possible values are the same as for __. Unless you have several LUKS devices, you don't have to specify this parameter. The simplest usage is: + [listing] .Example -- rd.luks.key=/foo/bar.key -- + As you see, you can skip colons in such a case. [NOTE] =============================== Your LUKS partition must match your key file. dracut provides keys to cryptsetup with _-d_ (an older alias for _--key-file_). This uses the entire binary content of the key file as part of the secret. If you pipe a password into cryptsetup *without* _-d_ or _--key-file_, it will be treated as text user input, and only characters before the first newline will be used. Therefore, when you're creating an encrypted partition for dracut to mount, and you pipe a key into _cryptsetup luksFormat_,you must use _-d -_. Here is an example for a key encrypted with GPG (warning: _--batch-mode_ will overwrite the device without asking for confirmation): [listing] -- gpg --quiet --decrypt rootkey.gpg | \ cryptsetup --batch-mode --key-file - \ luksFormat /dev/sda47 -- If you use unencrypted key files, just use the key file pathname instead of the standard input. For a random key with 256 bits of entropy, you might use: [listing] -- head -32c /dev/urandom > rootkey.key cryptsetup --batch-mode --key-file rootkey.key \ luksFormat /dev/sda47 -- You can also use regular key files on an encrypted _keydev_. Compared to using GPG encrypted keyfiles on an unencrypted device this provides the following advantages: - you can unlock your disk(s) using multiple passphrases - better security by not losing the key stretching mechanism To use an encrypted _keydev_ you *must* ensure that it becomes available by using the keyword `keysource`, e.g. `rd.luks.uuid=keysource:aaaa` _aaaa_ being the uuid of the encrypted _keydev_. Example: Lets assume you have three disks _A_, _B_ and _C_ with the uuids _aaaa_, _bbbb_ and _cccc_. + You want to unlock _A_ and _B_ using keyfile _keyfile_. + The unlocked volumes be _A'_, _B'_ and _C'_ with the uuids _AAAA_, _BBBB_ and _CCCC_. + _keyfile_ is saved on _C'_ as _/keyfile_. One luks keyslot of each _A_, _B_ and _C_ is setup with a passphrase. + Another luks keyslot of each _A_ and _B_ is setup with _keyfile_. To boot this configuration you could use: [listing] -- rd.luks.uuid=aaaa rd.luks.uuid=bbbb rd.luks.uuid=keysource:cccc rd.luks.key=/keyfile:UUID=CCCC -- Dracut asks for the passphrase for _C_ and uses the keyfile to unlock _A_ and _B_. + If getting the passphrase for _C_ fails it falls back to asking for the passphrases for _A_ and _B_. If you want _C'_ to stay unlocked, specify a luks name for it, e.g. `rd.luks.name=cccc=mykeys`, otherwise it gets closed when not needed anymore. =============================== **rd.luks.key.tout=0**:: specify how many times dracut will try to read the keys specified in rd.luks.key. This gives a chance to the removable device containing the key to initialize. MD RAID ~~~~~~~ **rd.md=0**:: disable MD RAID detection **rd.md.imsm=0**:: disable MD RAID for imsm/isw raids, use DM RAID instead **rd.md.ddf=0**:: disable MD RAID for SNIA ddf raids, use DM RAID instead **rd.md.conf=0**:: ignore mdadm.conf included in initramfs **rd.md.waitclean=1**:: wait for any resync, recovery, or reshape activity to finish before continuing **rd.md.uuid=**____:: only activate the raid sets with the given UUID. This parameter can be specified multiple times. DM RAID ~~~~~~~ **rd.dm=0**:: disable DM RAID detection **rd.dm.uuid=**____:: only activate the raid sets with the given UUID. This parameter can be specified multiple times. MULTIPATH ~~~~~~~~~ **rd.multipath=0**:: disable multipath detection **rd.multipath=default**:: use default multipath settings FIPS ~~~~ **rd.fips**:: enable FIPS **boot=**____:: specify the device, where /boot is located. + [listing] .Example -- boot=/dev/sda1 boot=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 boot=UUID= boot=LABEL=