Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Almalinux 9 #162

Merged
merged 65 commits into from
Jul 23, 2024
Merged

Almalinux 9 #162

merged 65 commits into from
Jul 23, 2024

Conversation

majst01
Copy link
Contributor

@majst01 majst01 commented Oct 13, 2022

Regardless what i tried, i was unable to have /boot/System.map and /boot/vmlinuz present ?

This was solved by adding "almalinux" to /etc/machine-id, no idea why.

TODO:

  • test in fra-equ01

@majst01
Copy link
Contributor Author

majst01 commented Oct 26, 2022

Actual error:


2022-10-26T12:35:05.709+0200    info    cmdexec running command {"commmand": "grub2-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=almalinux", "start": "2022-10-26 12:35:05.709366846 +0200 CEST
 m=+0.242851126"}
grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot.
2022-10-26T12:35:05.715+0200    error   cmdexec executed command with error     {"output": "", "duration": "6.385259ms", "error": "exit status 1"}
2022-10-26T12:35:05.715+0200    error   install-go      installation failed     {"duration": 0.24468125}
2022-10-26T12:35:05.715+0200    fatal   install-go      exit status 1

@majst01
Copy link
Contributor Author

majst01 commented Oct 26, 2022

Actual error:


2022-10-26T12:35:05.709+0200    info    cmdexec running command {"commmand": "grub2-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=almalinux", "start": "2022-10-26 12:35:05.709366846 +0200 CEST
 m=+0.242851126"}
grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot.
2022-10-26T12:35:05.715+0200    error   cmdexec executed command with error     {"output": "", "duration": "6.385259ms", "error": "exit status 1"}
2022-10-26T12:35:05.715+0200    error   install-go      installation failed     {"duration": 0.24468125}
2022-10-26T12:35:05.715+0200    fatal   install-go      exit status 1

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1917213

@mschuller
Copy link

To fix the grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot. error, try this:

  1. Create an image (.../almalinux/8/img.tar.lz4) with a default grub-config file /etc/default/grub,
    content of this file like this:
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial"
GRUB_CMDLINE_LINUX="crashkernel=auto console=ttyS0"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
  1. Generate the grub-config with menu entries for the boot-loader:
grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg
  1. Check if efibootmgr shows a entry for AlmaLinux whith the shimx64.efi loader:
efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0006,0000,0001,0002,0003,0004,0005
Boot0000* UiApp	FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
...
Boot0006* AlmaLinux	HD(1,GPT,5ba13149-48bb-44d7-b802-1f1f1252bc22,0x800,0x100000)/File(\EFI\almalinux\shimx64.efi)

This should be done automatically with grub2-mkconfig.
4. If not, make the entry with:

efibootmgr -c -d /dev/sda -p1 -l \\EFI\\almalinux\\shimx64.efi -L "AlmaLinux"

The grub2-install --target=x86_64-efi ... command is not necessary !!!

@Gerrit91 Gerrit91 mentioned this pull request Nov 15, 2022
@majst01 majst01 mentioned this pull request Feb 22, 2024
@majst01
Copy link
Contributor Author

majst01 commented Jun 7, 2024

Again:

{"time":"2024-06-07T10:19:21.741323671+02:00","level":"INFO","msg":"detect kernel and initrd","install-go":{"kernel":"/boot/vmlinuz-5.14.0-427.18.1.el9_4.x86_64","initrd":"/boot/initramfs-5.14.0-427.18.1.el9_4.x86_64.img"}}
{"time":"2024-06-07T10:19:21.741512381+02:00","level":"INFO","msg":"install grub"}
{"time":"2024-06-07T10:19:21.741637945+02:00","level":"INFO","msg":"running command","cmdexec":{"command":"grub2-mkconfig -o /boot/grub2/grub.cfg","start":"2024-06-07 10:19:21.741627032 +0200 CEST m=+0.396895950"}}
{"time":"2024-06-07T08:19:29.46477539Z","level":"DEBUG","msg":"lldp","machineID":"00000000-0000-0000-0000-ac1f6bd3909c","detectedNeighbor":{"Name":"fra-equ01-r01leaf01","Description":"Cumulus Linux version 3.7.16 running on Accton AS7712-32X","PortDescription":"swp2s3","Interface":"eth0","Chassis":{"Type":"Mac","Value":"b8:6a:97:74:00:3a"},"Port":{"Type":"Mac","Value":"b8:6a:97:74:00:42"}}}
{"time":"2024-06-07T08:19:29.464997163Z","level":"DEBUG","msg":"lldp","machineID":"00000000-0000-0000-0000-ac1f6bd3909c","detectedNeighbor":{"Name":"fra-equ01-r01leaf02","Description":"Cumulus Linux version 3.7.16 running on Accton AS7712-32X","PortDescription":"swp2s3","Interface":"eth1","Chassis":{"Type":"Mac","Value":"b8:6a:97:73:f8:3a"},"Port":{"Type":"Mac","Value":"b8:6a:97:73:f8:42"}}}
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
{"time":"2024-06-07T10:19:36.983192693+02:00","level":"INFO","msg":"executed command","cmdexec":{"output":"","duration":"15.241554409s"}}
{"time":"2024-06-07T10:19:36.983259491+02:00","level":"INFO","msg":"running command","cmdexec":{"command":"grub2-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=almalinux UUID=b831b01c-ee32-42fd-a483-161d0d415652","start":"2024-06-07 10:19:36.983249399 +0200 CEST m=+15.638518289"}}
grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot.
{"time":"2024-06-07T10:19:36.989002508+02:00","level":"ERROR","msg":"executed command with error","cmdexec":{"output":"","duration":"5.748996ms","error":"exit status 1"}}
{"time":"2024-06-07T10:19:36.989051281+02:00","level":"ERROR","msg":"installation failed","install-go":{"duration":15641352780}}
panic: exit status 1

goroutine 1 [running]:

@Gerrit91
Copy link
Contributor

It works now, even with RAID configuration on root partition.

Following steps should be:

  • Cleanup this PR to make this mergable
  • Remove CentOS in a next PR
  • Probably rewrite some of the install code as the if-conditions for specific OSs become very complex to read
  • Update Github Actions workflow files

@Gerrit91 Gerrit91 changed the title Almalinux Almalinux 9 Jul 22, 2024
@Gerrit91 Gerrit91 marked this pull request as ready for review July 22, 2024 08:55
@Gerrit91 Gerrit91 requested a review from a team as a code owner July 22, 2024 08:55
@majst01 majst01 merged commit dbbb535 into master Jul 23, 2024
3 checks passed
@majst01 majst01 deleted the almalinux branch July 23, 2024 07:56
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.

3 participants