摘要 |
The present application discloses a self-rescue method and device for a damaged file system. The method includes: a fault warning message is sent to a background server when it is found during boot of a device that a file system is damaged; the device receives an acknowledgement message from the background server, wherein the acknowledgement message contains a path and file name of a backup version selected by the background server according to a product type; and the device downloads a version file and reboots from the version file. The device, when finding during the boot that the file system is damaged, implements network communications between the foreground and the background prior to switching to a large version, in order to acquire a version from the background server actively and reload it, so that the damaged file system is self-repaired automatically without manual interference. |
主权项 |
1. A self-rescue method for a damaged file system, comprising:
backing up an address capable of ensuring communications between a foreground server and a background server to a private data area of a non-file system of a device, when the device is powered on for the first time; entering an exception handling branch, recording an exception branch identifier, and sending a fault warning message to the background server according to the address when it is found during boot of the device that a file system is damaged; receiving, by the device, an acknowledgement message from the background server, wherein the acknowledgement message contains a path and file name of a backup version selected by the background server according to a product type; and downloading, by the device, a version file, and rebooting from the version file; determining, by the device, the exception branch identifier is valid and reading, by the device, the address to restore register after the device reboots from the version file; wherein the method further comprises: acquiring the address needed for the communications with the background server from the private data area of the non-file system, before the fault warning message is sent to the background server. |