test/data: add rootfs to UKI

Create a squashfs image from the root file system and append it
to the existing initram fs. Passing `root=live:/rootfs.img`
is enough to use the existing dmsquash machiner in dracut.
This commit is contained in:
Christian Kellner 2022-10-13 18:00:53 +02:00
parent 053f027c67
commit ed67839183
2 changed files with 138 additions and 6 deletions

View file

@ -767,6 +767,69 @@
}
]
},
{
"name": "image",
"build": "name:build",
"stages": [
{
"type": "org.osbuild.squashfs",
"inputs": {
"tree": {
"type": "org.osbuild.tree",
"origin": "org.osbuild.pipeline",
"references": [
"name:tree"
]
}
},
"options": {
"filename": "rootfs.img",
"compression": {
"method": "lz4"
}
}
}
]
},
{
"name": "initrd",
"build": "name:build",
"stages": [
{
"type": "org.osbuild.gunzip",
"inputs": {
"file": {
"type": "org.osbuild.files",
"origin": "org.osbuild.pipeline",
"references": {
"name:tree": {
"file": "/boot/initramfs-5.18.13-200.fc36.x86_64.img"
}
}
}
},
"options": {
"path": "initramfs.img"
}
},
{
"type": "org.osbuild.cpio.out",
"options": {
"filename": "initramfs.img",
"append": true
},
"inputs": {
"tree": {
"type": "org.osbuild.tree",
"origin": "org.osbuild.pipeline",
"references": [
"name:image"
]
}
}
}
]
},
{
"name": "uki",
"build": "name:build",
@ -776,7 +839,9 @@
"options": {
"filename": "linux.efi",
"kernel": {
"opts": []
"opts": [
"root=live:/rootfs.img"
]
}
},
"inputs": {
@ -793,8 +858,8 @@
"type": "org.osbuild.files",
"origin": "org.osbuild.pipeline",
"references": {
"name:tree": {
"file": "/boot/initramfs-5.18.13-200.fc36.x86_64.img"
"name:initrd": {
"file": "/initramfs.img"
}
}
},

View file

@ -139,6 +139,71 @@
}
]
},
{
"name": "image",
"build": "name:build",
"stages": [
{
"type": "org.osbuild.squashfs",
"inputs": {
"tree": {
"type": "org.osbuild.tree",
"origin": "org.osbuild.pipeline",
"references": [
"name:tree"
]
}
},
"options": {
"filename": "rootfs.img",
"compression": {
"method": "lz4"
}
}
}
]
},
{
"name": "initrd",
"build": "name:build",
"stages": [
{
"type": "org.osbuild.gunzip",
"inputs": {
"file": {
"type": "org.osbuild.files",
"origin": "org.osbuild.pipeline",
"references": {
"name:tree": {
"file": {
"mpp-format-string": "/boot/initramfs-{rpms['tree']['kernel'].evra}.img"
}
}
}
}
},
"options": {
"path": "initramfs.img"
}
},
{
"type": "org.osbuild.cpio.out",
"options": {
"filename": "initramfs.img",
"append": true
},
"inputs": {
"tree": {
"type": "org.osbuild.tree",
"origin": "org.osbuild.pipeline",
"references": [
"name:image"
]
}
}
}
]
},
{
"name": "uki",
"build": "name:build",
@ -148,7 +213,9 @@
"options": {
"filename": "linux.efi",
"kernel": {
"opts": []
"opts": [
"root=live:/rootfs.img"
]
}
},
"inputs": {
@ -167,9 +234,9 @@
"type": "org.osbuild.files",
"origin": "org.osbuild.pipeline",
"references": {
"name:tree": {
"name:initrd": {
"file": {
"mpp-format-string": "/boot/initramfs-{rpms['tree']['kernel'].evra}.img"
"mpp-format-string": "/initramfs.img"
}
}
}