How to recover after the fstab file is lost under Linux?

  

The fstab file is mainly used to describe the information of various file systems in the system. If the fstab file is lost, the system will load the partition error. The following small series will introduce you how to recover the lost fstab file in the Linux system. Let's learn.

The /etc/fstab configuration file determines how the Linux system will load each partition after booting. If the partition cannot be mounted, the system will not start successfully. The following error message will appear when starting up

Solution for /etc/fstab file loss

1. Using the emergency mode, the CD will not be able to find the Linux partition to be repaired due to the lack of the fstab file.

2. Find it manually And mount the root partition

3. Rebuild the fstab configuration file and restart the system

4. Scan the logical volume in the emergency mode shell environment to find the root partition device, then manually mount the root Partition and rebuild the fstab configuration file (if there is no logical volume in the system, then the relevant steps are omitted)

Specific steps

1, enter emergency mode

2, Check system partitioning fdisk -l

3, view each partition using the corresponding label name e2label command

4, create a temporary directory /tmpdir, and the root partition Mount to /tmpdir. Because /etc/The fstab file is under the root partition. (Note: If the logical volume used by the root partition, first find the logical volume, then activate the logical volume and mount it).
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved