Skip to content

Commit

Permalink
create_disk: run bootupctl backend install using bootupd from targe…
Browse files Browse the repository at this point in the history
…t system

Just like most tools run in this script, we want to use the version of
bootupd in the target system rather than whatever happens to be in cosa
to ensure maximum compatibility.

This is already fixed in the osbuild flow. So this is just fixing it in
the legacy flow until we've fully moved over to osbuild since it's easy
to do. While we're here, drop the `unshare` workaround since it's no
longer needed.

This bit us recently:

coreos/fedora-coreos-streams#862 (comment)
  • Loading branch information
jlebon committed Mar 12, 2024
1 parent b74e2f9 commit 558bf5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/create_disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,7 @@ EOF
install_uefi() {
# https://github.com/coreos/fedora-coreos-tracker/issues/510
# See also https://github.com/ostreedev/ostree/pull/1873#issuecomment-524439883
# Unshare mount ns to work around https://github.com/coreos/bootupd/issues/367
unshare -m /usr/bin/bootupctl backend install --src-root="${deploy_root}" "${rootfs}"
chroot_run bootupctl backend install --src-root="/" "/sysroot"
# We have a "static" grub config file that basically configures grub to look
# in the RAID called "md-boot", if it exists, or the partition labeled "boot".
local target_efi="$rootfs/boot/efi"
Expand Down Expand Up @@ -460,7 +459,9 @@ chroot_run() {
for mnt in dev proc sys run var tmp; do
mount --rbind "/$mnt" "${deploy_root}/$mnt"
done
mount --rbind "${rootfs}" "${deploy_root}/sysroot"
chroot "${deploy_root}" "$@"
umount --recursive "${deploy_root}/sysroot"
for mnt in dev proc sys run var tmp; do
umount --recursive "${deploy_root}/$mnt"
done
Expand Down

0 comments on commit 558bf5f

Please sign in to comment.