Patent ID: 6996667

Claim:
A method of rewriting a program stored in a nonvolatile memory in a disk drive in which control including that of accesses to a disk medium is executed in accordance with the program, the method comprising: writing a program specified by a program transfer command for transfer of a program, to the disk medium upon receiving the program transfer command from a host system; and executing an activating process to activate the disk drive in accordance with the program stored in the nonvolatile memory when the disk drive is powered on wherein the executing an activating process includes; rewriting the program stored in the nonvolatile memory using the program written to the disk medium according to the program transfer command; and comparing a duration of complete reading of the program written to the disk medium in accordance with the program transfer command, with a predetermined time, wherein the rewriting of the program is hindered if the duration exceeds the predetermined time, and in the executing an activating process, the activating process is continued by assuming that a program used to rewrite the program has not been written to the disk medium.