Compare commits

..

1 Commits

Author SHA1 Message Date
6b60b37832 add sysusers standalone module 2021-06-17 21:06:57 +02:00
395 changed files with 5303 additions and 9545 deletions

View File

@@ -1,14 +0,0 @@
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"

17
.github/labeler.yml vendored
View File

@@ -21,6 +21,9 @@ modules:
bash:
- modules.d/00bash/*
bootchart:
- modules.d/00bootchart/*
dash:
- modules.d/00dash/*
@@ -84,6 +87,9 @@ url-lib:
drm:
- modules.d/50drm/*
gensplash:
- modules.d/50gensplash/*
plymouth:
- modules.d/50plymouth/*
@@ -138,9 +144,6 @@ multipath:
nvdimm:
- modules.d/90nvdimm/*
overlayfs:
- modules.d/90overlayfs/*
ppcmac:
- modules.d/90ppcmac/*
@@ -150,6 +153,9 @@ qemu:
qemu-net:
- modules.d/90qemu-net/*
stratis:
- modules.d/90stratis/*
crypt-gpg:
- modules.d/91crypt-gpg/*
@@ -222,9 +228,6 @@ udev-rules:
virtfs:
- modules.d/95virtfs/*
virtiofs:
- modules.d/95virtiofs/*
zfcp:
- modules.d/95zfcp/*
@@ -288,5 +291,3 @@ uefi-lib:
test:
- test/*
- test/**/*
- modules.d/80test*
- modules.d/80test*/*

8
.github/stale.yml vendored
View File

@@ -2,8 +2,6 @@
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
@@ -15,9 +13,9 @@ exemptLabels:
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.
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

View File

@@ -1,53 +0,0 @@
---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
#
name: "CodeQL"
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
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@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install asciidoc gcc libkmod-dev libsystemd-dev pkg-config
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -28,27 +28,27 @@ jobs:
fail-fast: false
matrix:
config:
- { dockerfile: 'Dockerfile-Fedora-33', tag: 'fedora:33' }
- { dockerfile: 'Dockerfile-Fedora-latest', tag: 'fedora:latest' }
- { dockerfile: 'Dockerfile-Fedora-rawhide', tag: 'fedora:rawhide' }
- { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' }
- { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' }
- { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
- { dockerfile: 'Dockerfile-Gentoo', tag: 'gentoo:latest' }
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v1
# with:
# buildkitd-flags: --debug
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v1
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@v4
uses: docker/build-push-action@v2
with:
file: test/container/${{ matrix.config.dockerfile }}
tags: ghcr.io/${{env.repository_owner}}/${{ matrix.config.tag }}
tags: ghcr.io/dracutdevs/${{ matrix.config.tag }}
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}

View File

@@ -4,23 +4,46 @@ on:
pull_request:
branches: [ master ]
env:
DEBUGFAIL: "${{ secrets.ACTIONS_STEP_DEBUG && 'rd.debug' }}"
jobs:
test:
basic:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"arch:latest",
"debian:latest",
"fedora:latest",
"fedora:33",
"fedora:rawhide",
"opensuse:latest",
"arch:latest",
]
test: [
"04",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
test:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:latest",
]
test: [
"01",
@@ -33,10 +56,15 @@ jobs:
"13",
"14",
"15",
"16",
"17",
"18",
"62",
"20",
"21",
"30",
"31",
"35",
"36",
"40",
"41",
"98",
]
fail-fast: false
@@ -45,70 +73,7 @@ jobs:
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
network:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:latest",
]
network: [
"network-manager",
"network-legacy",
#"systemd-networkd",
#"connman",
]
test: [
"20",
"30",
"35",
"40",
"60",
# "50", # times out
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: USE_NETWORK=${{ matrix.network }} ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
openrc-musl:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"gentoo:latest",
]
test: [
"18",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: install tools
run: sudo apt-get install astyle
@@ -26,10 +26,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: shfmt
uses: luizm/action-sh-checker@v0.6.0
uses: luizm/action-sh-checker@v0.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -s # arguments to shfmt.

View File

@@ -1,37 +0,0 @@
name: Manual test
on:
workflow_dispatch:
inputs:
test:
description: "Array of tests to run, such as [11,12]"
default: "['04']"
required: true
container:
type: choice
description: 'distro'
default: 'fedora'
options:
- "fedora"
- "arch"
- "debian"
- "opensuse"
- "gentoo"
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
matrix:
test: ${{ fromJSON(inputs.test) }}
container:
image: ghcr.io/dracutdevs/${{ inputs.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: "${{ inputs.container }} ${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check-out the repo under $GITHUB_WORKSPACE
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Run Commisery
uses: dracutdevs/commisery-action@master

19
.gitignore vendored
View File

@@ -1,14 +1,11 @@
/Makefile.inc
/man/dracut.8
/man/dracut-catimages.8
/man/dracut.conf.5
/dracut.8
/dracut-catimages.8
/dracut.conf.5
/dracut.conf.d/*.conf
/man/dracut.cmdline.7
/dracut-gencmdline.8
/dracut.html
/man/dracut.kernel.7
/man/dracut.bootup.7
/man/dracut.modules.7
/man/lsinitrd.1
/dracut.kernel.7
/dracut.pc
/dracut-install
/modules.d/99base/switch_root
@@ -18,13 +15,13 @@ test*.img
/.buildpath
/.project
/dracut-version.sh
/src/install/dracut-install
/install/dracut-install
/*.rpm
/*.[0-9]
/modules.d/98dracut-systemd/*.service.8
/*.sign
*.o
/src/skipcpio/skipcpio
/src/util/util
skipcpio/skipcpio
/util/util
/dracut-util
.idea/

View File

@@ -1,2 +1 @@
kate: 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;

View File

@@ -2,10 +2,9 @@ Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer-omB+W0Dpw2o@public.gm
Seewer Philippe <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
Victor Lowther <victor.lowther@gmail.com> <victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Harald Hoyer <harald@profian.com> <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Harald Hoyer <harald@profian.com> <harald@eeepc.(none)>
Harald Hoyer <harald@profian.com> <harald@hoyer.xyz>
Harald Hoyer <harald@profian.com> <harald@redhat.com>
Harald Hoyer <harald@redhat.com> <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Harald Hoyer <harald@redhat.com> <harald@eeepc.(none)>
Harald Hoyer <harald@redhat.com> <harald@hoyer.xyz>
Mike Snitzer <snitzer@redhat.com> <msnitzer@redhat.com>
Amerigo Wang <amwang@redhat.com> <xiyou.wangcong@gmail.com>
Andrey Borzenkov <arvidjaar@gmail.com> <arvidjaar@mail.ru>

55
.packit.yml Normal file
View File

@@ -0,0 +1,55 @@
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# The name of the upstream package
upstream_package_name: dracut
# The upstream tag versioning scheme
upstream_tag_template: "{version}"
# The URL of the upstream project
upstream_project_url: https://github.com/dracutdevs/dracut
# Relative path to a spec file within the upstream repository
specfile_path: pkgbuild/dracut.spec
# Name of the downstream package
downstream_package_name: dracut
# The URL of the downstream project
dist_git_base_url: https://src.fedoraproject.org/
# Sync file(s) from upstream repo to dist-git
synced_files:
# The dracut spec file is maintained upstream so we sync it downstream.
- dracut.spec
# We sync the packit file downstream be able to optionally use the sync-from-downstream command
- .packit.yaml
# We want new releases to be automatically built on rawhide and have few jobs
# on copr.
create_pr: false
jobs:
- job: propose_downstream
trigger: release
metadata:
dist_git_branches: main
- job: tests
trigger: pull_request
metadata:
targets:
- fedora-rawhide
- job: copr_build
trigger: pull_request
metadata:
targets:
- fedora-development
- job: copr_build
trigger: commit
metadata:
targets:
- fedora-all
- fedora-development

103
AUTHORS
View File

@@ -1,9 +1,7 @@
Harald Hoyer <harald@profian.com>
Harald Hoyer <harald@redhat.com>
Victor Lowther <victor.lowther@gmail.com>
Jóhann B. Guðmundsson <johannbg@gmail.com>
Laszlo Gombos <laszlo.gombos@gmail.com>
Amadeusz Żołnowski <aidecoe@aidecoe.name>
Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Daniel Molkentin <daniel.molkentin@suse.com>
Hannes Reinecke <hare@suse.com>
Kairui Song <kasong@redhat.com>
@@ -14,87 +12,76 @@ Dave Young <dyoung@redhat.com>
Jeremy Katz <katzj@redhat.com>
Lukas Nykryn <lnykryn@redhat.com>
David Dillow <dave@thedillows.org>
Martin Wilck <mwilck@suse.de>
Lubomir Rintel <lkundrak@v3.sk>
Michal Soltys <soltys@ziu.info>
Colin Guthrie <colin@mageia.org>
Amerigo Wang <amwang@redhat.com>
Thomas Renninger <trenn@suse.com>
Alexander Tsoy <alexander@tsoy.me>
Martin Wilck <mwilck@suse.de>
Frederick Grose <fgrose@sugarlabs.org>
WANG Chao <chaowang@redhat.com>
Beniamino Galvani <bgalvani@redhat.com>
Jonathan Lebon <jonathan@jlebon.com>
Yu Watanabe <watanabe.yu+github@gmail.com>
Andrey Borzenkov <arvidjaar@gmail.com>
David Tardon <dtardon@redhat.com>
Peter Robinson <pbrobinson@fedoraproject.org>
David Disseldorp <ddiss@suse.de>
Hans de Goede <hdegoede@redhat.com>
Frantisek Sumsal <frantisek@sumsal.cz>
Jonathan Lebon <jonathan@jlebon.com>
Peter Jones <pjones@redhat.com>
Thomas Blume <thomas.blume@suse.com>
Peter Robinson <pbrobinson@fedoraproject.org>
Andreas Thienemann <andreas@bawue.net>
Marcos Mello <marcosfrm@gmail.com>
Renaud Métrich <rmetrich@redhat.com>
наб <nabijaczleweli@nabijaczleweli.xyz>
Pavel Valena <pvalena@redhat.com>
Tomasz Paweł Gajc <tpgxyz@gmail.com>
Brian C. Lane <bcl@redhat.com>
Frantisek Sumsal <frantisek@sumsal.cz>
Fabian Vogt <fvogt@suse.com>
Nicolas Chauvet <kwizart@gmail.com>
Tomasz Paweł Gajc <tpgxyz@gmail.com>
Zoltán Böszörményi <zboszor@pr.hu>
Beniamino Galvani <bgalvani@redhat.com>
Colin Walters <walters@verbum.org>
John Reiser <jreiser@bitwagon.com>
Luca Berra <bluca@vodka.it>
Shreenidhi Shedi <sshedi@vmware.com>
Xunlei Pang <xlpang@redhat.com>
Brian C. Lane <bcl@redhat.com>
Daniel Drake <drake@endlessm.com>
David Teigland <teigland@redhat.com>
Dusty Mabe <dusty@dustymabe.com>
Kairui Song <kasong@tencent.com>
Renaud Métrich <rmetrich@redhat.com>
Angelo "pallotron" Failla <pallotron@fb.com>
Dan Horák <dhorak@redhat.com>
Thomas Blume <thomas.blume@suse.com>
Ville Skyttä <ville.skytta@iki.fi>
Böszörményi Zoltán <zboszor@pr.hu>
Cristian Rodríguez <crrodriguez@opensuse.org>
Dan Horák <dhorak@redhat.com>
Javier Martinez Canillas <javierm@redhat.com>
Mike Gilbert <floppym@gentoo.org>
Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Ondrej Mosnacek <omosnace@redhat.com>
Baoquan He <bhe@redhat.com>
Brendan Germain <brendan.germain@nasdaqomx.com>
David Tardon <dtardon@redhat.com>
Dusty Mabe <dusty@dustymabe.com>
Jonas Witschel <diabonas@gmx.de>
Leho Kraav <leho@kraav.com>
Marcos Mello <marcosfrm@gmail.com>
Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Moritz Maxeiner <moritz@ucworks.org>
Nathan Rini <nate@ucar.edu>
Radek Vykydal <rvykydal@redhat.com>
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Fabian Deutsch <fabiand@fedoraproject.org>
Kamil Rytarowski <n54@gmx.com>
Lidong Zhong <lidong.zhong@suse.com>
Marc Grimme <grimme@atix.de>
Mike Gilbert <floppym@gentoo.org>
NeilBrown <neilb@suse.de>
Peter Rajnoha <prajnoha@redhat.com>
Tao Liu <ltao@redhat.com>
Thorsten Behrens <tbehrens@suse.com>
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
q66 <daniel@octaforge.org>
Adam Williamson <awilliam@redhat.com>
Chao Wang <chaowang@redhat.com>
Frederic Crozat <fcrozat@suse.com>
James Lee <jlee@thestaticvoid.com>
Jesse Keating <jkeating@redhat.com>
Masahiro Matsuya <mmatsuya@redhat.com>
Milan Broz <mbroz@redhat.com>
Mimi Zohar <zohar@linux.vnet.ibm.com>
Norbert Lange <norbert.lange@andritz.com>
Pingfan Liu <piliu@redhat.com>
Roberto Sassu <roberto.sassu@polito.it>
Stefan Reimer <it@startux.de>
Takashi Iwai <tiwai@suse.de>
Tony Asleson <tasleson@redhat.com>
Zoltán Böszörményi <zboszor@gmail.com>
Anton Blanchard <anton@samba.org>
Bill Nottingham <notting@redhat.com>
Chapman Flack <g2@anastigmatix.net>
@@ -109,14 +96,11 @@ Jon Ander Hernandez <jonan.h@gmail.com>
Juan RP <xtraeme@gmail.com>
Lance Albertson <lance@osuosl.org>
Marian Ganisin <mganisin@redhat.com>
Matt Coleman <matt@datto.com>
Matthias Gerstner <matthias.gerstner@suse.de>
Max Resch <resch.max@gmail.com>
Michael Ploujnikov <plouj@somanetworks.com>
Nicolas Porcel <nicolasporcel06@gmail.com>
Pratyush Anand <panand@redhat.com>
Silvio Fricke <silvio.fricke@gmail.com>
Stefan Berger <stefanb@linux.ibm.com>
Steven Brudenell <steven.brudenell@gmail.com>
Stig Telfer <stelfer@cray.com>
Thomas Backlund <tmb@mageia.org>
@@ -125,17 +109,11 @@ Vasiliy Tolstov <v.tolstov@selfip.ru>
Wim Muskee <wimmuskee@gmail.com>
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Alan Pevec <apevec@redhat.com>
Alberto Planas <aplanas@suse.com>
Alex Harpin <development@landsofshadow.co.uk>
Alexander Wenzel <alexander.wenzel@qbeyond.de>
Alexey Shabalin <shaba@altlinux.org>
Andre Russ <andre.russ@sap.com>
Andreas Schwab <schwab@suse.de>
Ankit Kumar <ankit@linux.vnet.ibm.com>
Antony Messerli <amesserl@rackspace.com>
Chao Fan <cfan@redhat.com>
Coiby Xu <coxu@redhat.com>
Cornelius Hoffmann <coding@hoffmn.de>
Daniel Cordero <dracut@0xdc.io>
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Daniel Schaal <farbing@web.de>
@@ -143,22 +121,17 @@ Denis Silakov <dsilakov@virtuozzo.com>
Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
Erwan Velu <erwan.velu@enovance.com>
Evgeny Vereshchagin <evvers@ya.ru>
German Maglione <gmaglione@redhat.com>
Guido Trentalancia <guido@trentalancia.net>
Hari Bathini <hbathini@linux.ibm.com>
Hari Bathini <hbathini@linux.vnet.ibm.com>
Henrik Gombos <henrik99999@gmail.com>
Ian Dall <ian@beware.dropbear.id.au>
Imran Haider <imran1008@gmail.com>
James Buren <ryuo@frugalware.org>
Jan Macku <jamacku@redhat.com>
Joey Boggs <jboggs@redhat.com>
José María Fernández <josemariafg@gmail.com>
Julian Wolf <juwolf@suse.com>
Koen Kooi <koen@dominion.thruhere.net>
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Kyle McMartin <kmcmarti@redhat.com>
Lee Duncan <lduncan@suse.com>
Luiz Angelo Daros de Luca <luizluca@gmail.com>
Lukas Wunner <lukas@wunner.de>
Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
@@ -171,28 +144,29 @@ Nikoli <nikoli@gmx.us>
Patrick Talbert <ptalbert@redhat.com>
Pedro Monreal <pmgdeb@gmail.com>
Petr Pavlu <petr.pavlu@suse.com>
Pingfan Liu <piliu@redhat.com>
Przemysław Rudy <prudy1@o2.pl>
Robert LeBlanc <robert@leblancnet.us>
Robert Scheck <robert@fedoraproject.org>
Stefan Berger <stefanb@linux.ibm.com>
Stefan Berger <stefanb@us.ibm.com>
Thomas Lange <lange@informatik.uni-koeln.de>
Till Maas <opensource@till.name>
Tony Asleson <tasleson@redhat.com>
Vivek Goyal <vgoyal@redhat.com>
Vladislav Bogdanov <bubble@hoster-ok.com>
keentux <valentin.lefebvre@suse.com>
nkraetzschmar <nkraetzschmar@users.noreply.github.com>
Érico Rolim <erico.erc@gmail.com>
наб <nabijaczleweli@nabijaczleweli.xyz>
A. Wilcox <AWilcox@Wilcox-Tech.com>
Adam Alves <adamoa@gmail.com>
Adrien Thierry <athierry@redhat.com>
Alexander Kurtz <alexander@kurtz.be>
Alexander Miroshnichenko <alex@millerson.name>
Alexander Sosedkin <asosedkin@redhat.com>
Alexander Todorov <atodorov@redhat.com>
Alexey Kodanev <alexey.kodanev@oracle.com>
Andreas Schwab <schwab@suse.de>
Andreas Stieger <astieger@suse.com>
Andrew J. Hesford <ajh@sideband.org>
Andrey Sokolov <keremet@altlinux.org>
Andy Lutomirski <luto@mit.edu>
Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Anssi Hannula <anssi@mageia.org>
@@ -202,30 +176,24 @@ Artem Savkov <asavkov@redhat.com>
Attila Bruncsak <bruncsak@users.noreply.github.com>
B. Wilson <x@wilsonb.com>
Ben Howard <ben.howard@redhat.com>
Benjamin Gilbert <bgilbert@redhat.com>
Benjamin Marzinski <bmarzins@redhat.com>
Brandon Philips <brandon@ifup.co>
Brandon Sloane <btsloane@verizon.net>
Bruno E. O. Meneguele <bmeneg@redhat.com>
Bryn M. Reeves <bmr@redhat.com>
Canek Peláez Valdés <caneko@gmail.com>
Carlo Caione <carlo@endlessm.com>
Chad Dupuis <chad.dupuis@cavium.com>
Charles Rose <charles.rose@dell.com>
Christian Heinz <christian.ch.heinz@gmail.com>
Cole Robinson <crobinso@redhat.com>
Cong Wang <amwang@redhat.com>
Conrad Hoffmann <ch@bitfehler.net>
Daan De Meyer <daan.j.demeyer@gmail.com>
Dan Fuhry <dfuhry@datto.com>
Dave Jones <davej@redhat.com>
David Disseldorp <ddiss@suse.de>
David Hildenbrand <david@redhat.com>
David Michael <david.michael@coreos.com>
Denis Volkov <denis@simpletexting.net>
Dennis Schridde <devurandom@gmx.net>
Derek Hageman <hageman@inthat.cloud>
Derek Higgins <derekh@redhat.com>
Dirk Müller <dirk@dmllr.de>
Donovan Tremura <neurognostic@protonmail.ch>
Duane Griffin <duaneg@dghda.com>
Elan Ruusamäe <glen@delfi.ee>
@@ -239,10 +207,8 @@ Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
Florian Gamböck <mail@floga.de>
Frank Deng <frank.deng@oracle.com>
François Cami <fcami@fedoraproject.org>
Frederick Grose <4335897+FGrose@users.noreply.github.com>
Gerd von Egidy <gerd.von.egidy@intra2net.com>
Glen Gray <slaine@slaine.org>
Glenn Morris <rgm@stanford.edu>
GuoChuang <guo.chuang@zte.com.cn>
HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Hendrik Brueckner <brueckner@linux.ibm.com>
@@ -253,12 +219,10 @@ Hui Wang <john.wanghui@huawei.com>
Ignaz Forster <iforster@suse.com>
Jacob Wen <jian.w.wen@oracle.com>
James Laska <jlaska@redhat.com>
James Morris <morisja@gmail.com>
Jan Stodola <jstodola@redhat.com>
Jaroslav Jindrak <dzejrou@gmail.com>
Jason Dana <jasondana@quarksecurity.com>
Jens Heise <46450477+heisej@users.noreply.github.com>
Jeremy Linton <jlinton@redhat.com>
Jeremy Linton <lintonrjeremy@gmail.com>
Jiri Pirko <jiri@resnulli.us>
Joe Lawrence <Joe.Lawrence@stratus.com>
@@ -266,17 +230,14 @@ Johannes Thumshirn <jthumshirn@suse.com>
Jonas Jelten <jj@sft.lol>
Jonas Jonsson <jonas@websystem.se>
Jonas Witschel <diabonas@archlinux.org>
Kenneth D'souza <kennethdsouza94@gmail.com>
Kevin Yung <Kevin.Yung@myob.com>
Lars R. Damerow <lars@pixar.com>
Lars Wendler <polynomial-c@gentoo.org>
Laura Hild <lsh@jlab.org>
Lee Duncan <lduncan@suse.com>
Lennart Poettering <lennart@poettering.net>
Lennert Buytenhek <buytenh@wantstofly.org>
Lev Veyde <lveyde@redhat.com>
Lianbo Jiang <lijiang@redhat.com>
LinkTed <link.ted@mailbox.org>
Luca BRUNO <luca.bruno@coreos.com>
Lucas C. Villa Real <lucasvr@gmail.com>
Major Hayden <major@mhtx.net>
Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
@@ -285,18 +246,15 @@ Marian Csontos <mcsontos@redhat.com>
Mark Fasheh <mfasheh@suse.de>
Matt <smoothsailing72@hotmail.com>
Matt Smith <shadowfax@gmx.com>
Matthias Berndt <matthias_berndt@gmx.de>
Mei Liu <liumbj@linux.vnet.ibm.com>
Michael Chapman <mike@very.puzzling.org>
Michael McCracken <michael.mccracken@gmail.com>
Michal Hecko <mhecko@redhat.com>
Michal Schmidt <mschmidt@redhat.com>
Michal Sekletar <msekleta@redhat.com>
Mike Gorse <mgorse@suse.com>
Moritz 'Morty' Strübe <morty@gmx.net>
Morten Linderud <morten@linderud.pw>
Munehiro Matsuda <haro@kgt.co.jp>
Neal Gompa <neal@gompa.dev>
Nicolas Porcel <nicolasporcel06@gmail.com>
Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Olivier Blin <dev@blino.org>
Ondrej Dubaj <odubaj@redhat.com>
@@ -318,8 +276,6 @@ Robert Buchholz <rbu@goodpoint.de>
Ruben Kerkhof <ruben@rubenkerkhof.com>
Rumbaut Thomas <Thomas.Rumbaut@digipolis.gent>
Rusty Bird <rustybird@openmailbox.org>
Savyasachee Jha <genghizkhan91@hawkradius.com>
Scott Moser <smoser@brickies.net>
Sebastian Mitterle <smitterl@redhat.com>
Sergei Iudin <tsipa740@gmail.com>
Sergey Fionov <fionov@gmail.com>
@@ -330,8 +286,6 @@ Sullivan (CTR), Austin <austin.sullivan.ctr@progeny.net>
Thierry Vignaud <thierry.vignaud@gmail.com>
Thilo Bangert <thilo.bangert@gmx.net>
Thomas Abraham <tabraham@suse.com>
Thomas Haller <thaller@redhat.com>
Tianhao Chai <cth451@gmail.com>
Tobias Geerinckx <tobias.geerinckx@gmail.com>
Tobias Klauser <tklauser@distanz.ch>
Tom Gundersen <teg@jklm.no>
@@ -341,22 +295,17 @@ Vadim Kuznetsov <vadimk@gentoo.org>
Vaughan Cao <vaughan.cao@oracle.com>
Vladius25 <vkorol2509@icloud.com>
Vratislav Podzimek <vpodzime@redhat.com>
Wenchao Hao <haowenchao@huawei.com>
Yang Liu <50459973+ly4096x@users.noreply.github.com>
Yanko Kaneti <yaneti@declera.com>
Zhiguo Deng <bjzgdeng@linux.vnet.ibm.com>
Ziyue Yang <ziyang@redhat.com>
foopub <45460217+foopub@users.noreply.github.com>
gaoyi <ymuemc@163.com>
gombi <gombi@>
honza801 <honza801@gmail.com>
jbash aka John Bashinski <jbash@velvet.com>
jloeser <jloeser@suse.de>
joamonwx <unknown>
johannes <johannes.brechtmann@gmail.com>
jonathan-teh <30538043+jonathan-teh@users.noreply.github.com>
joshuacov1 <joshuacov@gmail.com>
lapseofreason <lapseofreason0@gmail.com>
leo-lb <lle-bout@zaclys.net>
logan <logancaldwell23@gmail.com>
masem <matej.semian@gmail.com>
@@ -366,7 +315,5 @@ mwberry <mwberry@users.noreply.github.com>
nabijaczleweli <nabijaczleweli@gmail.com>
privb0x23 <privb0x23@users.noreply.github.com>
realtime-neil <neil@rtr.ai>
runsisi <runsisi@hust.edu.cn>
tupper <tupper.bob@gmail.com>
xtraeme <xtraeme@voidlinux.eu>
Дамјан Георгиевски <gdamjan@gmail.com>

View File

@@ -1,22 +0,0 @@
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 [code of conduct](docs/CODE_OF_CONDUCT.md).
# 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 [Dracut Developer Guidelines](docs/HACKING.md).
# Older or downstream versions
For older or downstream versions that are still supported by your distribution please use respective downstream tracker:
[Debian](https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=dracut)
[Fedora](https://bugzilla.redhat.com/buglist.cgi?quicksearch=dracut)
[Gentoo](https://bugs.gentoo.org/buglist.cgi?quicksearch=dracut)
[openSUSE](https://bugzilla.opensuse.org/buglist.cgi?quicksearch=dracut)

View File

@@ -1,16 +1,17 @@
-include dracut-version.sh
DRACUT_MAIN_VERSION := $(shell env GIT_CEILING_DIRECTORIES=$(CURDIR)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. 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 || :)
DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. 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)
HAVE_SHELLCHECK ?= $(shell which shellcheck >/dev/null 2>&1 && echo yes)
HAVE_SHFMT ?= $(shell which shfmt >/dev/null 2>&1 && echo yes)
HAVE_RPMBUILD ?= $(shell which rpmbuild >/dev/null 2>&1 && echo yes)
-include Makefile.inc
@@ -48,7 +49,7 @@ man8pages = man/dracut.8 \
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
.PHONY: install clean archive testimage test all check AUTHORS CONTRIBUTORS doc dracut-version.sh
.PHONY: install clean archive rpm srpm testimage test all check AUTHORS CONTRIBUTORS doc dracut-version.sh
all: dracut-version.sh dracut.pc dracut-install src/skipcpio/skipcpio dracut-util
@@ -101,16 +102,6 @@ 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) dracut.html
ifneq ($(enable_documentation),no)
@@ -177,7 +168,6 @@ ifneq ($(enable_documentation),no)
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 -s ../dracut-shutdown.service \
@@ -206,9 +196,6 @@ endif
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
@@ -228,14 +215,13 @@ clean:
$(RM) */*/*~
$(RM) $(manpages:%=%.xml) dracut.xml
$(RM) test-*.img
$(RM) dracut-*.tar.bz2 dracut-*.tar.xz
$(RM) dracut-*.rpm dracut-*.tar.bz2 dracut-*.tar.xz
$(RM) dracut-version.sh
$(RM) dracut-install src/install/dracut-install $(DRACUT_INSTALL_OBJECTS)
$(RM) skipcpio/skipcpio $(SKIPCPIO_OBJECTS)
$(RM) dracut-util util/util $(UTIL_OBJECTS)
$(RM) $(manpages) dracut.html
$(RM) dracut.pc
$(RM) dracut-cpio src/dracut-cpio/target/release/dracut-cpio*
$(MAKE) -C test clean
dist: dracut-$(DRACUT_MAIN_VERSION).tar.xz
@@ -250,6 +236,34 @@ dracut-$(DRACUT_MAIN_VERSION).tar.xz: doc syncheck
xz -9 dracut-$(DRACUT_MAIN_VERSION).tar
rm -f -- dracut-$(DRACUT_MAIN_VERSION).tar
ifeq ($(HAVE_RPMBUILD),yes)
rpm: dracut-$(DRACUT_MAIN_VERSION).tar.xz syncheck
rpmbuild=$$(mktemp -d -p /var/tmp rpmbuild-dracut.XXXXXX); src=$$(pwd); \
cp dracut-$(DRACUT_MAIN_VERSION).tar.xz "$$rpmbuild"; \
LC_MESSAGES=C $$src/tools/git2spec.pl $(DRACUT_MAIN_VERSION) "$$rpmbuild" < pkgbuild/dracut.spec > $$rpmbuild/dracut.spec; \
(cd "$$rpmbuild"; \
wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
( mv "$$rpmbuild"/{,$$(uname -m)/}*.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
srpm: dracut-$(DRACUT_MAIN_VERSION).tar.xz syncheck
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
cp dracut-$(DRACUT_MAIN_VERSION).tar.xz "$$rpmbuild"; \
LC_MESSAGES=C $$src/tools/git2spec.pl $(DRACUT_MAIN_VERSION) "$$rpmbuild" < pkgbuild/dracut.spec > $$rpmbuild/dracut.spec; \
(cd "$$rpmbuild"; \
[ -f $$src/lgpl-2.1.txt ] && cp $$src/lgpl-2.1.txt . || wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
--define "_rpmdir $$PWD" -bs dracut.spec; ) && \
( mv "$$rpmbuild"/*.src.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
else
.PHONY: rpm srpm
rpm: syncheck
srpm: syncheck
endif
syncheck:
@ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \
[ "$${i##*/}" = "module-setup.sh" ] && continue; \
@@ -269,7 +283,7 @@ else
endif
endif
check: all syncheck
check: all syncheck rpm
@[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }
@$(MAKE) -C test check
@@ -304,3 +318,10 @@ AUTHORS:
CONTRIBUTORS:
@git shortlog $(DRACUT_MAIN_VERSION).. --numbered --summary -e |while read a rest || [ -n "$$rest" ]; do echo "- $$rest";done
dracut.html.sign: dracut-$(DRACUT_MAIN_VERSION).tar.xz dracut.html
gpg-sign-all dracut-$(DRACUT_MAIN_VERSION).tar.xz dracut.html
upload: dracut.html.sign
kup put dracut-$(DRACUT_MAIN_VERSION).tar.xz dracut-$(DRACUT_MAIN_VERSION).tar.sign /pub/linux/utils/boot/dracut/
kup put dracut.html dracut.html.sign /pub/linux/utils/boot/dracut/

