Change the kernel version on a Linux cloud server by using rescue mode
If a manual or automatic update to your Linux® cloud server is preventing your virtual machine (VM) from booting up properly, you can try to resolve the issue by rolling back the Linux kernel with which your VM is booting. This article walks you through this process.
Enter rescue mode
Place your server into rescue mode.
Important: Ensure that you copy the temporary root password that displays so that you can access your rescued server.
The server initially displays the status Rescuing. When a red status bar that says Rescue displays, you can log in to the server by using the steps in the following section.
Log in to your server
Use the following steps to log in to your server:
Open a terminal and run the following Secure Shell (SSH) command to log in to the VM as the root user:
Important: Ensure that you replace
126.96.36.199with your own PublicNet Internet Protocol (IP). You do not need to specify the port because a rescued server defaults to port 22.
Enter your password press Enter.
Mount your file system on the rescue instance
Use the following steps to mount your file system on the rescue instance:
Run the following command:
The output from this command displays the mounted system device for rescue, and then the unmounted file system of your server. In most cases, the file system for your server is
/dev/xvdb1. For older systems, the file system for the server might be
After you have identified the file system as either
/dev/ sda1, run the following command to mount that file system:
mount /dev/xvdb1 /mnt
Change the kernel
Use the following steps to change the Linux kernel:
Change into the directory in which you mounted the file system by running the following command:
List the files that the directory contains by running the following command:
A list of files displays, including the menu.lst file. Run the following command to open this file in the vi text editor:
Note: You can use any text editor to open this file. This example uses the vi editor because it is the easiest one to operate from the emergency console and SSH.
The file contains a number of lines of information regarding the kernel, the boot process configuration, and other details.
Change the line that says
Note: If you are using the vi text editor, press i on your keyboard to enter insert mode, then use the arrow keys to move down to the
default=. Change this to
1, then press ESC on your keyboard to exit insert mode.
Use the following command to save the change that you made to menu.lst:
Note: Because the colon is already present, you do need to enter it in this command.
Exit rescue mode
Use the following steps to exit rescue mode:
Finally, exit rescue mode to enable the VM to boot up by using the menu.lst file that you edited.
In the Cloud Control Panel, click Exit Rescue Mode at the top of the Server Details page. The server boots up and displays as Active.
©2020 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License