How to set a password to a hard drive

Hello yourself.

It depends on the drive and the protection scheme. The simplest way is to use the IDE command that sets a password. Boot up a utility environment like Parted Magic; that particular one contains a drive password utility.

I do not have experience with A) At what point in the startup process you will be prompted for the password, and B) How secure this is. If the data is stored unencrypted, I would blue-sky guess that this is crackable. Some enterprise drives are self-encrypting.

If your intention is to protect the data against unauthorized access, you could also use a full-disk encryption tool that encrypts and decrypts at the driver level. There are quite a few ways to password-protect the data on a hard drive.