Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung | |||
admin_grundlagen:systemsicherung [2025/09/09 15:39] ingo_wichmann [Wiederherstellen der Dateien mit rsync über ssh] |
admin_grundlagen:systemsicherung [2025/09/29 22:24] (aktuell) ingo_wichmann |
||
---|---|---|---|
Zeile 389: | Zeile 389: | ||
distro='DISTRIBUTION' # ''centos'' oder ''rocky'' | distro='DISTRIBUTION' # ''centos'' oder ''rocky'' | ||
boot_device='/dev/sda' # ''/dev/sda'' oder ''/dev/nvme0n1'' | boot_device='/dev/sda' # ''/dev/sda'' oder ''/dev/nvme0n1'' | ||
- | esp_partition_id=2 | + | esp_partition_id=1 |
efibootmgr --create --disk "$boot_device" --part "$esp_partition_id" --label "$efi_label" --loader "/EFI/$distro/shimx64.efi" | efibootmgr --create --disk "$boot_device" --part "$esp_partition_id" --label "$efi_label" --loader "/EFI/$distro/shimx64.efi" | ||
- | |||
- | grub-config neu erzeugen | ||
- | grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline | ||
- | |||
Ab RHEL/CentOS/Rocky 8 werden zusätzlich Einträge für BLS (''/boot/loader/entries/'') benötigt, da grub.cfg keinen direkten Eintrag für Kernel und initrd enthält: | Ab RHEL/CentOS/Rocky 8 werden zusätzlich Einträge für BLS (''/boot/loader/entries/'') benötigt, da grub.cfg keinen direkten Eintrag für Kernel und initrd enthält: | ||
dnf -y reinstall kernel-core | dnf -y reinstall kernel-core | ||
- | oder mit grubby von Hand: | + | oder mit grubby und kernel-install von Hand: |
+ | grubby --info DEFAULT | ||
source /etc/default/grub | source /etc/default/grub | ||
- | grubby --add-kernel=/boot/vmlinuz-5.14.0-284.30.1.el9_2.x86_64 --args="$GRUB_CMDLINE_LINUX" --initrd=/boot/initramfs-5.14.0-284.30.1.el9_2.x86_64.img --title="Rocky Linux" | + | grubby --update-kernel ALL --args "$GRUB_CMDLINE_LINUX" --title "Rocky Linux" |
+ | |||
+ | grub-config neu erzeugen | ||
+ | grub2-mkconfig --update-bls-cmdline -o /boot/grub2/grub.cfg | ||
+ | dnf -y reinstall grub2-common | ||
(( | (( |