Incorrect entries in /etc/fstab can prevent a Linux ECS instance from booting. Fix or remove invalid mount entries to restore normal startup.
Expand the following section for details about the /etc/fstab file fields.
fstab file
Causes
-
The fstab file was not updated before detaching or re-initializing a cloud disk, leaving stale mount entries.
-
The device name or UUID is incorrect.
-
The file system type is incorrect.
-
One or more mount options have invalid values.
Solution
-
Connect to the Linux instance with VNC. See Connect to an instance by using VNC.
NoteThe system enters emergency mode when this issue occurs. Enter the root password to log on.
-
Back up the /etc/fstab file:
cp /etc/fstab /etc/fstab.bak -
View the mount information of all disks, including partition names, file system types, and mount points:
df -Th[root@iZxxxq8Z ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on devtmpfs devtmpfs 868M 0 868M 0% /dev tmpfs tmpfs 879M 0 879M 0% /dev/shm tmpfs tmpfs 879M 496K 878M 1% /run tmpfs tmpfs 879M 0 879M 0% /sys/fs/cgroup /dev/vda1 ext4 40G 2.2G 36G 6% / tmpfs tmpfs 176M 0 176M 0% /run/user/0 /dev/vdb1 ext4 30G 45M 28G 1% /mnt /dev/vdb2 ext4 9.8G 37M 9.2G 1% /tmp -
View the auto-mount entries in /etc/fstab:
cat /etc/fstab[root@iZ2xxxgq8Z ~]# cat /etc/fstab # # /etc/fstab # Created by anaconda on Fri Jun 28 04:16:23 2024 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=c8b5b2da-5xxx8b07573e22 / ext4 defaults 1 1 UUID=f77303eb-4xxx77378b9ce1 /mnt ext4 defaults 0 0 UUID=c40c6d63-7xxx3ea8df22d7 /tmp ext4 defaults 0 0 -
Compare the /etc/fstab entries with the output from Step 3. Delete any redundant or invalid lines.
-
(Optional) To auto-mount disk partitions not shown in Step 3, see Configure UUIDs in the fstab file to automatically mount data disks.
-
Restart the instance:
reboot