Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Log analysis and system fault repair

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Experimental case list: log analysis and system fault repair

Requirements: log file analysis

Fault simulation and repair

Steps:

1 View and analyze / var/log/messsages log file

2 View and analyze the user login log

Last: the command is used to query the user records that successfully logged in to the system

The Lastb command is used to query the user records of login failures.

3 simulation and repair of faults

Simulate MBR sector failure

1. Backing up MBR sector data

Back up the MBR sector of the first hard drive (sda) to the sdb 1 partition of the second fast hard drive (mount channel / opt/)

Under the directory)

two。 Simulate MBR sector failure

Read 512 bytes of data from the device file zerozhoong and overwrite it to the first fast hard disk (sda,), thereby destroying the data in the MBR sector

Restart the system and the message "operating system not found" will appear. The host cannot be started because an available operating system cannot be found.

3. Restore MBR sector data in backup files

Using the REHL5 installation CD boot, when the installation wizard "boot" prompt appears, type "linux rescue" and enter to boot to the linux system in the CD in emergency mode.

Default language

Select "continue" to confirm and continue

Warning whether to initialize disk "No"

After "ok" confirmation, enter the bash shell environment at the "sh-3.2#" prompt.

Mount the hard disk partition (sdb1) where the backup files are saved, and restore the data to the hard disk "/ dev/sda"

After completing the recovery operation, execute the "exit" command to exit the temporary shell environment, and the system will restart automatically.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report