Linux tips: Search for rootfs during system boot

Source: Internet
Author: User
Article Title: Linux tips: Search for rootfs during system boot. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

As a Linux®Administrator, you may encounter rootfs errors such as cannot mount rootfs and kernel panic when you try to restart the server after adding external storage volumes or even after installing the new Linux operating system. This article describes the Linux boot process on the x86 platform, displays the cause of this problem, and provides four tips to avoid or correct this problem.
Problem Overview

The root file system (named rootfs in the sample error message) is the most basic component of Linux. The root file system contains all the content required to support the complete Linux system. It contains all applications, configurations, devices, and data. Without the root file system, your Linux system cannot run.

After the system is restarted, you may encounter a cannot mount rootfs error (after the Linux host obtains the kernel panic ). This problem often occurs after some storage volumes are added from the external storage, or when the file is copied and needs to be restarted to complete the installation.

If this problem occurs, your system will not restart. It takes time to diagnose and correct this issue. The four tips described in this article should help you solve the problem and save time.

Another problem is that the Linux kernel needs to mount the root file system, but it cannot find the target device. In other words, the root file system does not appear where it should be. For example, if you install the Linux root file system on the/dev/sda disk, but your system cannot mount it when it is restarted. There are two possible causes for this problem:

1. the disk/dev/sda is not displayed when the system is restarted.
The possible cause of this situation is that your Linux host does not mount a key drive to the root file system. This is not the case. The Linux installer builds all the required drives into the initrd image so that the Linux system can easily load the device drive at startup. However, if you have manually installed the disk, this error may occur.

2. the disk/dev/sda is displayed, but it is not the root file system. After the restart, your root file system has been changed to/dev/sdb.
This is the most likely situation.

After the system is restarted, how does one rename/dev/sda to/dev/sdb? In Linux,/dev/sd * Indicates a SCSI device. Linux will change the names of these devices from sda to sdz (and from sdaa to sdzz, and so on ). It will name the first SCSI device as/dev/sda, the second SCSI device as/dev/sdb, and so on.

If you use a drive (originally located in/dev/sda) that was mounted before the root file system device adapter drive to install the device in the adapter, the root file system is moved to the next letter (/dev/sdb) of the command chain, and the root file system is not the first device encountered. Therefore, rootfs cannot be loaded if it cannot be found at the beginning of the line.

This is a simple description of the situation, but to add more context to this scenario, let's give a brief description of the Linux boot process (if you understand the "root" reason, skip to the four tips to correct the problem ).

[1] [2] [3] [4] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.