You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used template file: https://raw.githubusercontent.com/lxc/lxc-ci/main/images/rockylinux.yaml
The output shows an error:
...
Installing : rootfiles-8.1-31.el9.noarch 127/127
Running scriptlet: grub2-common-1:2.06-70.el9_3.2.rocky.0.3.noarch 127/127
Running scriptlet: kernel-modules-core-5.14.0-362.18.1.el9_3.0.1.x86_64 127/127
Running scriptlet: kernel-core-5.14.0-362.18.1.el9_3.0.1.x86_64 127/127
grub2-probe: error: failed to get canonical path of `/dev/mapper/rl-root'.
No path or device is specified.
Usage: grub2-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub2-probe --help' or 'grub2-probe --usage' for more information.
findmnt: can't read (null): No such file or directory
Running scriptlet: kernel-modules-5.14.0-362.18.1.el9_3.0.1.x86_64
...
but building continues until
...
INFO [2024-03-11T12:27:29+01:00] Running hooks trigger=post-files
++ ls /boot/initramfs-5.14.0-362.18.1.el9_3.0.1.x86_64.img
++ sed -r 's#.*initramfs-(.+)\.img#\1#'
+ kver=5.14.0-362.18.1.el9_3.0.1.x86_64
+ target=/boot/efi/EFI/rocky/grub.cfg
+ grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
+ sed -i 's#root=[^ ]*#root=/dev/sda2#g' /boot/efi/EFI/rocky/grub.cfg
+ grubby --update-kernel=/boot/vmlinuz-5.14.0-362.18.1.el9_3.0.1.x86_64 '--args=root=/dev/sda2 ro'
The param /boot/vmlinuz-5.14.0-362.18.1.el9_3.0.1.x86_64 is incorrect
Error: Failed to run post-files: exit status 1
ERROR [2024-03-11T12:27:31+01:00] Failed running distrobuilder err="Failed to run post-files: exit status 1"
INFO [2024-03-11T12:27:31+01:00] Removing cache directory
To get some more info I added to rockylinux.yaml:
- trigger: post-files
action: |-
#!/bin/sh
set -eux
grubby --info=ALL
...
types:
- vm
releases:
- 9
Result: The kernel and initrd settings are invalid!
As workaround for this I modified rockylinux.yaml:
- trigger: post-files
action: |-
#!/bin/sh
set -eux
...
# Patch *.conf files
sed -i "s|/var/cache/distrobuilder\..*/rootfs||" /boot/loader/entries/*.conf
# Update files in /boot/loader/entries/. `grubby` needs to be run after
# `grub2-mkconfig` as the latter overwrites files in /boot/loader/entries/.
grubby --update-kernel=/boot/vmlinuz-${kver} --args="root=/dev/sda2 ro"
# Regenerate initramfs
dracut --kver "${kver}" -f
types:
- vm
releases:
- 9
With this patch the image is generated.
The issue is similar to #785 but in that case there is no call of grub-install which can be modified.
The text was updated successfully, but these errors were encountered:
I tried to generate an image, but it doesn´t work.
NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
distrobuilder build-incus rockylinux.yaml --vm --debug --disable-overlay -o image.architecture=x86_64 -o image.release=9 -o image.variant=default -o source.variant=boot
https://raw.githubusercontent.com/lxc/lxc-ci/main/images/rockylinux.yaml
The output shows an error:
but building continues until
To get some more info I added to
rockylinux.yaml
:Here is the additional output:
Result: The kernel and initrd settings are invalid!
As workaround for this I modified
rockylinux.yaml
:With this patch the image is generated.
The issue is similar to #785 but in that case there is no call of
grub-install
which can be modified.The text was updated successfully, but these errors were encountered: