主权项 |
1. A method for controlling a computer comprising a storage unit storing a master boot record (MBR), a backup MBR to which the MBR is copied, an operating system (OS), and a memory storing a BIOS,
the method comprising:
reading, by the OS, the MBR and the backup MBR from the storage unit when detecting a shutdown, and determining, by the OS, whether the MBR and the backup MBR are capable of normally being read or are improper and whether data of the MBR is identical to data of the backup MBR;performing either one of first copying of the MBR to the backup MBR and second copying of the backup MBR to the MBR without a user's operation, the first copying being performed if the MBR and the backup MBR are capable of normally being read and data of the MBR is not identical to data of the backup MBR or the MBR is capable of normally being read and the backup MBR is not capable of normally being read or is improper, and the second copying being performed if the backup MBR is capable of normally being read and the MBR is not capable of normally being read or is improper;reading, by the BIOS, the MBR and the backup MBR from the storage unit when a power of the computer is turned on;determining whether the MBR and the backup MBR are capable of normally being read or are improper and whether data of the MBR is identical to data of the backup MBR;if the MBR is capable of normally being read and the backup MBR is not capable of normally being read or is improper, then performing first copying of the MBR to the backup MBR;if the MBR and the backup MBR are capable of normally being read and data of the MBR is not identical to data of the backup MBR, then performing second copying in of the backup to the MBR; andif the backup MBR is capable of normally being read and the MBR is not capable of normally being read or is improper; whereinwhen the first copying is performed, if a writing error occurs, then the load of the MBR is completed without creation of the backup MBR and if the writing error does not occur, then the load of the MBR is completed after creation of the backup MBR, the creation of the backup MBR including initial creation of the backup MBR, andwhen the second copying is performed, if a writing error occurs, then neither of the MBR and the backup MBR is loaded, and if the writing error does not occur, then the backup MBR is loaded as the MBR. |