Rocky LinuxでカスタムカーネルでGRUBを更新するには?

Rocky LinuxでカスタムカーネルでGRUBを更新するには?

ほとんどのLinuxシステムでは、initramfs(mkinitrd、dracut、update-initramfs ...)を更新した後、このコマンドを使用してgrub2を「更新」できます。

update-grub2

またはこれ

grub2-mkconfig -o /boot/grub/grub.cfg

新しいinitramfs画像を見せてください。

これがRocky Linux 8で起こっていることです。

grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg 
Generating grub configuration file ...
done

grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub configuration file ...
done

作成中ですが、画像を読みません!

再起動すると...

ここに画像の説明を入力してください。

構造映像だけが見えます!

Rocky Linuxでgrubを更新するには?dnf -y reinstall kernel-core..これはカスタムカーネルなので、答えは無効です。

ベストアンサー1

Rocky LinuxはそのバージョンのRHELと互換性があるように設計されており、RHEL 8はディレクトリ内のblscfg各カーネルのBootLoaderSpecファイルを見つけるためにGRUBモジュールを使用しています。/boot/loader/entries

デフォルトではというファイルを作成する必要があります<machine ID>-<kernel version>.conf。ここで<machine ID>、はの内容、/etc/machine-id<kernel version>カスタムカーネルバージョンです。

ファイルの内容は次のようになります。

title <the desired GRUB menu item text here>
version <kernel version>
linux <path to the vmlinuz file with the "/boot" part omitted>
initrd <path to the initramfs file with the "/boot" part omitted> $tuned_initrd
options $kernelopts $tuned_params
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel

バラよりhttps://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/またはhttps://uapi-group.org/specations/specs/boot_loader_specation/詳しくはこちらをご覧くださいhttps://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefaultFedora/RedHat 仕様に対する特定の拡張です。

blscfg残念ながら、RHEL 8インストールメディアコンテンツのGRUBモジュール文書は存在しないようです。何を見つけるべきかを知る必要があり、外部リソースを見つけることができるはずです。

おすすめ記事