558
NEWS.md
View File

@@ -1,563 +1,5 @@
[Rendered view](https://github.com/dracutdevs/dracut/blob/master/NEWS.md)
dracut-059
==========
#### Bug Fixes
* **NEWS.md:** add missing entries ([794ce5e3](https://github.com/dracutdevs/dracut/commit/794ce5e3ee55f1b78be32873a054aed422346f4c))
#### Contributors
- Jóhann B. Guðmundsson <johannbg@gmail.com>
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 <laszlo.gombos@gmail.com>
- Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
- Martin Wilck <mwilck@suse.de>
- Kairui Song <kasong@tencent.com>
- Marcos Mello <marcosfrm@gmail.com>
- наб <nabijaczleweli@nabijaczleweli.xyz>
- David Tardon <dtardon@redhat.com>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Matt Coleman <matt@datto.com>
- Pavel Valena <pvalena@redhat.com>
- Alberto Planas <aplanas@suse.com>
- Brian C. Lane <bcl@redhat.com>
- Jonathan Lebon <jonathan@jlebon.com>
- Lukas Nykryn <lnykryn@redhat.com>
- keentux <valentin.lefebvre@suse.com>
- Cole Robinson <crobinso@redhat.com>
- Daan De Meyer <daan.j.demeyer@gmail.com>
- Frederick Grose <4335897+FGrose@users.noreply.github.com>
- Frederick Grose <fgrose@sugarlabs.org>
- Hari Bathini <hbathini@linux.ibm.com>
- Henrik Gombos <henrik99999@gmail.com>
- Jeremy Linton <jlinton@redhat.com>
- Kenneth D'souza <kennethdsouza94@gmail.com>
- Laura Hild <lsh@jlab.org>
- Mike Gilbert <floppym@gentoo.org>
- Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
- Neal Gompa <neal@gompa.dev>
- Scott Moser <smoser@brickies.net>
- Tao Liu <ltao@redhat.com>
- Tianhao Chai <cth451@gmail.com>
- gombi <gombi@>
- joamonwx <unknown>
- runsisi <runsisi@hust.edu.cn>
- tupper <tupper.bob@gmail.com>
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 <antonio.feijoo@suse.com>
- Laszlo Gombos <laszlo.gombos@gmail.com>
- Pavel Valena <pvalena@redhat.com>
- David Tardon <dtardon@redhat.com>
- Tao Liu <ltao@redhat.com>
- наб <nabijaczleweli@nabijaczleweli.xyz>
- German Maglione <gmaglione@redhat.com>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Nicolas Porcel <nicolasporcel06@gmail.com>
- Zoltán Böszörményi <zboszor@gmail.com>
- nkraetzschmar <nkraetzschmar@users.noreply.github.com>
- Benjamin Gilbert <bgilbert@redhat.com>
- Coiby Xu <coxu@redhat.com>
- Conrad Hoffmann <ch@bitfehler.net>
- David Teigland <teigland@redhat.com>
- James Morris <morisja@gmail.com>
- Lee Duncan <lduncan@suse.com>
- Martin Wilck <mwilck@suse.de>
- Masahiro Matsuya <mmatsuya@redhat.com>
- Michal Hecko <mhecko@redhat.com>
- Morten Linderud <morten@linderud.pw>
- Savyasachee Jha <genghizkhan91@hawkradius.com>
- Shreenidhi Shedi <sshedi@vmware.com>
- Wenchao Hao <haowenchao@huawei.com>
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 <antonio.feijoo@suse.com>
- David Disseldorp <ddiss@suse.de>
- Martin Wilck <mwilck@suse.de>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Shreenidhi Shedi <sshedi@vmware.com>
- David Teigland <teigland@redhat.com>
- Beniamino Galvani <bgalvani@redhat.com>
- Thomas Blume <thomas.blume@suse.com>
- Kairui Song <kasong@redhat.com>
- Laszlo Gombos <laszlo.gombos@gmail.com>
- Renaud Métrich <rmetrich@redhat.com>
- Dusty Mabe <dusty@dustymabe.com>
- Masahiro Matsuya <mmatsuya@redhat.com>
- Alexander Wenzel <alexander.wenzel@qbeyond.de>
- Andre Russ <andre.russ@sap.com>
- Cornelius Hoffmann <coding@hoffmn.de>
- David Tardon <dtardon@redhat.com>
- Frantisek Sumsal <frantisek@sumsal.cz>
- Harald Hoyer <harald@profian.com>
- José María Fernández <josemariafg@gmail.com>
- Kairui Song <kasong@tencent.com>
- Peter Robinson <pbrobinson@fedoraproject.org>
- Pingfan Liu <piliu@redhat.com>
- Tony Asleson <tasleson@redhat.com>
- Zoltán Böszörményi <zboszor@gmail.com>
- Adrien Thierry <athierry@redhat.com>
- Alexander Tsoy <alexander@tsoy.me>
- Andreas Schwab <schwab@suse.de>
- Andrey Sokolov <keremet@altlinux.org>
- Brandon Sloane <btsloane@verizon.net>
- Charles Rose <charles.rose@dell.com>
- Coiby Xu <coxu@redhat.com>
- Dan Horák <dhorak@redhat.com>
- Dirk Müller <dirk@dmllr.de>
- Glenn Morris <rgm@stanford.edu>
- Hans de Goede <hdegoede@redhat.com>
- Hari Bathini <hbathini@linux.ibm.com>
- Henrik Gombos <henrik99999@gmail.com>
- Jonathan Lebon <jonathan@jlebon.com>
- LinkTed <link.ted@mailbox.org>
- Lubomir Rintel <lkundrak@v3.sk>
- Luca BRUNO <luca.bruno@coreos.com>
- Lukas Nykryn <lnykryn@redhat.com>
- Matthias Berndt <matthias_berndt@gmx.de>
- Mike Gilbert <floppym@gentoo.org>
- Pavel Valena <pvalena@redhat.com>
- Stefan Berger <stefanb@linux.ibm.com>
- Thomas Haller <thaller@redhat.com>
- Tomasz Paweł Gajc <tpgxyz@gmail.com>
- Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
- joshuacov1 <joshuacov@gmail.com>
- lapseofreason <lapseofreason0@gmail.com>
dracut-055
==========

View File

@@ -3,7 +3,10 @@ dracut
dracut is an event driven initramfs infrastructure.
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](docs/CODE_OF_CONDUCT.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](.github/CODE_OF_CONDUCT.md)
[![Fedora-32](https://github.com/dracutdevs/dracut/workflows/Fedora-32/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-32)
[![Fedora-33](https://github.com/dracutdevs/dracut/workflows/Fedora-33/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-33)
[![Fedora-latest](https://github.com/dracutdevs/dracut/workflows/Fedora-latest/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-latest)
dracut (the tool) is used to create an initramfs image by copying tools
and files from an installed system and combining it with the
@@ -26,21 +29,23 @@ specific functionality into the initramfs. They live in the modules.d
subdirectory, and use functionality provided by dracut-functions to do their
work.
Documentation:
- [Introduction](man/dracut.asc)
- [User Manual](man/dracut.usage.asc)
Currently dracut lives on github.com and kernel.org.
Currently dracut is developed on [github.com](https://github.com/dracutdevs/dracut).
The tarballs can be found here:
http://www.kernel.org/pub/linux/utils/boot/dracut/
ftp://ftp.kernel.org/pub/linux/utils/boot/dracut/
The release tarballs are [here](https://github.com/dracutdevs/dracut/releases).
Git:
https://github.com/dracutdevs/dracut.git
http://git.kernel.org/?p=boot/dracut/dracut.git
Gitter (chat):
- https://gitter.im/dracutdevs/Lobby
Project Documentation:
http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
See [News](NEWS.md) for information about changes in the releases and
the [Wiki](https://github.com/dracutdevs/dracut/wiki) to share information.
Project Wiki:
http://dracut.wiki.kernel.org
See the github issue tracker for things which still need to be done and [Hacking](docs/HACKING.md)
See the github issue tracker for things which still need to be done and HACKING.md
for some instructions on how to get started. There is also a mailing list
that is being used for the discussion -- initramfs@vger.kernel.org.
It is a typical vger list, send mail to majordomo@vger.kernel.org with body

38
configure vendored
View File

@@ -6,7 +6,6 @@ echo \#buildapi-variable-no-builddir > /dev/null
prefix=/usr
enable_documentation=yes
enable_dracut_cpio=no
CC="${CC:-cc}"
PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
@@ -49,7 +48,6 @@ while (($# > 0)); do
--infodir) read_arg infodir "$@" || shift ;;
--systemdsystemunitdir) read_arg systemdsystemunitdir "$@" || shift ;;
--bashcompletiondir) read_arg bashcompletiondir "$@" || shift ;;
--enable-dracut-cpio) enable_dracut_cpio=yes ;;
*) echo "Ignoring unknown option '$1'" ;;
esac
shift
@@ -104,41 +102,6 @@ if test $found = no; then
exit 1
fi
cat << EOF > conftest.c
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
#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 > Makefile.inc.$$ << EOF
prefix ?= ${prefix}
libdir ?= ${libdir:-${prefix}/lib}
@@ -147,7 +110,6 @@ 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_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ")

View File

@@ -16,8 +16,8 @@ Don't use `dirname`, use:
If you set `shopt` in a function, reset to its default state with `trap`:
```shell
func() {
trap "$(shopt -p globstar)" RETURN
shopt -q -s globstar
trap "$(shopt -p nullglob globstar)" RETURN
shopt -q -s nullglob globstar
}
```
@@ -51,8 +51,8 @@ func() {
Or collect the filenames in an array, if you need them more than once:
```shell
func() {
trap "$(shopt -p globstar)" RETURN
shopt -q -s globstar
trap "$(shopt -p nullglob globstar)" RETURN
shopt -q -s nullglob globstar
filenames=( /usr/lib*/**/lib*.a )

View File

@@ -40,7 +40,7 @@ This Code of Conduct applies within all community spaces, and also applies when
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer responsible for enforcement Harald Hoyer <harald@profian.com>.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer responsible for enforcement Harald Hoyer <harald@redhat.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.

View File

@@ -1,12 +1,11 @@
# Dracut Developer Guidelines
Please make sure to follow our [Contribution Guidelines](../CONTRIBUTING.md).
## git
Currently dracut lives on github.com.
Currently dracut lives on github.com and kernel.org.
* https://github.com/dracutdevs/dracut.git
* https://git.kernel.org/pub/scm/boot/dracut/dracut.git
Pull requests should be filed preferably on github nowadays.
@@ -142,7 +141,7 @@ dracut_install_dir/modules.d/
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
fore 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.

View File

@@ -27,22 +27,44 @@ This documents contains the necessary steps to conduct a successful release.
4. Check in AUTHORS and NEWS.md
```console
$ git commit -m "docs: update NEWS.md and AUTHORS" NEWS.md AUTHORS
$ git push origin master
$ git ci -m "docs: update NEWS.md and AUTHORS" NEWS.md AUTHORS
```
5. Tag the release, validate the tag and push
5. Tag the release and push
```console
$ git tag -s 060
$ git tag -v 060
$ VERSION=052
$ git tag -s "$VERSION"
$ git push --tags
```
Add the section from `NEWS.md` to the git tag message excluding the Rendered
view entry.
Add the section from `NEWS.md` to the git tag message.
6. Create a new release on github (https://github.com/dracutdevs/dracut/releases/new)
6. Push git to kernel.org
With:
```console
$ git remote add kernelorg ssh://gitolite@ra.kernel.org/pub/scm/boot/dracut/dracut.git
```
Push to kernel.org git:
```console
$ git push --atomic kernelorg master "$VERSION"
```
7. Sign and upload tarballs to kernel.org
```console
$ make upload
```
This requires `kup` and a kernel.org account.
Wait until the tarballs are synced to http://www.kernel.org/pub/linux/utils/boot/dracut/ .
8. Create a new release on github (https://github.com/dracutdevs/dracut/releases/new)
- Add the section from `NEWS.md` to the release.
- Attach the tarballs and signature file from http://www.kernel.org/pub/linux/utils/boot/dracut/ to the github release.
7. Open a new milestone, move all unfinished issue from the previous milestone to the new one and close the released milestone (https://github.com/dracutdevs/dracut/milestones)
9. Close the github milestone and open a new one (https://github.com/dracutdevs/dracut/milestones)
10. Ensure that announcement was sent and reached the linux-initramfs mailinglist (https://www.spinics.net/lists/linux-initramfs/)

View File

@@ -1,3 +1,3 @@
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 <harald@profian.com> and not by creating a GitHub issue.
the information, so please disclose the information responsibly by sending an email to Harald Hoyer harald@redhat.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.

View File

@@ -37,13 +37,6 @@ 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() {
@@ -244,7 +237,7 @@ get_maj_min() {
local _out
if [[ $get_maj_min_cache_file ]]; then
_out="$(grep -m1 -oE "^$1 \S+$" "$get_maj_min_cache_file" | awk '{print $NF}')"
_out="$(grep -m1 -oP "^$1 \K\S+$" "$get_maj_min_cache_file")"
fi
if ! [[ "$_out" ]]; then
@@ -390,7 +383,6 @@ find_block_device() {
} && 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
@@ -441,8 +433,6 @@ find_mp_fstype() {
} && 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
@@ -483,8 +473,6 @@ find_dev_fstype() {
} && 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
@@ -511,8 +499,6 @@ find_mp_fsopts() {
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"
}
@@ -536,8 +522,6 @@ find_dev_fsopts() {
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"
}
@@ -633,27 +617,6 @@ for_each_host_dev_and_slaves() {
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"
}
# ugly workaround for the lvm design
# There is no volume group device,
# so, there are no slave devices for volume groups.
@@ -712,7 +675,7 @@ fs_get_option() {
while [ $# -gt 0 ]; do
case $1 in
$_option=*)
echo "${1#"${_option}"=}"
echo "${1#${_option}=}"
break
;;
esac
@@ -738,7 +701,7 @@ check_kernel_config() {
# 0 if the kernel module is either built-in or available
# 1 if the kernel module is not enabled
check_kernel_module() {
modprobe -d "$dracutsysrootdir" -S "$kernel" --dry-run "$1" &> /dev/null || return 1
modprobe -S "$kernel" --dry-run "$1" &> /dev/null || return 1
}
# get_cpu_vendor
@@ -796,40 +759,16 @@ btrfs_devs() {
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
echo "$3"
}
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
echo "$5"
}
peer_for_addr() {
@@ -946,7 +885,7 @@ block_is_nbd() {
}
# block_is_iscsi <maj:min>
# Check whether $1 is an iSCSI device
# Check whether $1 is an nbd device
block_is_iscsi() {
local _dir
local _dev=$1
@@ -983,102 +922,7 @@ 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 strtonum("0x"$2)}}')
magic=$(printf "0x%x" "$magic")
# 0x10b (PE32), 0x20b (PE32+)
[[ $magic == 0x20b || $magic == 0x10b ]] && 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))"
udevadm info -a "$1" | sed -n 's/\s*DRIVERS=="\(\S\+\)"/\1/p'
}

197
dracut-init.sh Executable file → Normal file
View File

@@ -72,6 +72,8 @@ srcmods="$dracutsysrootdir/lib/modules/$kernel/"
}
export srcmods
[[ $DRACUT_FIRMWARE_PATH ]] || export DRACUT_FIRMWARE_PATH="/lib/firmware/updates:/lib/firmware:/lib/firmware/$kernel"
# export standard hookdirs
[[ $hookdirs ]] || {
hookdirs="cmdline pre-udev pre-trigger netroot "
@@ -119,7 +121,7 @@ require_binaries() {
for cmd in "$@"; do
if ! find_binary "$cmd" &> /dev/null; then
dinfo "Module '${_module_name#[0-9][0-9]}' will not be installed, because command '$cmd' could not be found!"
dinfo "dracut module '${_module_name#[0-9][0-9]}' will not be installed, because command '$cmd' could not be found!"
((_ret++))
fi
done
@@ -150,31 +152,6 @@ require_any_binary() {
return 0
}
# helper function for check() in module-setup.sh
# to check for required kernel modules
# issues a standardized warning message
require_kernel_modules() {
# shellcheck disable=SC2154
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"
}
@@ -205,8 +182,8 @@ 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
elif ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/install/dracut-install ]]; then
DRACUT_INSTALL=$dracutbasedir/install/dracut-install
fi
# Test if dracut-install is a standalone executable with no options.
@@ -228,84 +205,64 @@ 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"
"$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=$?
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -d "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -d "$@"
return $_ret
fi
}
inst() {
local _ret _hostonly_install
local _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
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=$?
# shellcheck disable=SC2154
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
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_simple() {
local _ret _hostonly_install
local _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -e $1 ]] || return 1 # no source
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"
return $_ret
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || :
fi
}
inst_symlink() {
local _ret _hostonly_install
local _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
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
fi
}
inst_multiple() {
local _ret _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
local _ret
if "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${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"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
return $_ret
fi
}
@@ -315,7 +272,7 @@ dracut_install() {
}
dracut_instmods() {
local _ret _silent=0
local _silent=0
local i
# shellcheck disable=SC2154
[[ $no_kernel == yes ]] && return
@@ -323,71 +280,50 @@ dracut_instmods() {
[[ $i == "--silent" ]] && _silent=1
done
if $DRACUT_INSTALL \
# shellcheck disable=SC2154
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 "$@"
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_library() {
local _ret _hostonly_install
local _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -e $1 ]] || return 1 # no source
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
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
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
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
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
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
fi
}
inst_fsck_help() {
local _ret _helper="/run/dracut/fsck/fsck_help_$1.txt"
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper"; then
return 0
else
_ret=$?
derror "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper"
return $_ret
local _helper="/run/dracut/fsck/fsck_help_$1.txt"
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper"; then
derror "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper" || :
fi
}
# Use with form hostonly="$(optional_hostonly)" inst_xxxx <args>
# If hostonly mode is set to "strict", hostonly restrictions will still
# If hosotnly 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() {
@@ -487,7 +423,7 @@ inst_rule_programs() {
done
}
# attempt to create any groups and users specified in a udev rule
# attempt to install any programs specified in a udev rule
inst_rule_group_owner() {
local i
@@ -540,7 +476,7 @@ inst_rules() {
inst_rule_initqueue "$_found"
inst_simple "$_found" "$_target/${_found##*/}"
done
[[ $_found ]] || ddebug "Skipping udev rule: $_rule"
[[ $_found ]] || dinfo "Skipping udev rule: $_rule"
done
}
@@ -567,26 +503,10 @@ inst_rules_wildcard() {
_found=$_rule
done
fi
[[ $_found ]] || ddebug "Skipping udev rule: $_rule"
}
# make sure that library links are correct and up to date
build_ld_cache() {
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
[[ $_found ]] || dinfo "Skipping udev rule: $_rule"
}
prepare_udev_rules() {
dwarn "prepare_udev_rules: deprecated and will be removed"
if [ -z "$UDEVVERSION" ]; then
UDEVVERSION=$(udevadm --version)
export UDEVVERSION
@@ -671,22 +591,6 @@ inst_any() {
return 1
}
# inst_libdir_dir <dir> [<dir>...]
# Install a <dir> 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 <pattern>] <file> [<file>...]
# Install a <file> located on a lib directory to the initramfs image
# -n <pattern> install matching files
@@ -698,8 +602,8 @@ inst_libdir_file() {
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"}")
[[ ${_f#$dracutsysrootdir} =~ $_pattern ]] || continue
[[ -e $_f ]] && _files+=("${_f#$dracutsysrootdir}")
done
done
done
@@ -707,7 +611,7 @@ inst_libdir_file() {
for _dir in $libdirs; do
for _i in "$@"; do
for _f in "$dracutsysrootdir$_dir"/$_i; do
[[ -e $_f ]] && _files+=("${_f#"$dracutsysrootdir"}")
[[ -e $_f ]] && _files+=("${_f#$dracutsysrootdir}")
done
done
done
@@ -973,7 +877,7 @@ check_mount() {
&& force_add_dracutmodules+=" $_moddep "
# if a module we depend on fail, fail also
if ! check_module "$_moddep"; then
derror "Module '$_mod' depends on '$_moddep', which can't be installed"
derror "dracut module '$_mod' depends on '$_moddep', which can't be installed"
return 1
fi
done
@@ -1005,7 +909,7 @@ check_module() {
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then
ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!"
ddebug "dracut module '$_mod' will not be installed, because it's in the list to be omitted!"
return 1
fi
@@ -1048,7 +952,7 @@ check_module() {
&& force_add_dracutmodules+=" $_moddep "
# if a module we depend on fail, fail also
if ! check_module "$_moddep"; then
derror "Module '$_mod' depends on '$_moddep', which can't be installed"
derror "dracut module '$_mod' depends on '$_moddep', which can't be installed"
return 1
fi
done
@@ -1066,11 +970,11 @@ for_each_module_dir() {
local _mod
local _moddir
local _func
local _reason
_func=$1
for _moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
[[ -d $_moddir ]] || continue
[[ -e $_moddir/install || -e $_moddir/installkernel || -e $_moddir/module-setup.sh ]] || continue
[[ -e $_moddir/install || -e $_moddir/installkernel || -e \
$_moddir/module-setup.sh ]] || continue
_mod=${_moddir##*/}
_mod=${_mod#[0-9][0-9]}
$_func "$_mod" 1 "$_moddir"
@@ -1087,10 +991,7 @@ for_each_module_dir() {
&& [[ " $omit_dracutmodules " == *\ $_mod\ * ]] \
&& continue
[[ -d $(echo "$dracutbasedir/modules.d"/[0-9][0-9]"$_mod") ]] \
&& _reason="installed" \
|| _reason="found"
derror "Module '$_mod' cannot be $_reason."
derror "dracut module '$_mod' cannot be found or installed."
[[ " $force_add_dracutmodules " == *\ $_mod\ * ]] && exit 1
[[ " $dracutmodules " == *\ $_mod\ * ]] && exit 1
[[ " $add_dracutmodules " == *\ $_mod\ * ]] && exit 1
@@ -1142,7 +1043,7 @@ instmods() {
return 0
fi
$DRACUT_INSTALL \
"$DRACUT_INSTALL" \
${initdir:+-D "$initdir"} \
${dracutsysrootdir:+-r "$dracutsysrootdir"} \
${loginstall:+-L "$loginstall"} \
@@ -1168,7 +1069,7 @@ instmods() {
-m "$@"
fi
[[ "$_optional" ]] && return 0
[[ "$optional" ]] && return 0
return $_ret
}
@@ -1190,7 +1091,7 @@ is_qemu_virtualized() {
# 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
if ! vm=$(systemd-detect-virt --vm > /dev/null 2>&1); then
return 255
fi
[[ $vm == "qemu" ]] && return 0

47
dracut-initramfs-restore.sh Executable file → Normal file
View File

@@ -6,45 +6,28 @@ set -e
[ -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"
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
[[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
mount -o ro /boot &> /dev/null || true
if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
&& [[ -d /efi/$MACHINE_ID || -L /efi/$MACHINE_ID ]]; then
&& [[ $MACHINE_ID ]] \
&& [[ -d /efi/${MACHINE_ID} || -L /efi/${MACHINE_ID} ]]; then
IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \
&& [[ -d /boot/$MACHINE_ID || -L /boot/$MACHINE_ID ]]; then
&& [[ $MACHINE_ID ]] \
&& [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ -d /boot/efi/loader/entries || -L /boot/efi/loader/entries ]] \
&& [[ -d /boot/efi/$MACHINE_ID || -L /boot/efi/$MACHINE_ID ]]; then
IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
IMG="/lib/modules/${KERNEL_VERSION}/initrd"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
IMG="/boot/initramfs-${KERNEL_VERSION}.img"
elif mountpoint -q /efi; then
IMG="/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
elif mountpoint -q /boot/efi; then
IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
IMG="/lib/modules/${KERNEL_VERSION}/initrd"
else
echo "No initramfs image found to restore!"
exit 1
@@ -52,13 +35,13 @@ 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
if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown
elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown
elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown
elif $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown
else
# something failed, so we clean up
@@ -77,7 +60,7 @@ fi
if [ -e /etc/selinux/config -a -x /usr/sbin/setfiles ]; then
. /etc/selinux/config
[ -n "${SELINUXTYPE}" ] && /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null
/usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null
fi
exit 0

View File

@@ -151,7 +151,7 @@ dlog_init() {
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
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
@@ -323,7 +323,7 @@ _do_dlog() {
local msg="$*"
local lmsg="$lvlc: $*"
((lvl <= stdloglvl)) && printf -- 'dracut[%s]: %s\n' "$lvlc" "$msg" >&2
((lvl <= stdloglvl)) && printf -- 'dracut: %s\n' "$msg" >&2
if ((lvl <= sysloglvl)); then
if [[ "$_dlogfd" ]]; then

View File

@@ -8,7 +8,7 @@ i18n_install_all="yes"
stdloglvl=3
sysloglvl=5
install_optional_items+=" vi /usr/libexec/vi /etc/virc ps grep cat rm "
install_optional_items+=" vi /etc/virc ps grep cat rm "
prefix="/"
environment=/usr/lib/environment.d
environmentconfdir=/etc/environment.d
@@ -22,7 +22,7 @@ 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
dbussystem=confdir/etc/dbus-1/system.d
dbussystemservicesconfdir=/etc/dbus-1/system-services
sysctld=/usr/lib/sysctl.d
sysctlconfdir=/etc/sysctl.d

View File

@@ -0,0 +1,5 @@
# /etc/dracut.conf.d/gentoo-systemd.conf
# Paths of systemd dirs on Gentoo
systemdutildir=/usr/lib/systemd
systemdsystemunitdir=/usr/lib/systemd/system

View File

@@ -0,0 +1,15 @@
# /etc/dracut.conf.d/gentoo.conf
# dracut config file customized for Gentoo Base System release 2
udevdir=/lib/udev
ro_mnt=yes
#
# Modules
#
# i18n
i18n_vars="/etc/conf.d/keymaps:keymap-KEYMAP,extended_keymaps-EXT_KEYMAPS /etc/conf.d/consolefont:consolefont-FONT,consoletranslation-FONT_MAP /etc/rc.conf:unicode-UNICODE"
i18n_default_font="LatArCyrHeb-16"
omit_drivers+=" i2o_scsi "

View File

@@ -3,12 +3,22 @@
# 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).
# on the one dracut/mkinitrd got called comment out below setting(s).
hostonly="yes"
hostonly_cmdline="yes"
compress="zstd -3 -T0 -q"
compress="xz -0 --check=crc32 --memlimit-compress=50%"
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 "
# Below adds additional tools to the initrd which are not urgently necessary to
# bring up the system, but help to debug problems.
# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools
# are installed and add more if you need them. This specifically helps if you
# use:
# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|
# mount|pre-pivot|cleanup]
# boot parameter or if you are forced to enter the dracut emergency shell.
# add_dracutmodules+=debug

1033
dracut.sh

File diff suppressed because it is too large Load Diff

View File

@@ -11,51 +11,27 @@ if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
exit 0
fi
# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess.
if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
IMAGE="uki.efi"
UEFI_OPTS="--uefi"
elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
IMAGE="initrd"
UEFI_OPTS="--no-uefi"
if [[ -d "$BOOT_DIR_ABS" ]]; then
INITRD="initrd"
else
# No layout information, use users --uefi/--no-uefi preference
UEFI_OPTS=""
if [[ -d $BOOT_DIR_ABS ]]; then
IMAGE="initrd"
else
BOOT_DIR_ABS="/boot"
IMAGE="initramfs-${KERNEL_VERSION}.img"
fi
BOOT_DIR_ABS="/boot"
INITRD="initramfs-${KERNEL_VERSION}.img"
fi
ret=0
case "$COMMAND" in
add)
if [[ $IMAGE == "uki.efi" ]]; then
IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi
else
IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
fi
if [[ -f ${IMAGE_PREGENERATED} ]]; then
# we found an initrd or uki.efi at the same place as the kernel
INITRD_IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
# we found an initrd 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 "$IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$IMAGE" \
&& chown root:root "$BOOT_DIR_ABS/$IMAGE" \
&& chmod 0600 "$BOOT_DIR_ABS/$IMAGE" \
cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
&& chown root:root "$BOOT_DIR_ABS/$INITRD" \
&& chmod 0600 "$BOOT_DIR_ABS/$INITRD" \
&& 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
if [[ -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
@@ -64,36 +40,26 @@ case "$COMMAND" in
read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ ${i#initrd=*} != "$i" ]] && continue
[[ "${i#initrd=*}" != "$i" ]] && continue
BOOT_OPTIONS+=("$i")
done
fi
unset noimageifnotneeded
for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
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 \
${noimageifnotneeded:+--noimageifnotneeded} \
$([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
$([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \
"$UEFI_OPTS" \
--kver "$KERNEL_VERSION" \
"$BOOT_DIR_ABS/$IMAGE"
dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
ret=$?
;;
;;
remove)
rm -f -- "$BOOT_DIR_ABS/$IMAGE"
rm -f -- "$BOOT_DIR_ABS/$INITRD"
ret=$?
;;
;;
esac
exit $ret

View File

@@ -7,12 +7,13 @@ KERNEL_VERSION="$2"
BOOT_DIR_ABS="${3%/*}/0-rescue"
KERNEL_IMAGE="$4"
dropindirs_sort() {
suffix=$1
shift
dropindirs_sort()
{
suffix=$1; shift
args=("$@")
files=$(
while (($# > 0)); do
while (( $# > 0 )); do
for i in "${1}"/*"${suffix}"; do
[[ -f $i ]] && echo "${i##*/}"
done
@@ -30,17 +31,11 @@ dropindirs_sort() {
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"
[[ -f /etc/os-release ]] && . /etc/os-release
if [[ ${KERNEL_INSTALL_MACHINE_ID+x} ]]; then
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
elif [[ -f /etc/machine-id ]]; then
elif [[ -f /etc/machine-id ]] ; then
read -r MACHINE_ID < /etc/machine-id
fi
@@ -48,11 +43,7 @@ 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
if [[ -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
@@ -61,14 +52,14 @@ else
read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ ${i#initrd=*} != "$i" ]] && continue
[[ "${i#initrd=*}" != "$i" ]] && continue
BOOT_OPTIONS+=("$i")
done
fi
if [[ -d ${BOOT_DIR_ABS%/*} ]]; then
if [[ -d "${BOOT_DIR_ABS%/*}" ]]; then
BOOT_DIR="/${MACHINE_ID}/0-rescue"
BOOT_ROOT=${BOOT_DIR_ABS%"$BOOT_DIR"}
BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf"
KERNEL="linux"
INITRD="initrd"
@@ -84,12 +75,8 @@ 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
[[ -f "$LOADER_ENTRY" ]] && [[ -f "$BOOT_DIR_ABS/$KERNEL" ]] \
&& [[ -f "$BOOT_DIR_ABS/$INITRD" ]] && exit 0
# source our config dir
for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do
@@ -100,30 +87,20 @@ case "$COMMAND" in
done
# shellcheck disable=SC2154
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
[[ $dracut_rescue_image != "yes" ]] && exit 0
[[ -d $BOOT_DIR_ABS ]] || mkdir -p "$BOOT_DIR_ABS"
[[ -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 --no-hostonly --no-uefi \
-a "rescue" \
$([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
--kver "$KERNEL_VERSION" \
"$BOOT_DIR_ABS/$INITRD"
((ret += $?))
dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
((ret+=$?))
fi
[[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo "Creating $LOADER_ENTRY"
if [[ ${BOOT_DIR_ABS} != "/boot" ]]; then
if [[ "${BOOT_DIR_ABS}" != "/boot" ]]; then
{
echo "title $PRETTY_NAME - Rescue Image"
echo "version $KERNEL_VERSION"
@@ -141,13 +118,16 @@ case "$COMMAND" in
sed -i "s/${KERNEL_VERSION}/0-rescue-${MACHINE_ID}/" "$LOADER_ENTRY"
fi
((ret += $?))
((ret+=$?))
;;
remove)
exit 0
;;
*)
usage
ret=1;;
esac
exit $ret

View File

@@ -109,14 +109,7 @@ if [[ $1 ]]; then
exit 1
fi
else
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
[[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
&& [[ $MACHINE_ID ]] \
@@ -126,24 +119,8 @@ else
&& [[ $MACHINE_ID ]] \
&& [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then
image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ -d /boot/efi/loader/entries || -L /boot/efi/loader/entries ]] \
&& [[ $MACHINE_ID ]] \
&& [[ -d /boot/efi/${MACHINE_ID} || -L /boot/efi/${MACHINE_ID} ]]; then
image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
image="/lib/modules/${KERNEL_VERSION}/initrd"
elif [[ -f /lib/modules/${KERNEL_VERSION}/initramfs.img ]]; then
image="/lib/modules/${KERNEL_VERSION}/initramfs.img"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
image="/boot/initramfs-${KERNEL_VERSION}.img"
elif [[ $MACHINE_ID ]] \
&& mountpoint -q /efi; then
image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ $MACHINE_ID ]] \
&& mountpoint -q /boot/efi; then
image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
else
image=""
image="/boot/initramfs-${KERNEL_VERSION}.img"
fi
fi
@@ -177,8 +154,6 @@ extract_files() {
for f in "${!filenames[@]}"; do
[[ $nofileinfo ]] || echo "initramfs:/$f"
[[ $nofileinfo ]] || echo "========================================================================"
# shellcheck disable=SC2001
[[ $f == *"\\x"* ]] && f=$(echo "$f" | sed 's/\\x.\{2\}/????/g')
$CAT "$image" 2> /dev/null | cpio --extract --verbose --quiet --to-stdout "$f" 2> /dev/null
((ret += $?))
[[ $nofileinfo ]] || echo "========================================================================"
@@ -222,9 +197,7 @@ list_squash_content() {
unpack_files() {
if ((${#filenames[@]} > 0)); then
for f in "${!filenames[@]}"; do
# shellcheck disable=SC2001
[[ $f == *"\\x"* ]] && f=$(echo "$f" | sed 's/\\x.\{2\}/????/g')
$CAT "$image" 2> /dev/null | cpio -id --quiet $verbose "$f"
$CAT "$image" 2> /dev/null | cpio -id --quiet $verbose $f
((ret += $?))
done
else
@@ -295,8 +268,8 @@ case $bin in
echo "Early CPIO image"
list_files
fi
if [[ -d "$dracutbasedir/src/skipcpio" ]]; then
SKIP="$dracutbasedir/src/skipcpio/skipcpio"
if [[ -d "$dracutbasedir/skipcpio" ]]; then
SKIP="$dracutbasedir/skipcpio/skipcpio"
else
SKIP="$dracutbasedir/skipcpio"
fi
@@ -343,11 +316,6 @@ case $bin in
;;
esac
type "${CAT%% *}" > /dev/null 2>&1 || {
echo "Need '${CAT%% *}' to unpack the initramfs."
exit 1
}
skipcpio() {
$SKIP "$@" | $ORIG_CAT
}

View File

@@ -51,7 +51,7 @@ Harald Hoyer
AVAILABILITY
------------
The dracut-catimages command is part of the dracut package and is available from
link:$$https://github.com/dracutdevs/dracut$$[https://github.com/dracutdevs/dracut]
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
SEE ALSO
--------

View File

@@ -18,13 +18,8 @@ DESCRIPTION
Create an initramfs <image> for the kernel with the version <kernel version>.
If <kernel version> is omitted, then the version of the actual running
kernel is used. If <image> is omitted or empty, depending on bootloader
specification, the default location can be
_/efi/<machine-id>/<kernel-version>/initrd_,
_/boot/<machine-id>/<kernel-version>/initrd_,
_/boot/efi/<machine-id>/<kernel-version>/initrd_,
_/lib/modules/<kernel-version>/initrd_ or
_/boot/initramfs-<kernel-version>.img_.
kernel is used. If <image> is omitted or empty, then the default location
/boot/initramfs-<kernel version>.img is used.
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
@@ -53,28 +48,22 @@ include::dracut.usage.asc[]
OPTIONS
-------
**--kver** _<kernel version>_::
Set the kernel version. This enables to specify the kernel version, without
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.
_<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.
overwrite existing initramfs file.
**-a, --add** _<list of dracut modules>_::
Add a space-separated list of dracut modules to the default set of modules.
add a space-separated list of dracut modules to the default set of modules.
This parameter can be specified multiple times.
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --add "module1 module2" ...
@@ -82,13 +71,13 @@ example:
===============================
**--force-add** _<list of dracut modules>_::
Force to add a space-separated list of dracut modules to the default set of
force to add a space-separated list of dracut modules to the default set of
modules, when -H is specified. This parameter can be specified multiple
times.
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --force-add "module1 module2" ...
@@ -96,12 +85,12 @@ example:
===============================
**-o, --omit** _<list of dracut modules>_::
Omit a space-separated list of dracut modules. This parameter can be
omit a space-separated list of dracut modules. This parameter can be
specified multiple times.
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --omit "module1 module2" ...
@@ -109,7 +98,7 @@ example:
===============================
**-m, --modules** _<list of dracut modules>_::
Specify a space-separated list of dracut modules to call when building the
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.
@@ -117,7 +106,7 @@ example:
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --modules "module1 module2" ...
@@ -125,13 +114,13 @@ example:
===============================
**-d, --drivers** _<list of kernel modules>_::
Specify a space-separated list of kernel modules to exclusively include
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.
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --drivers "kmodule1 kmodule2" ...
@@ -139,13 +128,13 @@ example:
===============================
**--add-drivers** _<list of kernel modules>_::
Specify a space-separated list of kernel modules to add to the initramfs.
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
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --add-drivers "kmodule1 kmodule2" ...
@@ -158,7 +147,7 @@ example:
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --force-drivers "kmodule1 kmodule2" ...
@@ -166,14 +155,14 @@ example:
===============================
**--omit-drivers** _<list of kernel modules>_::
Specify a space-separated list of kernel modules not to add to the
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
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --omit-drivers "kmodule1 kmodule2" ...
@@ -181,13 +170,13 @@ example:
===============================
**--filesystems** _<list of filesystems>_::
Specify a space-separated list of kernel filesystem modules to exclusively
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
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --filesystems "filesystem1 filesystem2" ...
@@ -195,64 +184,51 @@ example:
===============================
**-k, --kmoddir** _<kernel directory>_::
Specify the directory, where to look for kernel modules.
specify the directory, where to look for kernel modules
**--fwdir** _<dir>[:<dir>...]++_::
Specify additional directories, where to look for firmwares. This parameter
specify additional directories, where to look for firmwares. This parameter
can be specified multiple times.
**--libdirs** _<list of directories>_::
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 <parameters>**::
Specify default kernel command line parameters.
specify default kernel command line parameters
**--kernel-only**::
Only install kernel drivers and firmware files.
only install kernel drivers and firmware files
**--no-kernel**::
Do not install kernel drivers and firmware files.
do not install kernel drivers and firmware files
**--early-microcode**::
Combine early microcode with ramdisk.
Combine early microcode with ramdisk
**--no-early-microcode**::
Do not combine early microcode with ramdisk.
Do not combine early microcode with ramdisk
**--print-cmdline**::
Print the kernel command line for the current disk layout.
print the kernel command line for the current disk layout
**--mdadmconf**::
Include local _/etc/mdadm.conf_ file.
include local _/etc/mdadm.conf_
**--nomdadmconf**::
Do not include local _/etc/mdadm.conf_ file.
do not include local _/etc/mdadm.conf_
**--lvmconf**::
Include local _/etc/lvm/lvm.conf_ file.
include local _/etc/lvm/lvm.conf_
**--nolvmconf**::
Do not include local _/etc/lvm/lvm.conf_ file.
do not include local _/etc/lvm/lvm.conf_
**--fscks** _<list of fsck tools>_::
Add a space-separated list of fsck tools, in addition to _dracut.conf_'s
**--fscks** [LIST]::
add a space-separated list of fsck tools, in addition to _dracut.conf_'s
specification; the installation is opportunistic (non-existing tools are
ignored).
ignored)
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --fscks "fsck.foo barfsck" ...
@@ -260,65 +236,60 @@ example:
===============================
**--nofscks**::
Inhibit installation of any fsck tools.
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.
strip binaries in the initramfs (default)
**--nostrip**::
Do not strip binaries in the initramfs.
do not strip binaries in the initramfs
**--hardlink**::
Hardlink files in the initramfs (default).
hardlink files in the initramfs (default)
**--nohardlink**::
Do not hardlink files in the initramfs.
do not hardlink files in the initramfs
**--prefix** _<dir>_::
Prefix initramfs files with the specified directory.
prefix initramfs files with the specified directory
**--noprefix**::
Do not prefix initramfs files (default).
do not prefix initramfs files (default)
**-h, --help**::
Display help text and exit.
display help text and exit.
**--debug**::
Output debug information of the build process.
output debug information of the build process
**-v, --verbose**::
Increase verbosity level (default is info(4)).
increase verbosity level (default is info(4))
**--version**::
Display version and exit.
display version and exit
**-q, --quiet**::
Decrease verbosity level (default is info(4)).
**-q, --quiet**:: decrease verbosity level (default is info(4))
**-c, --conf** _<dracut configuration file>_::
Specify configuration file to use.
specify configuration file to use.
+
Default:
_/etc/dracut.conf_
**--confdir** _<configuration directory>_::
Specify configuration directory to use.
specify configuration directory to use.
+
Default:
_/etc/dracut.conf.d_
**--tmpdir** _<temporary directory>_::
Specify temporary directory to use.
specify temporary directory to use.
+
Default:
_/var/tmp_
**-r, --sysroot** _<sysroot directory>_::
Specify the sysroot directory to collect files from.
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.
@@ -326,23 +297,22 @@ Default:
Default:
_empty_
**--sshkey** _<sshkey file>_::
SSH key file used with ssh-client module.
**--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
**--logfile** _<logfile>_::
Logfile to use; overrides any setting from the configuration files.
**--logfile** _<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
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
Host-Only mode: Install only what is needed for booting the local host
instead of a generic host and generate host-specific configuration.
+
[WARNING]
@@ -352,47 +322,28 @@ provide a valid _/etc/fstab_.
====
**-N, --no-hostonly**::
Disable host-only mode.
Disable Host-Only mode
**--hostonly-mode _<mode>_**::
Specify the host-only mode to use. _<mode>_ 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
**--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-cmdline**::
Do not store kernel command line arguments needed in the initramfs.
**--no-hostonly-default-device**::
**--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).
**--hostonly-i18n**:
Install only needed keyboard and font files according to the host configuration (default).
**--no-hostonly-i18n**::
**--no-hostonly-i18n**:
Install all keyboard and font files available.
**--hostonly-nics** _<list of 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** _<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).
_<policy>_ can be any directory name found in /dev/disk.
E.g. "by-uuid", "by-label"
**--fstab**::
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
@@ -406,7 +357,7 @@ Default:
be specified, see fstab manpage for the details.
The default _<filesystem options>_ is "defaults".
The default _<dump frequency>_ is "0".
The default _<fsck order>_ is "2".
the default _<fsck order>_ is "2".
**--mount** "_<mountpoint>_"::
Like above, but _<device>_, _<filesystem type>_ and _<filesystem options>_
@@ -414,22 +365,22 @@ Default:
**--add-device** _<device>_ ::
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
This can be useful in host-only mode for resume support when your swap is on
This can be useful in hostonly 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** _<SOURCE>_ _<TARGET>_::
Include the files in the SOURCE directory into the
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** _<file list>_::
Install the space separated list of files into the initramfs.
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
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --install "/bin/foo /sbin/bar" ...
@@ -437,12 +388,12 @@ example:
===============================
**--install-optional** _<file list>_::
Install the space separated list of files into the initramfs, if they exist.
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. Equivalent to
"--compress=gzip -9".
"--compress=gzip -9"
**--bzip2**::
Compress the generated initramfs using bzip2.
@@ -450,7 +401,7 @@ example:
[WARNING]
====
Make sure your kernel has bzip2 decompression support compiled in, otherwise you
will not be able to boot. Equivalent to "--compress=bzip2 -9".
will not be able to boot. Equivalent to "--compress=bzip2"
====
**--lzma**::
@@ -459,7 +410,7 @@ will not be able to boot. Equivalent to "--compress=bzip2 -9".
[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".
will not be able to boot. Equivalent to "lzma --compress=lzma -9"
====
**--xz**::
@@ -469,34 +420,31 @@ will not be able to boot. Equivalent to "--compress=lzma -9 -T0".
====
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".
"lzma --compress=xz --check=crc32 --lzma2=dict=1MiB"
====
**--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".
will not be able to boot.
====
**--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".
will not be able to boot.
====
**--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".
will not be able to boot.
====
**--compress** _<compressor>_::
@@ -505,14 +453,7 @@ will not be able to boot. Equivalent to "--compress=zstd -15 -q -T0".
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** _<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.
The default value can also be set via the _INITRD_COMPRESS_ environment variable.
**--no-compress**::
Do not compress the generated initramfs. This will override any other
@@ -534,16 +475,16 @@ will not be able to boot. Equivalent to "--compress=zstd -15 -q -T0".
Keep the initramfs temporary directory for debugging purposes.
**--printsize**::
Print out the module install size.
Print out the module install size
**--profile**::
Output profile information of the build process.
**--profile**:
Output profile information of the build process
**--ro-mnt**::
**--ro-mnt**:
Mount / and /usr read-only by default.
**-L, --stdlog** _<level>_::
[0-6] Specify logging level (to standard error).
[0-6] Specify logging level (to standard error)
----
0 - suppress any messages
1 - only fatal errors
@@ -558,57 +499,36 @@ will not be able to boot. Equivalent to "--compress=zstd -15 -q -T0".
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 _<directory>_**::
Log all files installed from the host to _<directory>_.
**--loginstall _<DIR>_**::
Log all files installed from the host to _<DIR>_.
**--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>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_.
<EFI> might be _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP
partition is mounted. The <BUILD_ID> 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-existant or empty.
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>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_. <EFI> might be
_/efi_, _/boot_ or _/boot/efi_ depending on where the ESP partition is mounted.
The <BUILD_ID> 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-existant or empty.
**--no-uefi**::
Disables UEFI mode.
**--no-machineid**::
Affects the default output filename of **--uefi** and will discard the
<MACHINE_ID> part.
affects the default output filename of **--uefi** and will discard the <MACHINE_ID>
part.
**--uefi-stub _<file>_**::
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-MACHINE-TYPE-NAME>.efi.stub_.
**--uefi-stub _<FILE>_**::
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-MACHINE-TYPE-NAME>.efi.stub_
**--uefi-splash-image _<file>_**::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**)
image format.
**--uefi-splash-image _<FILE>_**::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**) image
format.
**--kernel-image _<file>_**::
Specifies the kernel image, which to include in the UEFI executable. The
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
_/boot/vmlinuz-<KERNEL-VERSION>_.
**--enhanced-cpio**::
Attempt to use the dracut-cpio binary, which optimizes archive creation for
copy-on-write filesystems by using the 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.
**--kernel-image _<FILE>_**::
Specifies the kernel image, which to include in the UEFI executable. The default is
_/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
ENVIRONMENT
-----------
@@ -742,7 +662,7 @@ _/etc/cmdline.d/*.conf_::
AVAILABILITY
------------
The dracut command is part of the dracut package and is available from
link:$$https://github.com/dracutdevs/dracut$$[https://github.com/dracutdevs/dracut]
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
AUTHORS
-------

View File

@@ -1,7 +1,7 @@
dracut {mainversion}
====================
:author: Harald Hoyer
:email: harald@profian.com
:email: harald@redhat.com
:revnumber: {version}
:language: bash
@@ -50,7 +50,7 @@ computer. This can be:
* The root file system itself
* A boot image on an optical disc
* A small ext2/ext3/ext4 or FAT-formatted partition on a local disk
* A small ext2/ext3 or FAT-formatted partition on a local disk
(a _boot partition_)
* A TFTP server (on systems that can boot from Ethernet)

View File

@@ -56,7 +56,7 @@ root=PARTUUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
[listing]
.Example
--
rootfstype=ext4
rootfstype=ext3
--
**rootflags=**__<mount options>__::
@@ -134,7 +134,7 @@ menuentry 'Live Fedora 20' --class fedora --class gnu-linux --class gnu --class
Misc
~~~~
**rd.emergency=**__[reboot|poweroff|halt]__::
specify, what action to execute in case of a critical failure. rd.shell=0 must also
specify, what action to execute in case of a critical failure. rd.shell=0 also
be specified.
**rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]::
@@ -151,7 +151,7 @@ Misc
**rd.retry=**__<seconds>__::
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
The default is 30 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.
@@ -221,7 +221,7 @@ It should be attached to any report about dracut problems.
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
drop to a shell on defined breakpoint
**rd.udev.info**::
set udev to loglevel info
@@ -453,11 +453,6 @@ 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 in
rd.luk.key. This gives a chance to the removable device containing the key
to initialise.
MD RAID
~~~~~~~
**rd.md=0**::
@@ -580,11 +575,6 @@ USB Android phone::
* enp0s29u1u2
=====================
The following options are supported by the 'network-legacy' dracut
module. Other network modules might support a slightly different set of
options; refer to the documentation of the specific network module in use. For
NetworkManager, see *nm-initrd-generator*(8).
**ip=**__{dhcp|on|any|dhcp6|auto6|either6|link6|single-dhcp}__::
dhcp|on|any::: get ip from dhcp server from all interfaces. If netroot=dhcp,
loop sequentially through all interfaces (eth0, eth1, ...) and use the first
@@ -594,7 +584,7 @@ NetworkManager, see *nm-initrd-generator*(8).
opposed to one after another. After the first DHCP response is received,
stop DHCP on all other interfaces. This gives the fastest boot time by
using the IP on interface for which DHCP succeeded first during early boot.
Caveat: Does not apply to Network Manager.
Caveat: Does not apply to Network Manager and to SUSE using wicked.
auto6::: IPv6 autoconfiguration
@@ -740,7 +730,7 @@ NFS
Default is 1.
**rd.net.timeout.dhcp=**__<arg>__::
If this option is set, dhclient is called with "--timeout <arg>".
If this option is set, dhclient is called with "-timeout <arg>".
**rd.net.timeout.iflink=**__<seconds>__::
Wait <seconds> until link shows up. Default is 60 seconds.
@@ -895,18 +885,6 @@ NOTE: letters in the MAC-address must be lowercase!
NVMf
~~~~
**rd.nonvmf**::
Disable NVMf
**rd.nvmf.nonbft**::
Disable connecting to targets from the NVMe Boot Firmware Table. Without
this parameter, NBFT connections will take precedence over _rd.nvmf.discover_.
**rd.nvmf.nostatic**::
Disable connecting to targets that have been statically configured when
the initramfs was built. Targets specified with rd.nvmf.discover on the
kernel command line will still be tried.
**rd.nvmf.hostnqn=**__<hostNQN>__::
NVMe host NQN to use
@@ -918,19 +896,9 @@ NVMf
_<traddr>_ and the optionally _<host_traddr>_ or _<trsvcid>_.
The first argument specifies the transport to use; currently only
'rdma', 'fc', or 'tcp' are supported.
The _<traddr>_ parameter can be set to 'auto' to select
autodiscovery; in that case all other parameters are ignored.
This parameter can be specified multiple times.
+
[listing]
.Examples
--
rd.nvmf.discover=tcp,192.168.10.10,,4420
rd.nvmf.discover=fc,nn-0x201700a05634f5bf:pn-0x201900a05634f5bf,nn-0x200000109b579ef3:pn-0x100000109b579ef3
--
**rd.nvmf.discover=fc,auto**::
This special syntax determines that Fibre Channel autodiscovery
is to be used rather than regular NVMe discovery. It takes precedence
over all other _rd.nvmf.discover=_ arguments.
NBD
~~~
@@ -950,25 +918,6 @@ NOTE:
If "exportname" instead of "port" is given the standard port is used.
Newer versions of nbd are only supported with "exportname".
VIRTIOFS
~~~~~~~~
**root=**virtiofs:__<mount-tag>__::
mount virtiofs share using the tag <mount-tag>.
The tag name is arbitrary and must match the tag given in the qemu '-device' command.
**rootfstype=**virtiofs **root=**__<mount-tag>__::
mount virtiofs share using the tag <mount-tag>.
The tag name is arbitrary and must match the tag given in the qemu '-device' command.
Both formats are supported by the 'virtiofs' dracut module.
See https://gitlab.com/virtio-fs/virtiofsd for more information.
[listing]
.Example
--
root=virtiofs:host rw
--
DASD
~~~~
**rd.dasd=**....::
@@ -1126,13 +1075,6 @@ NOTE: There must be enough free RAM available to hold the complete image.
+
This method is very suitable for diskless boots.
**rd.minmem=**__<megabyte>__::
Specify minimum free RAM in MB after copying a live disk image into memory.
The default is 1024.
+
This parameter only applies together with the parameters rd.writable.fsimg
or rd.live.ram.
**root=**live:__<url>__::
Boots a live image retrieved from __<url>__. Requires the dracut 'livenet'
module. Valid handlers: __http, https, ftp, torrent, tftp__.
@@ -1187,10 +1129,6 @@ rd.live.overlay=/dev/sdb1:persistent-overlay.img
rd.live.overlay=UUID=99440c1f-8daa-41bf-b965-b7240a8996f4
--
**rd.live.overlay.cowfs=**__[btrfs|ext4|xfs]__::
Specifies the filesystem to use when formatting the overlay partition.
The default is ext4.
**rd.live.overlay.size=**__<size_MiB>__::
Specifies a non-persistent Device-mapper overlay size in MiB. The default is
_32768_.
@@ -1297,8 +1235,8 @@ masterkey=/etc/keys/kmk-trusted.blob
masterkeytype=trusted
--
**evmkey=**__<EVM HMAC key path name>__::
Set the path name of the EVM HMAC key.
**evmkey=**__<EVM key path name>__::
Set the path name of the EVM key.
+
[listing]
.Example
@@ -1306,15 +1244,6 @@ masterkeytype=trusted
evmkey=/etc/keys/evm-trusted.blob
--
**evmx509=**__<EVM X.509 cert path name>__::
Set the path name of the EVM X.509 certificate.
+
[listing]
.Example
--
evmx509=/etc/keys/x509_evm.der
--
**ecryptfskey=**__<eCryptfs key path name>__::
Set the path name of the eCryptfs key.
+
@@ -1386,6 +1315,10 @@ rd_LVM_LV:: rd.lvm.lv
rd_NO_LVM:: rd.lvm=0
rd_LVM_SNAPSHOT:: rd.lvm.snapshot
rd_LVM_SNAPSIZE:: rd.lvm.snapsize
rd_LVM_VG:: rd.lvm.vg
rd_NO_MDADMCONF:: rd.md.conf=0

View File

@@ -36,21 +36,21 @@ Configuration files must have the extension .conf; other extensions are ignored.
Add a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
*force_add_dracutmodules+=*" __<dracut modules>__ "::
Force to add a space-separated list of dracut modules to the default set of
modules, when host-only mode is specified. This parameter can be specified
multiple times.
*omit_dracutmodules+=*" __<dracut modules>__ "::
Omit a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
*dracutmodules+=*" __<dracut 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 option forces dracut to only include the specified dracut modules.
In most cases the "add_dracutmodules" option is what you want to use.
*omit_dracutmodules+=*" __<dracut modules>__ "::
Omit a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
*drivers+=*" __<kernel modules>__ "::
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.
*add_drivers+=*" __<kernel modules>__ "::
Specify a space-separated list of kernel modules to add to the initramfs.
The kernel modules have to be specified without the ".ko" suffix.
@@ -63,24 +63,15 @@ Configuration files must have the extension .conf; other extensions are ignored.
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.
*drivers+=*" __<kernel modules>__ "::
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.
*filesystems+=*" __<filesystem names>__ "::
Specify a space-separated list of kernel filesystem modules to exclusively
include in the generic initramfs.
*drivers_dir=*"__<kernel modules directory>__"::
Specify the directory where to look for kernel modules.
Specify the directory, where to look for kernel modules
*fw_dir+=*" :__<dir>__[:__<dir>__ ...] "::
Specify additional colon-separated list of directories where to look for
firmware files.
*libdirs+=*" __<dir>__[ __<dir>__ ...] "::
Specify a space-separated list of directories where to look for libraries.
Specify additional directories, where to look for firmwares, separated by :
*install_items+=*" __<file>__[ __<file>__ ...] "::
Specify additional files to include in the initramfs, separated by spaces.
@@ -89,61 +80,28 @@ Configuration files must have the extension .conf; other extensions are ignored.
Specify additional files to include in the initramfs, separated by spaces,
if they exist.
*compress=*"__{cat|bzip2|lzma|xz|gzip|lzop|lz4|zstd|<compressor [args ...]>}__"::
*compress=*"__{cat|bzip2|lzma|xz|gzip|lzo|lz4|zstd|<compressor [args ...]>}__"::
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 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.
program with known-working arguments. If you pass 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.
To disable compression, use "cat".
*squash_compress=*"__{<compressor [args ...]>}__"::
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.
*do_strip=*"__{yes|no}__"::
Strip binaries in the initramfs (default=yes).
*aggressive_strip=*"__{yes|no}__"::
Strip more than just debug symbol and sections, for a smaller initramfs
build. The "do_strip=yes" option must also be specified (default=no).
*do_hardlink=*"__{yes|no}__"::
Hardlink files in the initramfs (default=yes).
*prefix=*" __<directory>__ "::
Prefix initramfs files with __<directory>__.
Strip binaries in the initramfs (default=yes)
*hostonly=*"__{yes|no}__"::
Host-only mode: Install only what is needed for booting the local host
instead of a generic host and generate host-specific configuration
(default=no).
*hostonly_mode=*"__{sloppy|strict}__"::
Specify the host-only mode to use (default=sloppy).
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.
Host-Only mode: Install only what is needed for booting the local host
instead of a generic host and generate host-specific configuration.
*hostonly_cmdline=*"__{yes|no}__"::
If set to "yes", store the kernel command line arguments needed in the
initramfs. If **hostonly="yes"** and this option is not configured, it's
automatically set to "yes".
*hostonly_nics+=*" [__<nic>__[ __<nic>__ ...]] "::
Only enable listed NICs in the initramfs. The list can be empty, so other
modules can install only the necessary network drivers.
If set to "yes", store the kernel command line arguments needed in the initramfs
*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=mapper).
_<policy>_ can be any directory name found in /dev/disk.
E.g. "by-uuid", "by-label"
*tmpdir=*"__<temporary directory>__"::
Specify temporary directory to use.
@@ -155,21 +113,21 @@ provide a valid _/etc/fstab_.
====
*use_fstab=*"__{yes|no}__"::
Use _/etc/fstab_ instead of _/proc/self/mountinfo_ (default=no).
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
*add_fstab+=*" __<filename>__ "::
Add entries of __<filename>__ to the initramfs /etc/fstab.
*add_device+=*" __<device>__ "::
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
This can be useful in host-only mode for resume support when your swap is on
This can be useful in hostonly mode for resume support when your swap is on
LVM an encrypted partition.
*mdadmconf=*"__{yes|no}__"::
Include local _/etc/mdadm.conf_ (default=no).
Include local _/etc/mdadm.conf_ (default=yes)
*lvmconf=*"__{yes|no}__"::
Include local _/etc/lvm/lvm.conf_ (default=no).
Include local _/etc/lvm/lvm.conf_ (default=yes)
*fscks=*" __<fsck tools>__ "::
Add a space-separated list of fsck tools. If nothing is specified, the
@@ -178,19 +136,19 @@ provide a valid _/etc/fstab_.
(non-existing tools are ignored).
*nofscks=*"__{yes|no}__"::
If specified, inhibit installation of any fsck tools (default=no).
If specified, inhibit installation of any fsck tools.
*ro_mnt=*"__{yes|no}__"::
Mount _/_ and _/usr_ read-only by default (default=no).
Mount _/_ and _/usr_ read-only by default.
*kernel_cmdline=*"__parameters__"::
Specify default kernel command line parameters.
Specify default kernel command line parameters
*kernel_only=*"__{yes|no}__"::
Only install kernel drivers and firmware files (default=no).
Only install kernel drivers and firmware files. (default=no)
*no_kernel=*"__{yes|no}__"::
Do not install kernel drivers and firmware files (default=no).
Do not install kernel drivers and firmware files (default=no)
*acpi_override=*"__{yes|no}__"::
[WARNING] ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING! +
@@ -208,40 +166,22 @@ provide a valid _/etc/fstab_.
Directory to search for ACPI tables if acpi_override= is set to yes.
*early_microcode=*"{yes|no}"::
Combine early microcode with ramdisk (default=yes).
Combine early microcode with ramdisk (default=yes)
*stdloglvl*="__\{0-6\}__"::
Specify logging level for standard error (default=4).
[NOTE]
===============================
Logging levels:
----
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)
----
===============================
Set logging to standard error level.
*sysloglvl*="__\{0-6\}__"::
Specify logging level for syslog (default=0).
Set logging to syslog level.
*fileloglvl=*"__\{0-6\}__"::
Specify logging level for logfile (default=4).
Set logging to file level.
*logfile=*"__<file>__"::
Path to logfile.
*sshkey=*"__<file>__"::
SSH key file used with ssh-client module.
Path to log file.
*show_modules=*"__{yes|no}__"::
Print the name of the included modules to standard output during build
(default=no).
Print the name of the included modules to standard output during build.
*i18n_vars=*"__<variable mapping>__"::
Distribution specific variable mapping.
@@ -252,68 +192,29 @@ Logging levels:
Default is "eurlatgr".
*i18n_install_all=*"__{yes|no}__"::
Install everything regardless of generic or host-only mode (default=no).
Install everything regardless of generic or hostonly mode.
*reproducible=*"__{yes|no}__"::
Create reproducible images (default=no).
Create reproducible images.
*noimageifnotneeded=*"__{yes|no}__"::
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
(default=no).
*loginstall=*"__<DIR>__"::
Log all files installed from the host to _<DIR>_.
*loginstall=*"__<directory>__"::
Log all files installed from the host to _<directory>_.
*uefi_stub=*"_<FILE>_"::
Specifies the UEFI stub loader, which will load the attached kernel, initramfs and
kernel command line and boots the kernel. The default is
_/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
*uefi=*"__{yes|no}__"::
Instead of creating an initramfs image, dracut will create an UEFI
executable, which can be executed by an UEFI BIOS (default=no).
The default output filename is
_<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_.
<EFI> might be _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP
partition is mounted. The <BUILD_ID> 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-existant or empty.
*uefi_splash_image=*"_<FILE>_"::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**) image format.
*machine_id=*"__{yes|no}__"::
Affects the default output filename of the UEFI executable, including the
<MACHINE_ID> part (default=yes).
*uefi_secureboot_cert=*"_<FILE>_", *uefi_secureboot_key=*"_<FILE>_"::
Specifies a certificate and corresponding key, which are used to sign the created UEFI executable.
Requires both certificate and key need to be specified and _sbsign_ to be installed.
*uefi_stub=*"_<file>_"::
Specifies the UEFI stub loader, which will load the attached kernel,
initramfs and kernel command line and boots the kernel. The default is
_/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_.
*uefi_splash_image=*"_<file>_"::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**)
image format.
*uefi_secureboot_cert=*"_<file>_", *uefi_secureboot_key=*"_<file>_"::
Specifies a certificate and corresponding key, which are used to sign the
created UEFI executable.
Requires both certificate and key need to be specified and _sbsign_ to be
installed.
*uefi_secureboot_engine=*"_parameter_"::
Specifies an engine to use when signing the created UEFI executable. E.g. "pkcs11"
*kernel_image=*"_<file>_"::
Specifies the kernel image, which to include in the UEFI executable. The
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
_/boot/vmlinuz-<KERNEL-VERSION>_.
*enhanced_cpio=*"__{yes|no}__"::
Attempt to use the dracut-cpio binary, which optimizes archive creation for
copy-on-write filesystems (default=no).
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 **compress="cat"** and **do_strip="no"**
parameters, with initramfs source files, **tmpdir** staging area and
destination all on the same copy-on-write capable filesystem.
*parallel=*"__{yes|no}__"::
If set to _yes_, try to execute tasks in parallel (currently only supported
for _--regenerate-all_).
*kernel_image=*"_<FILE>_"::
Specifies the kernel image, which to include in the UEFI executable. The default is
_/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
Files
-----

View File

@@ -5,13 +5,9 @@ To create a initramfs image, the most simple command is:
This will generate a general purpose initramfs image, with all possible
functionality resulting of the combination of the installed dracut modules and
system tools. The image, depending on bootloader specification, can be
_/efi/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
_/boot/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
_/boot/efi/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
_/lib/modules/_++<kernel-version>++_/initrd_ or
_/boot/initramfs-_++<kernel-version>++_.img_ and contains the kernel modules of
the currently active kernel with version _++<kernel-version>++_.
system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
contains the kernel modules of the currently active kernel with version
_++<kernel version>++_.
If the initramfs image already exists, dracut will display an error message, and
to overwrite the existing image, you have to use the --force option.
@@ -107,7 +103,7 @@ The kernel command line can also be provided by the dhcp server with the
root-path option. See <<NetworkBoot>>.
For a full reference of all kernel command line parameters,
see *dracut.cmdline*(7).
see *dracut.cmdline*(5).
To get a quick start for the suitable kernel command line on your system,
use the __--print-cmdline__ option:
@@ -165,8 +161,8 @@ a modern init system, like systemd.
==== Blacklisting Kernel Modules
Sometimes it is required to prevent the automatic kernel module loading of a
specific kernel module. To do this, just add rd.driver.blacklist=_++<kernel
module name>++_, with _++<kernel module name>++_ not containing the _.ko_
specific kernel module. To do this, just add rd.blacklist=_++<kernel module
name>++_, with _++<kernel module name>++_ not containing the _.ko_
suffix, to the kernel command line. For example:
----
rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau
@@ -232,10 +228,10 @@ creation time.
----
# dracut --install 'strace fsck.ext4 ssh' initramfs-dbg.img
# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
----
This will create an initramfs with the strace, fsck.ext4 and ssh executables,
This will create an initramfs with the strace, fsck.ext3 and ssh executables,
together with the libraries needed to start those. The --install option can be
specified multiple times.
@@ -283,7 +279,10 @@ This will reduce the size of the initramfs image significantly.
== Troubleshooting
If the boot process does not succeed, you have several options to debug the
situation.
situation. Some of the basic operations are covered here. For more information
you should also visit:
https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
[[identifying-your-problem-area]]
=== Identifying your problem area
@@ -468,7 +467,7 @@ any logical volumes.
/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext4"
/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
----
+

View File

@@ -13,15 +13,12 @@ SYNOPSIS
--------
*lsinitrd* ['OPTION...'] [<image> [<filename> [<filename> [...] ]]]
*lsinitrd* ['OPTION...'] -k <kernel version>
*lsinitrd* ['OPTION...'] -k <kernel-version>
DESCRIPTION
-----------
lsinitrd shows the contents of an initramfs image. if <image> is omitted, then
lsinitrd uses the default image _/efi/<machine-id>/<kernel-version>/initrd_,
_/boot/<machine-id>/<kernel-version>/initrd_,
_/boot/efi/<machine-id>/<kernel-version>/initrd_,
_/lib/modules/<kernel-version>/initrd_ or
lsinitrd uses the default image _/boot/<machine-id>/<kernel-version>/initrd_ or
_/boot/initramfs-<kernel-version>.img_.
OPTIONS
@@ -56,7 +53,7 @@ OPTIONS
AVAILABILITY
------------
The lsinitrd command is part of the dracut package and is available from
link:$$https://github.com/dracutdevs/dracut$$[https://github.com/dracutdevs/dracut]
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
AUTHORS
-------

View File

@@ -7,7 +7,6 @@ check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries mksh || return 1
require_binaries printf || return 1
# Return 255 to only include the module, if another module requires it.
return 255
@@ -26,7 +25,6 @@ depends() {
install() {
inst /bin/mksh
inst printf
# Prefer mksh as default shell if no other shell is preferred.
[[ -L $initdir/bin/sh ]] || ln -sf mksh "${initdir}/bin/sh"

View File

@@ -43,10 +43,10 @@ install() {
"$systemdutildir"/systemd-modules-load \
"$systemdutildir"/systemd-vconsole-setup \
"$systemdutildir"/systemd-volatile-root \
"$systemdutildir"/systemd-sysroot-fstab-check \
"$systemdutildir"/system-generators/systemd-debug-generator \
"$systemdutildir"/system-generators/systemd-fstab-generator \
"$systemdutildir"/system-generators/systemd-gpt-auto-generator \
\
"$systemdsystemunitdir"/debug-shell.service \
"$systemdsystemunitdir"/cryptsetup.target \
"$systemdsystemunitdir"/cryptsetup-pre.target \
@@ -78,8 +78,9 @@ install() {
"$systemdsystemunitdir"/timers.target \
"$systemdsystemunitdir"/paths.target \
"$systemdsystemunitdir"/umount.target \
\
"$systemdsystemunitdir"/sys-kernel-config.mount \
"$systemdsystemunitdir"/modprobe@.service \
\
"$systemdsystemunitdir"/kmod-static-nodes.service \
"$systemdsystemunitdir"/systemd-tmpfiles-setup.service \
"$systemdsystemunitdir"/systemd-tmpfiles-setup-dev.service \
@@ -103,7 +104,10 @@ install() {
"$systemdsystemunitdir"/systemd-journald.service \
"$systemdsystemunitdir"/systemd-vconsole-setup.service \
"$systemdsystemunitdir"/systemd-volatile-root.service \
"$systemdsystemunitdir"/systemd-random-seed-load.service \
"$systemdsystemunitdir"/systemd-random-seed.service \
"$systemdsystemunitdir"/systemd-sysctl.service \
\
"$systemdsystemunitdir"/sysinit.target.wants/systemd-modules-load.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-ask-password-console.path \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-journald.service \
@@ -118,14 +122,18 @@ install() {
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \
\
"$systemdsystemunitdir"/ctrl-alt-del.target \
"$systemdsystemunitdir"/reboot.target \
"$systemdsystemunitdir"/systemd-reboot.service \
"$systemdsystemunitdir"/syslog.socket \
\
"$systemdsystemunitdir"/slices.target \
"$systemdsystemunitdir"/system.slice \
"$systemdsystemunitdir"/-.slice \
\
"$tmpfilesdir"/systemd.conf \
\
journalctl systemctl \
echo swapoff \
kmod insmod rmmod modprobe modinfo depmod lsmod \
@@ -166,8 +174,6 @@ install() {
/etc/systemd/journald.conf.d/*.conf \
/etc/systemd/system.conf \
/etc/systemd/system.conf.d/*.conf \
"$systemdsystemconfdir"/modprobe@.service \
"$systemdsystemconfdir/modprobe@.service.d/*.conf" \
/etc/hosts \
/etc/hostname \
/etc/nsswitch.conf \
@@ -186,7 +192,6 @@ install() {
if ! [[ -e "$initdir/etc/machine-id" ]]; then
: > "$initdir/etc/machine-id"
chmod 444 "$initdir/etc/machine-id"
fi
# install adm user/group for journald
@@ -208,23 +213,8 @@ install() {
grep '^systemd-network:' "$dracutsysrootdir"/etc/group 2> /dev/null
} >> "$initdir/etc/group"
local _systemdbinary="$systemdutildir"/systemd
if ldd "$_systemdbinary" | grep -qw libasan; then
local _wrapper="$systemdutildir"/systemd-asan-wrapper
cat > "$initdir"/"$_wrapper" << EOF
#!/bin/sh
mount -t proc -o nosuid,nodev,noexec proc /proc
exec $_systemdbinary
EOF
chmod 755 "$initdir"/"$_wrapper"
_systemdbinary="$_wrapper"
unset _wrapper
fi
ln_r "$_systemdbinary" "/init"
ln_r "$_systemdbinary" "/sbin/init"
unset _systemdbinary
ln_r "$systemdutildir"/systemd "/init"
ln_r "$systemdutildir"/systemd "/sbin/init"
inst_binary true
ln_r "$(find_binary true)" "/usr/bin/loginctl"

0
modules.d/00warpclock/module-setup.sh Executable file → Normal file
View File

0
modules.d/00warpclock/warpclock.sh Executable file → Normal file
View File

View File

@@ -8,9 +8,7 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif getarg boot= > /dev/null; then
. /sbin/fips.sh
fips_info "fips-boot: start"
if mount_boot; then
do_fips || die "FIPS integrity test failed"
fi
fips_info "fips-boot: done!"
fi

2
modules.d/01fips/fips-load-crypto.sh Executable file → Normal file
View File

@@ -8,7 +8,5 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
else
. /sbin/fips.sh
fips_info "fips-load-crypto: start"
fips_load_crypto || die "FIPS integrity test failed"
fips_info "fips-load-crypto: done!"
fi

View File

@@ -1,15 +1,11 @@
#!/bin/sh
type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then
rm -f -- /etc/modprobe.d/fips.conf > /dev/null 2>&1
elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif ! [ -f /tmp/fipsdone ]; then
. /sbin/fips.sh
fips_info "fips-noboot: start"
mount_boot
do_fips || die "FIPS integrity test failed"
fips_info "fips-noboot: done!"
fi

View File

@@ -18,15 +18,6 @@ mount_boot() {
boot=$(getarg boot=)
if [ -n "$boot" ]; then
if [ -d /boot ] && ismounted /boot; then
boot_dev=
if command -v findmnt > /dev/null; then
boot_dev=$(findmnt -n -o SOURCE /boot)
fi
fips_info "Ignoring 'boot=$boot' as /boot is already mounted ${boot_dev:+"from '$boot_dev'"}"
return 0
fi
case "$boot" in
LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*)
boot="$(label_uuid_to_dev "$boot")"
@@ -56,13 +47,10 @@ mount_boot() {
mkdir -p /boot
fips_info "Mounting $boot as /boot"
mount -oro "$boot" /boot || return 1
FIPS_MOUNTED_BOOT=1
elif ! ismounted /boot && [ -d "$NEWROOT/boot" ]; then
elif [ -d "$NEWROOT/boot" ]; then
# shellcheck disable=SC2114
rm -fr -- /boot
ln -sf "$NEWROOT/boot" /boot
else
die "You have to specify boot=<boot device> as a boot option for fips=1"
fi
}
@@ -91,10 +79,9 @@ nonfatal_modprobe() {
fips_load_crypto() {
local _k
local _v
local _module
local _found
read -d '' -r FIPSMODULES < /etc/fipsmodules
FIPSMODULES=$(cat /etc/fipsmodules)
fips_info "Loading and integrity checking all crypto modules"
mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak
@@ -121,75 +108,55 @@ fips_load_crypto() {
}
do_fips() {
local _v
local _module
KERNEL=$(uname -r)
if ! getarg rd.fips.skipkernel > /dev/null; then
fips_info "Checking integrity of kernel"
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/vmlinuz0 || return 1
elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
elif [ -e "/run/install/repo/images/pxeboot/vmlinuz" ]; then
# This is a boot.iso with the .hmac inside the install.img
do_rhevh_check /run/install/repo/images/pxeboot/vmlinuz || return 1
else
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
fips_info "Checking integrity of kernel"
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/vmlinuz0 || return 1
elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
elif [ -e "/run/install/repo/images/pxeboot/vmlinuz" ]; then
# This is a boot.iso with the .hmac inside the install.img
do_rhevh_check /run/install/repo/images/pxeboot/vmlinuz || return 1
else
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
# Trim off any leading GRUB boot device (e.g. ($root) )
BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
# On s390x, BOOT_IMAGE isn't a path but an integer representing the
# entry number selected. Let's try the root of /boot first, and
# otherwise fallback to trying to parse the BLS entries if it's a
# BLS-based system.
if [ "$(uname -m)" = s390x ]; then
if [ -e "/boot/vmlinuz-${KERNEL}" ]; then
BOOT_IMAGE="vmlinuz-${KERNEL}"
elif [ -d /boot/loader/entries ]; then
bls=$(find /boot/loader/entries -name '*.conf' | sort -rV | sed -n "$((BOOT_IMAGE + 1))p")
if [ -e "${bls}" ]; then
BOOT_IMAGE=$(grep ^linux "${bls}" | cut -d' ' -f2)
fi
fi
fi
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}"
# Trim off any leading GRUB boot device (e.g. ($root) )
BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
BOOT_IMAGE_PATH="${BOOT_IMAGE%"${BOOT_IMAGE_NAME}"}"
if [ -z "$BOOT_IMAGE_NAME" ]; then
if [ -z "$BOOT_IMAGE_NAME" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
#on some achitectures BOOT_IMAGE does not contain path to kernel
#so if we can't find anything, let's treat it in the same way as if it was empty
if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
#on some achitectures BOOT_IMAGE does not contain path to kernel
#so if we can't find anything, let's treat it in the same way as if it was empty
if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
BOOT_IMAGE_PATH=""
fi
BOOT_IMAGE_PATH=""
fi
BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac"
if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then
warn "${BOOT_IMAGE_HMAC} does not exist"
return 1
fi
(cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
fi
BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac"
if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then
warn "${BOOT_IMAGE_HMAC} does not exist"
return 1
fi
(cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
fi
fips_info "All initrd crypto checks done"
: > /tmp/fipsdone
if [ "$FIPS_MOUNTED_BOOT" = 1 ]; then
fips_info "Unmounting /boot"
umount /boot > /dev/null 2>&1
else
fips_info "Not unmounting /boot"
fi
umount /boot > /dev/null 2>&1
return 0
}

View File

@@ -14,7 +14,7 @@ depends() {
installkernel() {
local _fipsmodules _mod _bootfstype
if [[ -f "${srcmods}/modules.fips" ]]; then
read -d '' -r _fipsmodules < "${srcmods}/modules.fips"
_fipsmodules="$(cat "${srcmods}/modules.fips")"
else
_fipsmodules=""
@@ -62,12 +62,12 @@ installkernel() {
# called by dracut
install() {
inst_hook pre-pivot 00 "$moddir/fips-boot.sh"
inst_hook pre-mount 01 "$moddir/fips-boot.sh"
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh"
inst_script "$moddir/fips.sh" /sbin/fips.sh
inst_multiple sha512hmac rmmod insmod mount uname umount grep sed cut find sort
inst_multiple sha512hmac rmmod insmod mount uname umount
inst_simple /etc/system-fips
[ -c "${initdir}"/dev/random ] || mknod "${initdir}"/dev/random c 1 8 \
@@ -78,7 +78,7 @@ install() {
}
[ -c "${initdir}"/dev/urandom ] || mknod "${initdir}"/dev/urandom c 1 9 \
|| {
dfatal "Cannot create /dev/urandom"
dfatal "Cannot create /dev/random"
dfatal "To create an initramfs with fips support, dracut has to run as root"
return 1
}

View File

@@ -22,7 +22,7 @@ depends() {
install() {
inst_rules "$moddir/99-initrd-power-targets.rules"
inst systemd-ac-power
inst_simple "$systemdutildir"/systemd-ac-power
inst_simple "$moddir/initrd-on-ac-power.target" "$systemdsystemunitdir/initrd-on-ac-power.target"
inst_simple "$moddir/initrd-on-battery-power.target" "$systemdsystemunitdir/initrd-on-battery-power.target"

View File

@@ -20,7 +20,7 @@ check() {
depends() {
# This module has external dependency on the systemd module.
echo systemd-journald systemd-sysctl systemd-sysusers
echo systemd-journald systemd-sysctl
# Return 0 to include the dependent module(s) in the initramfs.
return 0
@@ -33,11 +33,10 @@ install() {
inst_multiple -o \
"$sysctld"/50-coredump.conf \
"$systemdutildir"/coredump.conf \
"$systemdutildir"/systemd-coredump \
"$systemdsystemunitdir"/systemd-coredump \
"$systemdsystemunitdir"/systemd-coredump.socket \
"$systemdsystemunitdir"/systemd-coredump@.service \
"$systemdsystemunitdir"/sockets.target.wants/systemd-coredump.socket \
"$sysusers"/systemd-coredump.conf \
coredumpctl
# Install the hosts local user configurations if enabled.
@@ -49,7 +48,6 @@ install() {
"$systemdsystemconfdir/systemd-coredump.socket.d/*.conf" \
"$systemdsystemconfdir"/systemd-coredump@.service \
"$systemdsystemconfdir/systemd-coredump@.service.d/*.conf" \
"$systemdsystemconfdir"/sockets.target.wants/systemd-coredump.socket \
"$sysusersconfdir"/systemd-coredump.conf
"$systemdsystemconfdir"/sockets.target.wants/systemd-coredump.socket
fi
}

View File

@@ -39,7 +39,6 @@ install() {
"$systemdutildir"/systemd-hostnamed \
"$systemdsystemunitdir"/systemd-hostnamed.service \
"$systemdsystemunitdir/systemd-hostnamed.service.d/*.conf" \
"$systemdsystemunitdir"/dbus-org.freedesktop.hostname1.service \
hostnamectl
# Install the hosts local user configurations if enabled.

View File

@@ -1,2 +1,2 @@
# This file is part of dracut systemd-hostnamed module.
g systemd-hostname -
g systemd-hostname - "systemd hostname"

View File

@@ -1,59 +0,0 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries \
"$systemdutildir"/systemd-integritysetup \
"$systemdutildir"/system-generators/systemd-integritysetup-generator \
|| return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo systemd dm
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
installkernel() {
instmods dm-integrity
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_multiple -o \
"$systemdutildir"/systemd-integritysetup \
"$systemdutildir"/system-generators/systemd-integritysetup-generator \
"$systemdsystemunitdir"/integritysetup-pre.target \
"$systemdsystemunitdir"/integritysetup.target \
"$systemdsystemunitdir"/sysinit.target.wants/integritysetup.target
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
/etc/integritytab \
"$systemdsystemconfdir"/integritysetup.target \
"$systemdsystemconfdir/integritysetup.target.wants/*.target" \
"$systemdsystemconfdir"/integritysetup-pre.target \
"$systemdsystemconfdir/integritysetup-pre.target.wants/*.target" \
"$systemdsystemconfdir"/sysinit.target.wants/integritysetup.target \
"$systemdsystemconfdir/sysinit.target.wants/integritysetup.target.wants/*.target"
fi
# Install required libraries.
_arch=${DRACUT_ARCH:-$(uname -m)}
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libcryptsetup.so.*"
}

View File

@@ -40,12 +40,13 @@ install() {
"$systemdsystemunitdir"/systemd-journald-audit.socket \
"$systemdsystemunitdir"/systemd-journald-dev-log.socket \
"$systemdsystemunitdir"/systemd-journald-varlink@.socket \
"$systemdsystemunitdir"/systemd-journal-flush.service \
"$systemdsystemunitdir"/systemd-journal-catalog-update.service \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald-audit.socket \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald-dev-log.socket \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald.socket \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald-audit.socket \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-journald.service \
"$sysusers"/systemd-journal.conf \
journalctl
# Install library file(s)
@@ -62,9 +63,10 @@ install() {
"$systemdutilconfdir/journald.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-journald.service \
"$systemdsystemconfdir/systemd-journald.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-journal-flush.service \
"$systemdsystemconfdir/systemd-journal-flush.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-journal-catalog-update.service \
"$systemdsystemconfdir/systemd-journal-catalog-update.service.d/*.conf" \
"$sysusersconfdir"/systemd-journal.conf
"$systemdsystemconfdir/systemd-journal-catalog-update.service.d/*.conf"
fi
}

0
modules.d/01systemd-modules-load/module-setup.sh Executable file → Normal file
View File

View File

@@ -32,7 +32,6 @@ depends() {
install() {
inst_multiple -o \
"$tmpfilesdir"/systemd-network.conf \
"$dbussystem"/org.freedesktop.network1.conf \
"$dbussystemservices"/org.freedesktop.network1.service \
"$systemdutildir"/networkd.conf \
@@ -40,21 +39,17 @@ install() {
"$systemdutildir"/systemd-networkd \
"$systemdutildir"/systemd-network-generator \
"$systemdutildir"/systemd-networkd-wait-online \
"$systemdnetwork"/80-6rd-tunnel.network \
"$systemdnetwork"/80-container-host0.network \
"$systemdnetwork"/80-container-vb.network \
"$systemdnetwork"/80-container-ve.network \
"$systemdnetwork"/80-container-vz.network \
"$systemdnetwork"/80-vm-vt.network \
"$systemdnetwork"/80-wifi-adhoc.network \
"$systemdnetwork"/99-default.link \
"$systemdutildir"/network/80-container-host0.network \
"$systemdutildir"/network/80-container-ve.network \
"$systemdutildir"/network/80-container-vz.network \
"$systemdutildir"/network/80-vm-vt.network \
"$systemdutildir"/network/80-wifi-adhoc.network \
"$systemdutildir"/network/99-default.link \
"$systemdsystemunitdir"/systemd-networkd.service \
"$systemdsystemunitdir"/systemd-networkd.socket \
"$systemdsystemunitdir"/systemd-network-generator.service \
"$systemdsystemunitdir"/systemd-networkd-wait-online.service \
"$systemdsystemunitdir"/systemd-networkd-wait-online@.service \
"$systemdsystemunitdir"/systemd-network-generator.service \
"$sysusers"/systemd-network.conf \
networkctl ip
# Enable systemd type units
@@ -71,17 +66,14 @@ install() {
inst_multiple -H -o \
"$systemdutilconfdir"/networkd.conf \
"$systemdutilconfdir/networkd.conf.d/*.conf" \
"$systemdnetworkconfdir/*" \
"$systemdutilconfdir/network/*" \
"$systemdsystemconfdir"/systemd-networkd.service \
"$systemdsystemconfdir/systemd-networkd.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-networkd.socket \
"$systemdsystemconfdir/systemd-networkd.socket.d/*.conf" \
"$systemdsystemconfdir/systemd-networkd.service/*.conf" \
"$systemdsystemunitdir"/systemd-networkd.socket \
"$systemdsystemunitdir/systemd-networkd.socket/*.conf" \
"$systemdsystemconfdir"/systemd-network-generator.service \
"$systemdsystemconfdir/systemd-network-generator.service.d/*.conf" \
"$systemdsystemconfdir/systemd-network-generator.service/*.conf" \
"$systemdsystemconfdir"/systemd-networkd-wait-online.service \
"$systemdsystemconfdir/systemd-networkd-wait-online.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-networkd-wait-online@.service \
"$systemdsystemconfdir/systemd-networkd-wait-online@.service.d/*.conf" \
"$sysusersconfdir"/systemd-network.conf
"$systemdsystemconfdir/systemd-networkd-wait-online.service/*.conf"
fi
}

View File

@@ -1,43 +0,0 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries "$systemdutildir"/systemd-pcrphase || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo systemd tpm2-tss
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_multiple -o \
"$systemdutildir"/systemd-pcrphase \
"$systemdsystemunitdir"/systemd-pcrphase-initrd.service \
"$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \
"$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdsystemconfdir"/systemd-pcrphase-initrd.service \
"$systemdsystemconfdir/systemd-pcrphase-initrd.service.d/*.conf" \
"$systemdsystemconfdir"/initrd.target.wants/systemd-pcrphase-initrd.service
fi
}

View File

@@ -1,82 +0,0 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries \
portablectl \
"$systemdutildir"/systemd-portabled \
|| return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo dbus
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# Install kernel module(s).
installkernel() {
instmods loop squashfs
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
# It's intended to work only with raw binary disk images contained in
# regular files, but not with directory trees.
local _nonraw
_nonraw=$(portablectl --no-pager --no-legend list | grep -v " raw " | cut -d ' ' -f1 | tr '\n' ' ')
if [ -n "$_nonraw" ]; then
dwarn "systemd-portabled: this module only installs raw disk images in the initramfs; skipping: $_nonraw"
fi
inst_multiple -o \
"/var/lib/portables/*.raw" \
"/usr/lib/portables/*.raw" \
"$tmpfilesdir/portables.conf" \
"$dbussystem"/org.freedesktop.portable1.conf \
"$dbussystemservices"/org.freedesktop.portable1.service \
"$systemdutildir"/systemd-portabled \
"$systemdutildir/portable/profile/default/*.conf" \
"$systemdutildir/portable/profile/nonetwork/*.conf" \
"$systemdutildir/portable/profile/strict/*.conf" \
"$systemdutildir/portable/profile/trusted/*.conf" \
"$systemdsystemunitdir"/systemd-portabled.service \
"$systemdsystemunitdir/systemd-portabled.service.d/*.conf" \
"$systemdsystemunitdir"/dbus-org.freedesktop.portable1.service \
portablectl
# The existence of this file is required
touch "$initdir"/etc/resolv.conf
# Enable systemd type unit(s)
$SYSTEMCTL -q --root "$initdir" add-wants initrd.target systemd-portabled.service
$SYSTEMCTL -q --root "$initdir" enable systemd-portabled.service
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"/etc/portables/*.raw" \
"$systemdutilconfdir/system.attached/*" \
"$systemdutilconfdir/system.attached/*/*" \
"$systemdutilconfdir/portable/profile/default/*.conf" \
"$systemdutilconfdir/portable/profile/nonetwork/*.conf" \
"$systemdutilconfdir/portable/profile/strict/*.conf" \
"$systemdutilconfdir/portable/profile/trusted/*.conf" \
"$systemdsystemconfdir"/systemd-portabled.service \
"$systemdsystemconfdir/systemd-portabled.service.d/*.conf"
fi
}

View File

@@ -1,53 +0,0 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries "$systemdutildir"/systemd-pstore || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo systemd
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# Install kernel module(s).
installkernel() {
instmods efi-pstore
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_dir /var/lib/systemd/pstore
inst_multiple -o \
"$tmpfilesdir/systemd-pstore.conf" \
"$systemdutildir"/systemd-pstore \
"$systemdsystemunitdir"/systemd-pstore.service \
"$systemdsystemunitdir/systemd-pstore.service.d/*.conf"
# Enable systemd type unit(s)
$SYSTEMCTL -q --root "$initdir" enable systemd-pstore.service
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdutilconfdir"/pstore.conf \
"$systemdutilconfdir/pstore.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-pstore.service \
"$systemdsystemconfdir/systemd-pstore.service.d/*.conf"
fi
}

View File

@@ -40,7 +40,6 @@ install() {
"$systemdutildir"/systemd-resolved \
"$systemdsystemunitdir"/systemd-resolved.service \
"$systemdsystemunitdir/systemd-resolved.service.d/*.conf" \
"$sysusers"/systemd-resolve.conf \
resolvectl
# Enable systemd type unit(s)
@@ -52,7 +51,6 @@ install() {
"$systemdutilconfdir"/resolved.conf \
"$systemdutilconfdir/resolved.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-resolved.service \
"$systemdsystemconfdir/systemd-resolved.service.d/*.conf" \
"$sysusersconfdir"/systemd-resolve.conf
"$systemdsystemconfdir/systemd-resolved.service/*.conf"
fi
}

View File

@@ -24,8 +24,6 @@ depends() {
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_simple "$moddir/sysusers-dracut.conf" "$systemdsystemunitdir/systemd-sysusers.service.d/sysusers-dracut.conf"
inst_multiple -o \
"$sysusers"/basic.conf \
"$sysusers"/systemd.conf \

View File

@@ -1,2 +0,0 @@
[Unit]
ConditionNeedsUpdate=

View File

@@ -34,13 +34,12 @@ install() {
"$dbussystemservices"/org.freedesktop.timedate1.service \
"$systemdutildir"/systemd-timedated \
"$systemdsystemunitdir"/systemd-timedated.service \
"$systemdsystemunitdir"/dbus-org.freedesktop.timedate1.service \
timedatectl
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdsystemconfdir"/systemd-timedated.service \
"$systemdsystemconfdir/systemd-timedated.service.d/*.conf"
"$systemdsystemconfdir/systemd-timedated.service/*.conf"
fi
}

View File

@@ -20,7 +20,7 @@ check() {
depends() {
# This module has external dependency on other module(s).
echo dbus systemd-sysusers systemd-timedated
echo dbus systemd-timedated
# Return 0 to include the dependent module(s) in the initramfs.
return 0
@@ -35,15 +35,14 @@ install() {
inst_multiple -o \
"$dbussystem"/org.freedesktop.timesync1.conf \
"$dbussystemservices"/org.freedesktop.timesync1.service \
"$systemdntpunits/*.list" \
"$systemdutildir/ntp-units.d/*.list" \
"$systemdutildir"/systemd-timesyncd \
"$systemdutildir"/systemd-time-wait-sync \
"$systemdutildir/timesyncd.conf.d/*.conf" \
"$systemdsystemunitdir"/systemd-timesyncd.service \
"$systemdsystemunitdir/systemd-timesyncd.service.d/*.conf" \
"$systemdsystemunitdir"/systemd-time-wait-sync.service \
"$systemdsystemunitdir/systemd-time-wait-sync.service.d/*.conf" \
"$sysusers"/systemd-timesync.conf
"$systemdsystemunitdir/systemd-time-wait-sync.service.d/*.conf"
# Enable systemd type unit(s)
for i in \
@@ -55,13 +54,12 @@ install() {
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdntpunitsconfdir/*.list" \
"$systemdutilconfdir/ntp-units.d/*.list" \
"$systemdutilconfdir"/timesyncd.conf \
"$systemdutilconfdir/timesyncd.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-timesyncd.service \
"$systemdsystemconfdir/systemd-timesyncd.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-time-wait-sync.service \
"$systemdsystemconfdir/systemd-time-wait-sync.service.d/*.conf" \
"$sysusersconfdir"/systemd-timesync.conf
"$systemdsystemunitdir"/systemd-time-wait-sync.service \
"$systemdsystemunitdir/systemd-time-wait-sync.service.d/*.conf"
fi
}

View File

@@ -25,10 +25,12 @@ depends() {
install() {
# Excluding "$tmpfilesdir/home.conf", sets up /home /srv
# Excluding "$tmpfilesdir/portables.conf", belongs in seperated portables module
# Excluding "$tmpfilesdir/journal-nocow.conf", requires spesific btrfs setup
# Excluding "$tmpfilesdir/legacy.conf", belongs in seperated legacy module
# Excluding "$tmpfilesdir/systemd-nologin.conf", belongs in seperated pam module
# Excluding "$tmpfilesdir/systemd-nspawn.conf", belongs in seperated machined module
# Excluding "$tmpfilesdir/systemd-pstore.conf", belongs in seperated pstore module
# Excluding "$tmpfilesdir/x11.conf", belongs in seperated x11 module
inst_multiple -o \
@@ -45,6 +47,8 @@ install() {
"$systemdsystemunitdir/systemd-tmpfiles-setup.service.d/*.conf" \
"$systemdsystemunitdir"/systemd-tmpfiles-setup-dev.service \
"$systemdsystemunitdir/systemd-tmpfiles-setup-dev.service.d/*.conf" \
"$systemdsystemunitdir"/systemd-tmpfiles-clean.timer \
"$systemdsystemunitdir"/timers.target.wants/systemd-tmpfiles-clean.timer \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup.service \
systemd-tmpfiles

View File

@@ -6,7 +6,7 @@
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries systemd-creds || return 1
require_binaries sysusers || return 1
# Return 255 to only include the module, if another module requires it.
return 255
@@ -15,12 +15,6 @@ check() {
# Module dependency requirements.
depends() {
local deps
# This module has external dependency on other module(s).
deps="systemd"
systemd-creds -q has-tpm2 && deps+=" tpm2-tss"
echo "$deps"
# Return 0 to include the dependent module(s) in the initramfs.
return 0
@@ -31,16 +25,13 @@ depends() {
install() {
inst_multiple -o \
"/usr/lib/credstore/*" \
"/usr/lib/credstore.encrypted/*" \
"$tmpfilesdir/credstore.conf" \
systemd-creds
"$sysusers"/basic.conf \
sysusers
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"/etc/credstore/*" \
"/etc/credstore.encrypted/*"
"$sysusersconfdir"/basic.conf
fi
}

View File

@@ -7,5 +7,5 @@
for x in /lib/modules/keys/*; do
[ "${x}" = "/lib/modules/keys/*" ] && break
keyctl padd asymmetric "" %:.secondary_trusted_keys < "${x}"
keyctl padd asymmetric "" @s < "${x}"
done

View File

@@ -33,6 +33,6 @@ install() {
for x in "$dracutsysrootdir"/lib/modules/keys/*; do
[[ ${x} == "$dracutsysrootdir/lib/modules/keys/*" ]] && break
inst_simple "${x#"$dracutsysrootdir"}"
inst_simple "${x#$dracutsysrootdir}"
done
}

View File

@@ -54,8 +54,6 @@ install() {
"$systemduser"/dbus-broker.service \
"$systemdsystemunitdir"/dbus.socket \
"$systemduser"/dbus.socket \
"$systemdsystemunitdir"/sockets.target.wants/dbus.socket \
"$systemduser"/sockets.target.wants/dbus.socket \
"$systemdsystemunitdir"/dbus.target.wants \
busctl dbus-broker dbus-broker-launch
@@ -79,8 +77,7 @@ install() {
"$systemdsystemconfdir"/dbus.socket \
"$systemdsystemconfdir"/dbus.socket.d/*.conf \
"$systemdsystemconfdir"/dbus-broker.service \
"$systemdsystemconfdir"/dbus-broker.service.d/*.conf \
"$systemdsystemconfdir"/sockets.target.wants/dbus.socket
"$systemdsystemconfdir"/dbus-broker.service.d/*.conf
fi
# We need to make sure that systemd-tmpfiles-setup.service->dbus.socket

0
modules.d/06rngd/module-setup.sh Executable file → Normal file
View File

View File

@@ -19,7 +19,7 @@ depends() {
fi
done
if check_module "dbus-broker"; then
if find_binary dbus-broker &> /dev/null; then
echo "dbus-broker"
return 0
else

View File

@@ -19,7 +19,7 @@ set_keyboard() {
}
set_terminal() {
local dev="$1"
local dev=$1
if [ "${UNICODE}" = 1 ]; then
printf '\033%%G' >&7
@@ -58,7 +58,7 @@ dev_close() {
}
dev_open() {
local dev="$1"
local dev=$1
exec 6< "${dev}" \
&& exec 7>> "${dev}"

View File

@@ -31,6 +31,10 @@ install() {
VCONFIG_CONF="/etc/vconsole.conf"
findkeymap() {
# shellcheck disable=SC2064
trap "$(shopt -p nullglob globstar)" RETURN
shopt -q -s nullglob globstar
local -a MAPS
local MAPNAME
local INCLUDES
@@ -42,10 +46,7 @@ install() {
MAPS=("$1")
else
MAPNAME=${1%.map*}
mapfile -t -d '' MAPS < <(
find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f \( -name "${MAPNAME}" -o -name "${MAPNAME}.map*" \) -print0
)
MAPS=("$dracutsysrootdir""${kbddir}"/keymaps/**/"${MAPNAME}"{,.map{,.*}})
fi
for MAP in "${MAPS[@]}"; do
@@ -63,9 +64,7 @@ install() {
readarray -t INCLUDES < <("$CMD" '^include ' "$MAP" | while read -r _ a _ || [ -n "$a" ]; do echo "${a//\"/}"; done)
for INCL in "${INCLUDES[@]}"; do
local -a FNS
mapfile -t -d '' FNS < <(find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f -name "${INCL}*" -print0)
for FN in "${FNS[@]}"; do
for FN in "$dracutsysrootdir""${kbddir}"/keymaps/**/"$INCL"*; do
[[ -f $FN ]] || continue
[[ -v KEYMAPS["$FN"] ]] || findkeymap "$FN"
done
@@ -222,12 +221,8 @@ install() {
inst_opt_decompress "${kbddir}"/consolefonts/"${DEFAULT_FONT}".*
if [[ ${FONT} ]] && [[ ${FONT} != "${DEFAULT_FONT}" ]]; then
if [[ -f "${kbddir}"/consolefonts/"${FONT}" ]]; then
inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}"
else
FONT=${FONT%.psf*}
inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".*
fi
FONT=${FONT%.psf*}
inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".*
fi
if [[ ${FONT_MAP} ]]; then

View File

@@ -1,7 +1,5 @@
#!/bin/bash
type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh
ROOT="$1"
if [[ ! -d $ROOT ]]; then
@@ -81,6 +79,26 @@ find_mount() {
return 1
}
# usage: ismounted <mountpoint>
# usage: ismounted /dev/<device>
if command -v findmnt > /dev/null; then
ismounted() {
findmnt "$1" > /dev/null 2>&1
}
else
ismounted() {
if [ -b "$1" ]; then
find_mount "$1" > /dev/null && return 0
return 1
fi
while read -r _ m _ || [ -n "$m" ]; do
[ "$m" = "$1" ] && return 0
done < /proc/mounts
return 1
}
fi
# clean up after ourselves no matter how we die.
cleanup() {
echo "Something failed. Move back to the original state"

View File

@@ -8,7 +8,8 @@ check() {
# called by dracut
depends() {
echo base bash
echo bash
return 0
}
# called by dracut

View File

@@ -1,24 +0,0 @@
#!/bin/sh
type cm_generate_connections > /dev/null 2>&1 || . /lib/cm-lib.sh
if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
echo rd.neednet >> /etc/cmdline.d/connman.conf
fi
if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
if [ -n "$DRACUT_SYSTEMD" ]; then
# Enable tty output if a usable console is found
# shellcheck disable=SC2217
if [ -w /dev/console ] && (echo < /dev/console) > /dev/null 2> /dev/null; then
mkdir -p /run/systemd/system/cm-initrd.service.d
cat << EOF > /run/systemd/system/cm-initrd.service.d/tty-output.conf
[Service]
StandardOutput=tty
EOF
systemctl --no-block daemon-reload
fi
fi
fi
cm_generate_connections

View File

@@ -1,24 +0,0 @@
[Unit]
DefaultDependencies=no
Wants=systemd-udev-trigger.service
After=systemd-udev-trigger.service
After=dracut-cmdline.service
Wants=network.target
Before=network.target
RequiresMountsFor=/var/lib/connman
After=dbus.service
ConditionPathExists=/run/connman/initrd/neednet
[Service]
Type=dbus
BusName=net.connman
Restart=on-failure
ExecStart=/usr/sbin/connmand -n
StandardOutput=null
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_ADMIN
ProtectHome=true
ProtectSystem=full
[Install]
WantedBy=initrd.target
Also=cm-wait-online-initrd.service

View File

@@ -1,12 +0,0 @@
#!/bin/sh
type getcmdline > /dev/null 2>&1 || . /lib/dracut-lib.sh
cm_generate_connections() {
if getargbool 0 rd.neednet; then
mkdir -p "$hookdir"/initqueue/finished
echo '[ -f /tmp/cm.done ]' > "$hookdir"/initqueue/finished/cm.sh
mkdir -p /run/connman/initrd
: > /run/connman/initrd/neednet # activate ConnMan services
fi
}

View File

@@ -1,15 +0,0 @@
#!/bin/bash
type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
if [ -e /tmp/cm.done ]; then
return
fi
while read -r _serv; do
ifname=$(connmanctl services "$_serv" | grep Interface= | sed 's/^.*Interface=\([^,]*\).*$/\1/')
source_hook initqueue/online "$ifname"
/sbin/netroot "$ifname"
done < <(connmanctl services | grep -oE '[^ ]+$')
: > /tmp/cm.done

View File

@@ -1,16 +0,0 @@
[Unit]
DefaultDependencies=no
Requires=cm-initrd.service
After=cm-initrd.service
Before=network-online.target
Before=dracut-initqueue.service
ConditionPathExists=/run/connman/initrd/neednet
[Service]
Type=oneshot
ExecStart=/usr/sbin/connmand-wait-online
RemainAfterExit=yes
[Install]
WantedBy=initrd.target
WantedBy=network-online.target

View File

@@ -1,47 +0,0 @@
#!/bin/bash
# called by dracut
check() {
require_binaries sed grep connmand connmanctl connmand-wait-online || return 1
# do not add this module by default
return 255
}
# called by dracut
depends() {
echo dbus systemd bash
return 0
}
# called by dracut
installkernel() {
return 0
}
# called by dracut
install() {
# We don't need `ip` but having it is *really* useful for people debugging
# in an emergency shell.
inst_multiple ip sed grep
inst_script "$moddir/netroot.sh" "/sbin/netroot"
inst connmand
inst connmanctl
inst connmand-wait-online
inst "$dbussystem"/connman.conf
[[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/connman/main.conf ]] && inst /etc/connman/main.conf
inst_dir /usr/lib/connman/plugins
inst_dir /var/lib/connman
inst_hook cmdline 99 "$moddir/cm-config.sh"
inst_simple "$moddir"/cm-initrd.service "$systemdsystemunitdir"/cm-initrd.service
inst_simple "$moddir"/cm-wait-online-initrd.service "$systemdsystemunitdir"/cm-wait-online-initrd.service
$SYSTEMCTL -q --root "$initdir" enable cm-initrd.service
inst_hook initqueue/settled 99 "$moddir/cm-run.sh"
inst_simple "$moddir/cm-lib.sh" "/lib/cm-lib.sh"
}

View File

@@ -1,92 +0,0 @@
#!/bin/sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
command -v getarg > /dev/null || . /lib/dracut-lib.sh
command -v setup_net > /dev/null || . /lib/net-lib.sh
# Huh? Empty $1?
[ -z "$1" ] && exit 1
# [ ! -z $2 ] means this is for manually bringing up network
# instead of real netroot; If It's called without $2, then there's
# no sense in doing something if no (net)root info is available
# or root is already there
[ -d "$NEWROOT"/proc ] && exit 0
if [ -z "$netroot" ]; then
netroot=$(getarg netroot=)
fi
[ -z "$netroot" ] && exit 1
# Set or override primary interface
netif=$1
[ -e "/tmp/net.bootdev" ] && read -r netif < /tmp/net.bootdev
case "$netif" in
??:??:??:??:??:??) # MAC address
for i in /sys/class/net/*/address; do
read -r mac < "$i"
if [ "$mac" = "$netif" ]; then
i=${i%/address}
netif=${i##*/}
break
fi
done ;;
esac
# Figure out the handler for root=dhcp by recalling all netroot cmdline
# handlers when this is not called from manually network bringing up.
if [ -z "$2" ]; then
if getarg "root=dhcp" || getarg "netroot=dhcp" || getarg "root=dhcp6" || getarg "netroot=dhcp6"; then
# Load dhcp options
# shellcheck disable=SC1090
[ -e /tmp/dhclient."$netif".dhcpopts ] && . /tmp/dhclient."$netif".dhcpopts
# If we have a specific bootdev with no dhcpoptions or empty root-path,
# we die. Otherwise we just warn
if [ -z "$new_root_path" ]; then
[ -n "$BOOTDEV" ] && die "No dhcp root-path received for '$BOOTDEV'"
warn "No dhcp root-path received for '$netif' trying other interfaces if available"
exit 1
fi
rm -f -- "$hookdir"/initqueue/finished/dhcp.sh
# Set netroot to new_root_path, so cmdline parsers don't call
netroot=$new_root_path
# FIXME!
unset rootok
for f in "$hookdir"/cmdline/90*.sh; do
# shellcheck disable=SC1090
[ -f "$f" ] && . "$f"
done
else
rootok="1"
fi
# Check: do we really know how to handle (net)root?
if [ -z "$root" ]; then
root=$(getarg root=)
fi
[ -z "$root" ] && die "No or empty root= argument"
[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
handler=${netroot%%:*}
handler=${handler%%4}
handler=$(command -v "${handler}"root)
if [ -z "$netroot" ] || [ ! -e "$handler" ]; then
die "No handler for netroot type '$netroot'"
fi
fi
# Source netroot hooks before we start the handler
source_hook netroot "$netif"
# Run the handler; don't store the root, it may change from device to device
# XXX other variables to export?
[ -n "$handler" ] && "$handler" "$netif" "$netroot" "$NEWROOT"
save_netinfo "$netif"
exit 0

View File

@@ -72,7 +72,7 @@ setup_interface() {
fi
# Note: hostname can be fqdn OR short hostname, so chop off any
# trailing domain name and explicity add any domain if set.
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
}
setup_interface6() {
@@ -105,7 +105,7 @@ setup_interface6() {
# Note: hostname can be fqdn OR short hostname, so chop off any
# trailing domain name and explicity add any domain if set.
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
}
parse_option_121() {

View File

@@ -21,13 +21,6 @@ do_dhclient() {
_timeout=$(getarg rd.net.timeout.dhcp=)
_DHCPRETRY=$(getargnum 1 1 1000000000 rd.net.dhcp.retry=)
if [ -n "$_timeout" ]; then
if ! (dhclient --help 2>&1 | grep -q -F -- '--timeout' 2> /dev/null); then
warn "rd.net.timeout.dhcp has no effect because dhclient does not implement the --timeout option"
unset _timeout
fi
fi
while [ $_COUNT -lt "$_DHCPRETRY" ]; do
info "Starting dhcp for interface $netif"
dhclient "$arg" \
@@ -58,7 +51,7 @@ do_dhclient() {
# or it finished execution but failed dhcp on that interface.
if [ $retv -eq 127 ]; then
read -r pid < /tmp/dhclient."$netif".pid
pid=$(cat /tmp/dhclient."$netif".pid)
info "PID $pid was not found by wait for $netif"
if [ -e /tmp/dhclient."$netif".lease ]; then
info "PID $pid not found but DHCP successful on $netif"
@@ -116,7 +109,7 @@ if [ $ret -eq 0 ]; then
# Kill all existing dhclient calls for other interfaces, since we
# already got one successful interface
read -r npid < /tmp/dhclient."$netif".pid
npid=$(cat /tmp/dhclient."$netif".pid)
pidlist=$(pgrep dhclient)
for pid in $pidlist; do
[ "$pid" -eq "$npid" ] && continue

View File

@@ -73,13 +73,6 @@ do_dhcp() {
return 1
fi
if [ -n "$_timeout" ]; then
if ! (dhclient --help 2>&1 | grep -q -F -- '--timeout' 2> /dev/null); then
warn "rd.net.timeout.dhcp has no effect because dhclient does not implement the --timeout option"
unset _timeout
fi
fi
if [ ! -e /run/NetworkManager/conf.d/10-dracut-dhclient.conf ]; then
mkdir -p /run/NetworkManager/conf.d
echo '[main]' > /run/NetworkManager/conf.d/10-dracut-dhclient.conf
@@ -384,7 +377,7 @@ if [ -z "$NO_TEAM_MASTER" ]; then
ip link set dev "$slave" down
(
unset TEAM_PORT_CONFIG
read -r _hwaddr < "/sys/class/net/$slave/address"
_hwaddr=$(cat "/sys/class/net/$slave/address")
_subchannels=$(iface_get_subchannels "$slave")
if [ -n "$_hwaddr" ] && [ -e "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" ]; then
# shellcheck disable=SC1090
@@ -453,11 +446,7 @@ for p in $(getargs ip=); do
# If this option isn't directed at our interface, skip it
if [ -n "$dev" ]; then
if [ "$dev" != "$netif" ]; then
[ ! -e "/sys/class/net/$dev" ] \
&& warn "Network interface '$dev' does not exist!"
continue
fi
[ "$dev" != "$netif" ] && continue
else
iface_is_enslaved "$netif" && continue
fi
@@ -519,6 +508,10 @@ for p in $(getargs ip=); do
fi
fi
if command -v wicked > /dev/null && [ -z "$manualup" ]; then
/sbin/netroot "$netif"
fi
exit $ret
fi
done
@@ -527,7 +520,7 @@ done
if [ -z "$NO_AUTO_DHCP" ] && [ ! -e "/tmp/net.${netif}.up" ]; then
ret=1
if [ -e /tmp/net.bootdev ]; then
read -r BOOTDEV < /tmp/net.bootdev
BOOTDEV=$(cat /tmp/net.bootdev)
if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat "/sys/class/net/${netif}/address")" ]; then
do_dhcp
ret=$?

View File

@@ -15,8 +15,7 @@ depends() {
# called by dracut
installkernel() {
# arping depends on af_packet
hostonly='' instmods af_packet
return 0
}
# called by dracut
@@ -25,8 +24,8 @@ install() {
#Adding default link
if dracut_module_included "systemd"; then
inst_multiple -o "${systemdnetwork}/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
inst_multiple -o "${systemdutildir}/network/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
fi
inst_multiple ip dhclient sed awk grep pgrep tr expr

View File

@@ -67,7 +67,7 @@ command -v fix_bootif > /dev/null || . /lib/net-lib.sh
fi
if [ -e /tmp/net.bootdev ]; then
read -r bootdev < /tmp/net.bootdev
bootdev=$(cat /tmp/net.bootdev)
fi
# shellcheck disable=SC2016

View File

@@ -15,7 +15,7 @@
# We translate list of slaves to space-separated here to make it easier to loop over them in ifup
# Ditto for bonding options
parsebond() {
local v="${1}":
local v=${1}:
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -8,7 +8,7 @@
#
parsebridge() {
local v="${1}":
local v=${1}:
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -12,9 +12,6 @@
# routing,dns,dhcp-options,etc.
#
# we really need to use `expr substr` with dash
# shellcheck disable=SC2003 disable=SC2308
command -v getarg > /dev/null || . /lib/dracut-lib.sh
if [ -n "$netroot" ] && [ -z "$(getarg ip=)" ] && [ -z "$(getarg BOOTIF=)" ]; then
@@ -72,7 +69,7 @@ for p in $(getargs ip=); do
for autoopt in $(str_replace "$autoconf" "," " "); do
case $autoopt in
error) die "Error parsing option 'ip=$p'" ;;
bootp | rarp | both) die "Sorry, ip=$autoopt is currently unsupported" ;;
bootp | rarp | both) die "Sorry, ip=$autoopt is currenty unsupported" ;;
none | off)
[ -z "$ip" ] \
&& die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense"
@@ -100,11 +97,6 @@ for p in $(getargs ip=); do
fi
# IFACES list for later use
IFACES="$IFACES $dev"
# Interface should exist
if [ ! -e "/sys/class/net/$dev" ]; then
warn "Network interface '$dev' does not exist"
fi
fi
# Do we need to check for specific options?
@@ -142,7 +134,7 @@ fi
# This ensures that BOOTDEV is always first in IFACES
if [ -n "$BOOTDEV" ] && [ -n "$IFACES" ]; then
IFACES="${IFACES%"$BOOTDEV"*} ${IFACES#*"$BOOTDEV"}"
IFACES="${IFACES%$BOOTDEV*} ${IFACES#*$BOOTDEV}"
IFACES="$BOOTDEV $IFACES"
fi

View File

@@ -10,7 +10,7 @@
#
parseteam() {
local v="${1}":
local v=${1}:
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -5,7 +5,7 @@
#
parsevlan() {
local v="${1}":
local v=${1}:
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -2,7 +2,7 @@
# called by dracut
check() {
require_binaries sed grep NetworkManager || return 1
require_binaries sed grep || return 1
# do not add this module by default
return 255
@@ -10,7 +10,7 @@ check() {
# called by dracut
depends() {
echo dbus bash
echo dbus
return 0
}
@@ -31,7 +31,6 @@ install() {
inst NetworkManager
inst_multiple -o /usr/{lib,libexec}/nm-initrd-generator
inst_multiple -o /usr/{lib,libexec}/nm-daemon-helper
inst_multiple -o teamd dhclient
inst_hook cmdline 99 "$moddir/nm-config.sh"
if dracut_module_included "systemd"; then
@@ -39,11 +38,6 @@ install() {
inst "$dbussystem"/org.freedesktop.NetworkManager.conf
inst_multiple nmcli nm-online
# teaming support under systemd+dbus
inst_multiple -o \
"$dbussystem"/teamd.conf \
"$dbussystemconfdir"/teamd.conf
# Install a configuration snippet to prevent the automatic creation of
# "Wired connection #" DHCP connections for Ethernet interfaces
inst_simple "$moddir"/initrd-no-auto-default.conf /usr/lib/NetworkManager/conf.d/
@@ -52,8 +46,8 @@ install() {
inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
# Adding default link
inst_multiple -o "${systemdnetwork}/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
inst_multiple -o "${systemdutildir}/network/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
$SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
fi
@@ -61,7 +55,6 @@ install() {
inst_hook initqueue/settled 99 "$moddir/nm-run.sh"
inst_rules 85-nm-unmanaged.rules
inst_libdir_dir "NetworkManager/$_nm_version"
inst_libdir_file "NetworkManager/$_nm_version/libnm-device-plugin-team.so"
inst_simple "$moddir/nm-lib.sh" "/lib/nm-lib.sh"

View File

@@ -16,20 +16,6 @@ if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
echo '[logging]'
echo 'level=TRACE'
) > /run/NetworkManager/conf.d/initrd-logging.conf
if [ -n "$DRACUT_SYSTEMD" ]; then
# Enable tty output if a usable console is found
# See https://github.com/coreos/fedora-coreos-tracker/issues/943
# shellcheck disable=SC2217
if [ -w /dev/console ] && (echo < /dev/console) > /dev/null 2> /dev/null; then
mkdir -p /run/systemd/system/nm-initrd.service.d
cat << EOF > /run/systemd/system/nm-initrd.service.d/tty-output.conf
[Service]
StandardOutput=tty
EOF
systemctl --no-block daemon-reload
fi
fi
fi
nm_generate_connections

View File

@@ -1,10 +1,8 @@
[Unit]
DefaultDependencies=no
Wants=systemd-udev-trigger.service
After=systemd-udev-trigger.service
Wants=systemd-udev-settle.service
After=systemd-udev-settle.service
After=dracut-cmdline.service
After=dbus.service
Wants=network.target
Before=network.target
ConditionPathExists=/run/NetworkManager/initrd/neednet
ConditionPathExistsGlob=|/usr/lib/NetworkManager/system-connections/*
@@ -18,9 +16,7 @@ BusName=org.freedesktop.NetworkManager
ExecReload=/usr/bin/busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Reload u 0
ExecStart=/usr/sbin/NetworkManager --debug
KillMode=process
# The following gets changed to StandardOutput=tty by nm-config.sh
# when debug is enabled and a usable console is found.
StandardOutput=null
StandardOutput=tty
Environment=NM_CONFIG_ENABLE_TAG=initrd
Restart=on-failure
ProtectSystem=true

6
modules.d/35network-manager/nm-lib.sh Executable file → Normal file
View File

@@ -11,7 +11,7 @@ nm_generate_connections() {
# shellcheck disable=SC2046
/usr/lib/nm-initrd-generator -- $(getcmdline)
else
warn "nm-initrd-generator not found"
derror "nm-initrd-generator not found"
fi
if getargbool 0 rd.neednet; then
@@ -28,7 +28,3 @@ nm_generate_connections() {
done
fi
}
nm_reload_connections() {
[ -n "$DRACUT_SYSTEMD" ] && systemctl is-active nm-initrd.service && nmcli connection reload
}

Some files were not shown because too many files have changed in this diff Show More