Patent ID: 7962739

Claim:
A method implemented by a computer system, said method comprising: detecting that a file is unreadable, wherein the detecting occurs while booting the computer system to a primary environment, wherein the unreadable file is critical to the primary environment, and wherein the unreadable file causes a primary environment boot failure; recording a sector number corresponding to an unreadable sector of a primary nonvolatile storage media encountered while the computer system is booting to the primary environment, wherein data corresponding to the unreadable file is stored in the unreadable sector; in response to the primary environment boot failure, booting the computer system to an alternate environment using an alternate boot media, wherein the computer system has access to the primary nonvolatile storage media from the alternate environment; while the computer system is in the alternate environment: reading the recorded sector number; mapping the recorded sector number to the unreadable file, wherein the mapping comprises reading a file map stored on the primary nonvolatile storage media, the file map including a plurality of file identifiers and a plurality of sector numbers corresponding to one or more files stored on the primary nonvolatile storage media; identifying the unreadable file based on the mapping of the unreadable sector number to a selected one of the plurality of file identifiers that corresponds to the unreadable file; retrieving, from a backup media, a backup copy of the unreadable file based on the selected file identifier; and writing the backup copy to one or more undamaged sectors of the primary nonvolatile storage media wherein the writing replaces the unreadable file with the backup copy, resulting in a replaced file within a file system structure; and after the replacement of the unreadable file, successfully rebooting the computer system from the primary nonvolatile storage media into the primary environment, the rebooting including reading the replaced file from the one or more undamaged sectors.