stages/dracut: Add functionality to build initoverlayfs with dracut
As an alternative to just initramfs. Upstream initoverlayfs project: https://github.com/containers/initoverlayfs Signed-off-by: Eric Curtin <ecurtin@redhat.com>
This commit is contained in:
parent
044d651b5a
commit
134a4cca26
1 changed files with 11 additions and 2 deletions
|
|
@ -120,6 +120,11 @@ SCHEMA = """
|
||||||
"description": "Create reproducible images.",
|
"description": "Create reproducible images.",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"initoverlayfs": {
|
||||||
|
"description": "Use initoverlayfs rather than initramfs, requires initoverlayfs rpm to be installed",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"description": "Extra arguments to directly pass to dracut",
|
"description": "Extra arguments to directly pass to dracut",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
|
@ -153,6 +158,7 @@ def main(tree, options):
|
||||||
install = options.get("install", [])
|
install = options.get("install", [])
|
||||||
early_microcode = options.get("early_microcode", False)
|
early_microcode = options.get("early_microcode", False)
|
||||||
reproducible = options.get("reproducible", True)
|
reproducible = options.get("reproducible", True)
|
||||||
|
initoverlayfs = options.get("initoverlayfs", False)
|
||||||
extra = options.get("extra", [])
|
extra = options.get("extra", [])
|
||||||
|
|
||||||
# initrds may have already been created, force the recreation
|
# initrds may have already been created, force the recreation
|
||||||
|
|
@ -204,8 +210,11 @@ def main(tree, options):
|
||||||
for kver in kernels:
|
for kver in kernels:
|
||||||
print(f"Building initramfs for {kver}", file=sys.stderr)
|
print(f"Building initramfs for {kver}", file=sys.stderr)
|
||||||
|
|
||||||
subprocess.run(["/usr/sbin/chroot", tree,
|
initfs_bin = "/usr/bin/dracut"
|
||||||
"/usr/bin/dracut",
|
if initoverlayfs:
|
||||||
|
initfs_bin = "/usr/bin/initoverlayfs-install"
|
||||||
|
|
||||||
|
subprocess.run(["/usr/sbin/chroot", tree, initfs_bin,
|
||||||
"--no-hostonly",
|
"--no-hostonly",
|
||||||
"--kver", kver]
|
"--kver", kver]
|
||||||
+ opts,
|
+ opts,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue