fix fedora boot issue

This commit is contained in:
Sandwich 2024-04-17 06:02:32 +02:00
parent fe43bf6733
commit ec6ca49265
3 changed files with 27 additions and 6 deletions

View File

@ -32,7 +32,7 @@
with_items: with_items:
- dnf --releasever=40 --best --repo=fedora --repo=fedora-updates --installroot=/mnt --setopt=install_weak_deps=False groupinstall -y critical-path-base core - dnf --releasever=40 --best --repo=fedora --repo=fedora-updates --installroot=/mnt --setopt=install_weak_deps=False groupinstall -y critical-path-base core
- arch-chroot /mnt dnf --releasever=40 --setopt=install_weak_deps=False install -y {{ role_packages.fedora | join(' ') }} - arch-chroot /mnt dnf --releasever=40 --setopt=install_weak_deps=False install -y {{ role_packages.fedora | join(' ') }}
- arch-chroot /mnt dnf reinstall -y grub2-efi-x64 kernel - arch-chroot /mnt dnf reinstall -y kernel-core
- name: Bootstrap RockyLinux 9 - name: Bootstrap RockyLinux 9
when: os | lower == 'rocky' when: os | lower == 'rocky'

View File

@ -9,6 +9,7 @@ almalinux:
- grub2 - grub2
- grub2-efi - grub2-efi
- lrzsz - lrzsz
- lvm2
- nc - nc
- nfs-utils - nfs-utils
- nfsv4-client-utils - nfsv4-client-utils
@ -133,17 +134,25 @@ debian12:
- wget - wget
fedora: fedora:
- bind-utils
- btrfs-progs
- cloud-init - cloud-init
- dhcp-client - dhcp-client
- efibootmgr - efibootmgr
- glibc-langpack-en
- glibc-langpack-de
- grub2 - grub2
- grub2-efi-x64-modules - grub2-efi
- lrzsz - lrzsz
- lvm2
- nc
- nfs-utils - nfs-utils
- nfsv4-client-utils
- open-vm-tools - open-vm-tools
- shim - shim
- telnet - telnet
- vim-default-editor - vim-default-editor
- wget
- zstd - zstd
rhel8: rhel8:
@ -151,8 +160,9 @@ rhel8:
- dhcp-client - dhcp-client
- efibootmgr - efibootmgr
- grub2 - grub2
- grub2-efi-x64-modules - grub2-efi
- lrzsz - lrzsz
- lvm2
- nfs-utils - nfs-utils
- open-vm-tools - open-vm-tools
- shim - shim
@ -164,8 +174,9 @@ rhel9:
- dhcp-client - dhcp-client
- efibootmgr - efibootmgr
- grub2 - grub2
- grub2-efi-x64-modules - grub2-efi
- lrzsz - lrzsz
- lvm2
- nfs-utils - nfs-utils
- open-vm-tools - open-vm-tools
- shim - shim
@ -182,6 +193,7 @@ rocky:
- grub2 - grub2
- grub2-efi - grub2-efi
- lrzsz - lrzsz
- lvm2
- nc - nc
- nfs-utils - nfs-utils
- nfsv4-client-utils - nfsv4-client-utils

View File

@ -167,5 +167,14 @@
validate: /usr/sbin/visudo --check --file=%s validate: /usr/sbin/visudo --check --file=%s
- name: Fix SELinux - name: Fix SELinux
when: os | lower in ['almalinux', 'fedora', 'rhel8', 'rhel9', 'rocky'] block:
command: touch /mnt/.autorelabel - name: Relabel the filesystem
when: os | lower in ['almalinux', 'rhel8', 'rhel9', 'rocky']
command: touch /mnt/.autorelabel
- name: Disable SELinux
when: os | lower == "fedora"
lineinfile:
path: /mnt/etc/selinux/config
regexp: '^SELINUX='
line: 'SELINUX=permissive'