Red Hat Training
A Red Hat training course is available for RHEL 8
7.3. 查看内核的 GRUB 菜单条目
您可以列出所有内核菜单条目,或者查看特定内核的 GRUB 菜单条目。
流程
要列出所有内核菜单条目,请输入:
# grubby --info=ALL index=0 kernel="/boot/vmlinuz-4.18.0-372.9.1.el8.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params zswap.enabled=1" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-372.9.1.el8.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-372.9.1.el8.x86_64) 8.6 (Ootpa)" id="67db13ba8cdb420794ef3ee0a8313205-4.18.0-372.9.1.el8.x86_64" index=1 kernel="/boot/vmlinuz-0-rescue-67db13ba8cdb420794ef3ee0a8313205" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-0-rescue-67db13ba8cdb420794ef3ee0a8313205.img" title="Red Hat Enterprise Linux (0-rescue-67db13ba8cdb420794ef3ee0a8313205) 8.6 (Ootpa)" id="67db13ba8cdb420794ef3ee0a8313205-0-rescue"
要查看特定内核的 GRUB 菜单条目,请输入:
# grubby --info /boot/vmlinuz-4.18.0-372.9.1.el8.x86_64 grubby --info /boot/vmlinuz-4.18.0-372.9.1.el8.x86_64 index=0 kernel="/boot/vmlinuz-4.18.0-372.9.1.el8.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params zswap.enabled=1" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-372.9.1.el8.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-372.9.1.el8.x86_64) 8.6 (Ootpa)" id="67db13ba8cdb420794ef3ee0a8313205-4.18.0-372.9.1.el8.x86_64"
注意
尝试 tab 补全来查看 /boot
目录中的可用内核。