create org.osbuild.bootupd stage#1519
Conversation
|
The 2nd commit here will be dropped. The 3rd and 4th commits are optional and stem from a previous conversation between @achilleas-k @cgwalters and I. Over there I don't think we fully fleshed out if the optimization was completely out of the question or not. Maybe I should just open a separate PR with that optimization so we could focus discussion on it, but at the same time I don't want to introduce options to the |
That would be preferable, yeah. Can you open it separately so we can talk about that there and then keep this specific to bootupd? Thanks! |
3f34ccf to
25cf86a
Compare
|
I broke out the controversial commits into #1527 You can now review just the first commit in this PR. The 2nd commit is just there to make tests pass until we can update the registry.gitlab.com/redhat/services/products/image-builder/ci/images/fedora-coreos next week when a new build of FCOS is out that we can use. |
The EFI binaries are currently pulled from a hardcoded path in the buildroot. When moving to containers as buildroots this will no longer work as they have an alternative layout. This is an easy "fix" - make the location of the `EFI/` directory configurable. This allows us set `efi_root` to `/usr/lib/bootupd/updates/EFI/` and keep our existing `bootc-image-builder` workflow. Note that this may actually not be the desired solution and instead we want the new `bootupd`: osbuild#1519
|
@achilleas-k can you pull You can delete |
The update to v103 includes:
- create org.osbuild.ostree.aleph stage
- osbuild/osbuild#1475
- mounts: support mounting partitions
- osbuild/osbuild#1501
- osbuild/mounts: adjust the source path to use when mounting devices
- osbuild/osbuild#1493
And I also add the bootupd stage in here from the yet to merge PR:
osbuild/osbuild#1519
The EFI binaries are currently pulled from a hardcoded path in the buildroot. When moving to containers as buildroots this will no longer work as they have an alternative layout. This is an easy "fix" - make the location of the `EFI/` directory configurable. This allows us set `efi_root` to `/usr/lib/bootupd/updates/EFI/` and keep our existing `bootc-image-builder` workflow. Note that this may actually not be the desired solution and instead we want the new `bootupd`: osbuild#1519
Done: https://gitlab.com/redhat/services/products/image-builder/ci/images/container_registry/5710257 |
25cf86a to
8adf61b
Compare
Thanks! Pushed a new update and rebased on top of latest |
The EFI binaries are currently pulled from a hardcoded path in the buildroot. When moving to containers as buildroots this will no longer work as they have an alternative layout. This is an easy "fix" - make the location of the `EFI/` directory configurable. This allows us set `efi_src_dir` to `/usr/lib/bootupd/updates/EFI/` and keep our existing `bootc-image-builder` workflow. Note that this may actually not be the desired solution and instead we want the new `bootupd`: osbuild#1519
mvo5
left a comment
There was a problem hiding this comment.
Thank you for this PR - this looks fine but I would really like some tests. When looking at that I got a bit carried away and opened dustymabe#14 for your consideration. It addresses the nitpicks/ideas I have in here. I would also love to have a stage test and will look at this next.
Fwiw, we are super happy that you work on this because we will most likely use it for the bootc container builds :)
220d7e2 to
cb1e881
Compare
mvo5
left a comment
There was a problem hiding this comment.
This looks good to me now, given that I changed this a bit it might be best if e.g. @achilleas-k could have a look too.
I would love to have a stage test as well to run this for real and I started to look into it but I think it's a bit involved (because of the required mount setup). I think it's okay to not block on this because there is no regression risk.
cb1e881 to
e24eace
Compare
The update to v103 includes:
- create org.osbuild.ostree.aleph stage
- osbuild/osbuild#1475
- mounts: support mounting partitions
- osbuild/osbuild#1501
- osbuild/mounts: adjust the source path to use when mounting devices
- osbuild/osbuild#1493
And I also add the bootupd stage in here from the yet to merge PR:
osbuild/osbuild#1519
The update to v103 includes:
- create org.osbuild.ostree.aleph stage
- osbuild/osbuild#1475
- mounts: support mounting partitions
- osbuild/osbuild#1501
- osbuild/mounts: adjust the source path to use when mounting devices
- osbuild/osbuild#1493
And I also add the bootupd stage in here from the yet to merge PR:
osbuild/osbuild#1519
There were some updates from code review in [1]. Let's pull them here and also update the mpp.yaml manifest to include the ostree deployment specification. [1] osbuild/osbuild#1519
e24eace to
0b1ce7c
Compare
There were some updates from code review in [1]. Let's pull them here and also update the mpp.yaml manifest to include the ostree deployment specification. [1] osbuild/osbuild#1519
There were some updates from code review in [1]. Let's pull them here and also update the mpp.yaml manifest to include the ostree deployment specification. [1] osbuild/osbuild#1519
achilleas-k
left a comment
There was a problem hiding this comment.
- The last two commits have subjects that are too long. Can we keep them under 72 chars?
- Can we also clean up the history a bit? (see comment below).
- The
diskoption underbios: Making enforcing the name through the schema for thedevicesobject would make it consistent with how we do it in other stages, but if we prefer to keep it explicit, I'd change the name of the option to make it clear that it maps to a "device".
0b1ce7c to
d56add7
Compare
Fixed.
Tried to fix.
I was leaning your way on this, but then Renata and I found a gap in |
d56add7 to
64afb80
Compare
Add the bootupd stage to install GRUB on both BIOS and UEFI systems, ensuring that your bootloader stays up-to-date. Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
The stable stream currently doesn't have a new enough bootupd to pass the tests for the bootupd stage. Let's update to `:testing` for now and we'll switch back to `:stable` later.
Also refactor bind mounts into a helper.
It now tests bind_mounts and bootupd behavior separately.
For ppc64le we need to pass in a partition (i.e. /dev/loop0p1) rather
than the root device (/dev/loop0) to the --device argument of bootupctl.
Let's add a partition field and find the device node based on the user
specified partition.
On ppc64le this would look something like:
```
- type: org.osbuild.bootupd
options:
bios:
device: disk
partition:
mpp-format-int: '{image.layout[''POWERPC-PREP-BOOT''].partnum}'
static-configs: true
deployment:
osname: fedora-coreos
ref: ostree/1/1/0
devices:
disk:
type: org.osbuild.loopback
options:
filename: disk.img
partscan: true
mounts:
- name: root
type: org.osbuild.xfs
source: disk
partition:
mpp-format-int: '{image.layout[''root''].partnum}'
target: /
- name: boot
type: org.osbuild.ext4
source: disk
partition:
mpp-format-int: '{image.layout[''boot''].partnum}'
target: /boot
```
64afb80 to
604e0f9
Compare
You could specify the {
"type": "org.osbuild.bootupd",
"options": {
"bios": true,
"static-configs": true,
"deployment": {
"osname": "fedora-coreos",
"ref": "ostree/1/1/0"
}
},
"devices": {
"disk": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 4096,
"size": 260096
}
}
}
}Would that work? |
unfortunately not. the |
Right, of course -_- |
achilleas-k
left a comment
There was a problem hiding this comment.
LGTM. Good to go on my end!
|
Thank you @mvo5 and @achilleas-k for the help and the reviews here. |
Add support for the new `org.osbuild.bootupd` stage that got added in osbuild/osbuild#1519
Add support for the new `org.osbuild.bootupd` stage that got added in osbuild/osbuild#1519
Add support for the new `org.osbuild.bootupd` stage that got added in osbuild/osbuild#1519
Add support for the new `org.osbuild.bootupd` stage that got added in osbuild/osbuild#1519
Add support for the new `org.osbuild.bootupd` stage that got added in osbuild/osbuild#1519
It finally merged upstream: osbuild/osbuild#1519
It finally merged upstream: osbuild/osbuild#1519
It finally merged upstream: osbuild/osbuild#1519
It finally merged upstream: osbuild/osbuild#1519
Add the bootupd stage to install GRUB on both BIOS and UEFI systems,
ensuring that your bootloader stays up-to-date.
Signed-off-by: Renata Ravanelli rravanel@redhat.com