All Products
Search
Document Center

:What do I do if an ECS instance goes down and the "VFS: Unable to mount root fs on unknown-block" message appears in a log?

最終更新日:Feb 02, 2024

If your Elastic Compute Service (ECS) instance repeatedly goes down during startup and the "VFS: Unable to mount root fs on unknown-block" message appears in a log, you can use the solution provided in this topic to fix the issue.

Problem description

An ECS instance repeatedly goes down during startup and cannot be used as expected, and a call stack similar to the following one is displayed:

[    1.573197] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.574179] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 3.10.0-1160.6.1.el7.x86_64 #1
[    1.575045] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 8f19b21 04/01/2014
[    1.575900] Call Trace:
[    1.576246]  [<ffffffff8f381400>] dump_stack+0x19/0x1b
[    1.576845]  [<ffffffff8f37a958>] panic+0xe8/0x21f
[    1.577433]  [<ffffffff8f98b794>] mount_block_root+0x291/0x2a0
[    1.578122]  [<ffffffff8f98b7f6>] mount_root+0x53/0x56
[    1.578719]  [<ffffffff8f98b935>] prepare_namespace+0x13c/0x174
[    1.579425]  [<ffffffff8f98b412>] kernel_init_freeable+0x222/0x249
[    1.580150]  [<ffffffff8f98ab28>] ? initcall_blacklist+0xb0/0xb0
[    1.580838]  [<ffffffff8f36fa90>] ? rest_init+0x80/0x80
[    1.581462]  [<ffffffff8f36fa9e>] kernel_init+0xe/0x100
[    1.582073]  [<ffffffff8f394df7>] ret_from_fork_nospec_begin+0x21/0x21
[    1.582814]  [<ffffffff8f36fa90>] ? rest_init+0x80/0x80

Cause

The instance cannot find the file system of the root partition. The reason may be that rootfs is damaged because the kernel update is unexpectedly stopped or fails.

Solution

Important Before you perform the operations, we recommend that you create snapshots for the ECS instances to back up data to prevent data loss due to accidental operations. For more information about snapshots, see Snapshot overview.

We recommend that you replace the system disk of the instance or roll back disks by using snapshots that you created for the disks. For more information, see Replace the operating system of an instance or Roll back a disk by using a snapshot.