Skip to content

Add bootupd option bios.device#4161

Closed
HuijingHei wants to merge 1 commit into
coreos:mainfrom
HuijingHei:fix-build-live
Closed

Add bootupd option bios.device#4161
HuijingHei wants to merge 1 commit into
coreos:mainfrom
HuijingHei:fix-build-live

Conversation

@HuijingHei
Copy link
Copy Markdown
Contributor

Because of the change coreos/bootupd@f6ef3d1 in new bootupd-0.2.28, we use sfdisk to find esp part, so we need to pass the target device.

Fix live build error when running:

$ cosa osbuild metal metal4k live
...
org.osbuild.bootupd: ed39b5197b7c952249a72fff63355163dae556a95eb000b3bb1d2ae72cb5b3f1 {
  "static-configs": true,
  "deployment": {
    "default": true
  }
}

Skip installing component BIOS without target device
error: boot data installation failed: installing component EFI:
Listing partitions of : Subprocess failed: ExitStatus(unix_wait_status(256))
sfdisk: cannot open : No such file or directory
...
subprocess.CalledProcessError: Command '['chroot', '/run/osbuild
/mounts/ostree/deploy/fedora-coreos/deploy/xx',
'/usr/bin/bootupctl', 'backend', 'install', '--with-static-configs',
'/run/osbuild/mounts']' returned non-zero exit status 1.

Because of the change coreos/bootupd@f6ef3d1
in new bootupd-0.2.28, we use `sfdisk` to find esp part, so
we need to pass the target device.

Fix live build error when running:
```
$ cosa osbuild metal metal4k live
...
org.osbuild.bootupd: ed39b5197b7c952249a72fff63355163dae556a95eb000b3bb1d2ae72cb5b3f1 {
  "static-configs": true,
  "deployment": {
    "default": true
  }
}

Skip installing component BIOS without target device
error: boot data installation failed: installing component EFI:
Listing partitions of : Subprocess failed: ExitStatus(unix_wait_status(256))
sfdisk: cannot open : No such file or directory
...
subprocess.CalledProcessError: Command '['chroot', '/run/osbuild
/mounts/ostree/deploy/fedora-coreos/deploy/xx',
'/usr/bin/bootupctl', 'backend', 'install', '--with-static-configs',
'/run/osbuild/mounts']' returned non-zero exit status 1.
```
@HuijingHei
Copy link
Copy Markdown
Contributor Author

Refer to the error log in https://jenkins-coreos-ci.apps.ocp.fedoraproject.org/blue/organizations/jenkins/test-override/detail/test-override/1803/pipeline/196/ when using bootupd-0.2.28.

@dustymabe do you happen to know that when building live image, is it intended to skip BIOS by default? See [testing][x86_64] 42.20250623.2.0

[2025-06-23T22:03:29.572Z] org.osbuild.bootupd: 7edb1c6150ef3580f99aed6c435744c64fb3f63edab1c37d0b029899c4d1fa4b {
[2025-06-23T22:03:29.572Z]   "static-configs": true,
[2025-06-23T22:03:29.572Z]   "deployment": {
[2025-06-23T22:03:29.572Z]     "default": true
[2025-06-23T22:03:29.572Z]   }
[2025-06-23T22:03:29.572Z] }

[2025-06-23T22:03:30.080Z] Skip installing component BIOS without target device
[2025-06-23T22:03:30.333Z] Installed 05_ignition.cfg
[2025-06-23T22:03:30.333Z] Installed: grub.cfg
[2025-06-23T22:03:30.333Z] Installed: "fedora/grub.cfg"

@HuijingHei HuijingHei requested a review from dustymabe June 24, 2025 08:51
- type: org.osbuild.bootupd
options:
bios:
device: disk
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change you are making here is for the 4k disk images we produce. When booting a system with a 4k disk BIOS isn't an option, so I don't recommend making this change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the confirmation, then will make bootupd changed to detect the mounted efi first? WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'll review coreos/bootupd#960

HuijingHei added a commit to HuijingHei/bootupd that referenced this pull request Jun 24, 2025
When building a live image without a device (e.g., metal4k),
a mounted directory will be used to continue the process.
See coreos/coreos-assembler#4161
@HuijingHei
Copy link
Copy Markdown
Contributor Author

Close this according to #4161 (comment), will workaround this in bootupd coreos/bootupd#960

@HuijingHei HuijingHei closed this Jun 24, 2025
HuijingHei added a commit to HuijingHei/bootupd that referenced this pull request Jun 24, 2025
When building a live image without a device (e.g., metal4k),
a mounted directory will be used to continue the process.
See coreos/coreos-assembler#4161
HuijingHei added a commit to HuijingHei/bootupd that referenced this pull request Jun 25, 2025
Let's attempt to use an already mounted ESP at the target
dest_root if one is already mounted there in a known ESP location,
if failed, will fallback to mount ESP partition of the device.
See coreos/coreos-assembler#4161
HuijingHei added a commit to HuijingHei/bootupd that referenced this pull request Jun 25, 2025
Let's attempt to use an already mounted ESP at the target
dest_root if one is already mounted there in a known ESP location,
if failed, will fallback to mount ESP partition of the device.

See coreos/coreos-assembler#4161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants