Fedora rescue mode fails

0

Have you ever noticed the bottom line on the GRUB bootloader menu? Well, you won’t unless you’re looking for it during the very first part of the Linux boot process. So if you have a spare VM to play with, boot it now and when the GRUB menu appears, press any key to stop the countdown timer. That will prevent the boot from proceeding and let you look at the bottom entry.

There should be at least two entries, and more if you’ve been doing updates like you should. The one I’m talking about is always the bottom entry in the list as in Figure 1.

Figure 1: The GRUB boot menu with the rescue mode entry highlighted.

This is intended to be a quick and easy method for entering rescue mode to perform system maintenance that can’t be performed in any other way. For me, this usually turns out to be a self-inflicted problem that prevents the system from completing the boot process to multi-user.target (runlevel 3) or graphical.target (runlevel 5). Rescue mode is supposed to be a minimal but usable working environment for the SysAdmin to perform those types of repairs.

The problem

When I select this entry and press the Enter key, the system boots into graphical.target. Or, when having problems that need to be fixed, it crashes at the same place it did before. That can be aggravating when I’m trying to resolve a problem.

I’m not sure why this has been neither fixed nor removed from the GRUB menu.

My solution

This is an easy solution. Well, it should be for a SysAdmin who needs to fix a boot problem.

First, initiate a boot or reboot as the case may be. When the GRUB menu is displayed, press the e key to enter edit mode for the default kernel, which is typically the most recent one and will be highlighted. This allows you to edit the Linux Kernel command line. While that sounds dangerous, and it can be, if you follow these simple directions, it’s not.

Figure 2 shows the GRUB menu with the default kernel selected. You won’t have more than a few seconds, usually 3 for Fedora, to press the e key. You can also stop the countdown timer by moving the selector bar with the arrow keys, or by pressing any other key that doesn’t perform a function. Don’t press the Enter key or it will just continue to boot.

Figure 2: The default kernel is already selected. Press the E key to enter edit mode for this kernel.

In Figure 3, we see the default kernel boot configuration in GRUB. Edit the “linux…” line to add a “1” to the end of the line. The red arrow shows the location where I added “1.” After making the edit, press the F10 key to boot. The “1” we added causes GRUB to boot Linux into the rescue.target.

Figure 3: Edit the end of the “linux…” line to add a “1” to boot into rescue.target.

Figure 4 shows the password prompt at the bottom of the screen. Enter the root password to login.

Figure 4: Login to Rescue mode.

After entering the root password, you’ll be at a root command prompt and ready to perform your administrative tasks. After resolving the problem, you can reboot and the system should boot to the default target.

Thoughts

I think that this rescue option should be removed from the Fedora GRUB boot menu. It seems a bit lazy to keep an option that hasn’t worked for such a long time.

Leave a Reply