11-22-2020 |
||||||||||
Emergency
Mode |
||||||||||
|
||||||||||
-
The system boot
to emergency mode. But why? a.
Missing drives b.
The file system
is corrupted c.
The file system
is unmountable -
During boot
process /etc/fstab read by system -
This will halt
the system going into default mode |
||||||||||
-
Enter password -
Edit /etc/fstab -
Comment out the
missing disks |
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
For demo purpose lests corrupt file
system – triggring [root@zmpt01 ~]# dd if=/dev/zero
of=/dev/sdd1 bs=1k count=1024 < ---corrupted on block
size 1024+0 records in 1024+0 records out 1048576 bytes (1.0 MB) copied,
0.00584049 s, 180 MB/s System will halt and goes into
emergency mode Emergency mode is in Read Only mode mount –o remount, rw / #< --- Command to load system in read/ write mode,
so you can edit /etc/fstab |
||||||||||
Putty is disabled – because Emergency
mode is without network |
||||||||||
Run mount –a |
||||||||||
xfs_repair /dev/sdd1 #< ----run this command to repair in real world
scenerio 90% successful – Quaratine the bad sectors |
||||||||||
For
ext4 fsck /dev/sdd1 fsck – file system check |
||||||||||
|