Red Hat Enterprise Linux Diagnostics and Troubleshooting
Fix an issue where a system fails to boot past the boot loader screen.
Outcomes
You should be able to repair issues where a system fails to boot past the boot loader.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
[student@workstation ~]$ lab start boot-review
This command confirms that the required hosts for this exercise are accessible and provides a working kernel.
Instructions
Someone decided to shorten the boot process of the servera system. Doing this process, they broke the ability of servera to boot to its default target.
You are asked to make servera boot properly again.
Open a console to your
serveramachine and troubleshoot the problem.What is displayed on the
serveraconsole? If a GRUB menu is displayed, attempt to boot the default (select) entry.error: ../../grub-core/loader/i386/pc/linux.c:170:invalid magic number. error: ../../grub-core/loader/i386/pc/linux.c:421:you need to load the kernel first. Press any key to continue...
What can this message mean?
This error message typically indicates that no kernel is defined in the menu entry, or that the ramdisk is being loaded before the kernel.
Temporarily boot your
serverasystem to a working configuration.Permanently fix the issue.
Log in to the
serverasystem and switch to therootuser.[student@workstation ~]$
ssh student@servera...output omitted... [student@servera ~]$sudo -i[sudo] password for student:student[root@servera ~]#Use the list of installed kernels to re-create a working
/boot/grub2/grub.cfgfile.[root@servera ~]#
grub2-mkconfig -o /boot/grub2/grub.cfgUse
grubbyto review the newly added entry and set it as the default boot entry.[root@servera ~]#
grubby --info=ALL[root@servera ~]#grubby --set-default=/boot/vmlinuz-4.18.0-305.el8.x86_64Verify the solution by rebooting the
serverasystem.[root@servera ~]#
reboot