Skip to content

Commit

Permalink
cmd-buildextend-live: update kargs_json when moving EFI grub.cfg
Browse files Browse the repository at this point in the history
Otherwise, code lower down will remove the that `grub.cfg` from the list
of kargs files. This in turn will prevent `coreos-installer iso kargs`
from affecting kargs on UEFI boots.

Fixes 3991e6f ("cmd-buildextend-live: always change dir
`EFI/{vendor}/` to correct vendor id").
  • Loading branch information
jlebon committed Nov 7, 2022
1 parent c15e587 commit d5cdce7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cmd-buildextend-live
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ def generate_iso():
os.rename(srcpath, f"EFI/{vendor_id}", src_dir_fd=dfd, dst_dir_fd=dfd)
os.close(dfd)

# And update kargs.json
for file in kargs_json['files']:
if file['path'] == grubfilepath[0]:
file['path'] = f'EFI/{vendor_id}/grub.cfg'

# Delete fallback and its CSV file. Its purpose is to create
# EFI boot variables, which we don't want when booting from
# removable media.
Expand Down

0 comments on commit d5cdce7

Please sign in to comment.