Support for rockylinux EFI

Hi,

just noticed my topic was closed a little too early.

Everything working like a charm on VMs but real nightmare on UEFI bare metal:

finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
Traceback (most recent call last):
File “/curtin/curtin/commands/main.py”, line 202, in main
ret = args.func(args)
File “/curtin/curtin/commands/curthooks.py”, line 1886, in curthooks
builtin_curthooks(cfg, target, state)
File “/curtin/curtin/commands/curthooks.py”, line 1851, in builtin_curthooks
setup_grub(cfg, target, osfamily=osfamily,
File “/curtin/curtin/commands/curthooks.py”, line 804, in setup_grub
install_grub(instdevs, target, uefi=uefi_bootable, grubcfg=grubcfg)
File “/curtin/curtin/commands/install_grub.py”, line 398, in install_grub
in_chroot.subp(cmd, env=env, capture=True)
File “/curtin/curtin/util.py”, line 780, in subp
return subp(*args, **kwargs)
File “/curtin/curtin/util.py”, line 275, in subp
return _subp(*args, **kwargs)
File “/curtin/curtin/util.py”, line 139, in _subp
raise ProcessExecutionError(stdout=out, stderr=err,
curtin.util.ProcessExecutionError: Unexpected error while running command.
Command: [‘unshare’, ‘–fork’, ‘–pid’, ‘–’, ‘chroot’, ‘/tmp/tmpqkhzgamy/target’, ‘grub2-mkconfig’, ‘-o’, ‘/boot/efi/EFI/redhat/grub.cfg’]
Exit code: 1
Reason: -
Stdout: ‘’
Stderr: /usr/sbin/grub2-mkconfig: line 274: /boot/efi/EFI/redhat/grub.cfg.new: No such file or directory

    Unexpected error while running command.
    Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpqkhzgamy/target', 'grub2-mkconfig', '-o', '/boot/efi/EFI/redhat/grub.cfg']
    Exit code: 1
    Reason: -
    Stdout: ''
    Stderr: /usr/sbin/grub2-mkconfig: line 274: /boot/efi/EFI/redhat/grub.cfg.new: No such file or directory

Stderr: ‘’

The error makes sense to me, didn’t think about it before.

I’ll open a bug in curtin.

BR
Francesco

Hi,

the bug has been fixed,

Testing it right now.

BR

Hi, still having the same issue, bug updated.

BR
Francesco

thx for the updates.

@phrancesco

RockyLinux boot failed with latest curtin installer (21.3-14-g9ef03d7f-0ubuntu1~focal). I am getting the below error message:

error: …/…/grub-core/fs/fshelp.c:258:file
‘/boot/vmlinux-4.18.0-305.25.1.el8_4.x86_64’ not found.
error: …/…/grub-core/loader/i386/efi/linux.c:94:you need to load the kernel first.

Press any key to continue…

Failed to boot both default and fallback entries.

Press any key to continue…

Refer: RockyLinux 8.4 booting failed

Hi, have a look here:

in the screenshot you can see tring for a lot of unexisting files, then it boots correctly…

I saw that screenshot. I can see the same in my environment but after those message it failed to boot. Please check this error:

error: …/…/grub-core/fs/fshelp.c:258:file
‘/boot/vmlinux-4.18.0-305.25.1.el8_4.x86_64’ not found.
error: …/…/grub-core/loader/i386/efi/linux.c:94:you need to load the kernel first.

Press any key to continue…

Failed to boot both default and fallback entries.

Press any key to continue…

Hi phrancesco

Please try with the below storage layout. Its not working.

1G - ext4 - /boot
512MB - fat32 - /boot/efi
16G - swap
100G - ext4 - /

Boot failed for both UEFI and for Legacy BIOS mode.

I just tried UEFI with this layout:

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 936626175 935575552 446.1G Linux filesystem

Maybe you should file a bug on curtin.

I’ll give a try when I’ve got some spare time… sorry but partitions layout isn’t a must in our scenario…

Try to be back anyway with a test.

BR
Francesco

I am facing issue if I use separate partition for /boot

RockyLinux working if I use the below layout:

512MB - fat32 - /boot/efi
16G - swap
100G - ext4 - /

out of curiousity why do you need a separate partition for /boot?

We have already deployed many BM with CentOS 7.9 with /boot as a separate partition through MAAS. So we following the same disk layout for RockyLinux.