Encountering a scenario where a drive gets locked and refuses to boot, even after adjusting BIOS settings, can be frustrating. This guide outlines why it happens and steps to resolve it.
In my case, I have a dual boot PC, with a Windows installation on the primary drive and a Linux installation on the secondary drive. I have my external drive connected to the PC via USB all the time but it’s powered down unless I need to use it. I noticed when I’d switch between the OSes, the drive would get locked (to mostly Windows) and refuse to boot. This happend most frequently with pen drives I leave in the port but did not eject. If ejected, this issue would not happen. So, I’d go back to windows, eject the drive and then switch back to Linux.
But I did a bit of research on this subject and that’s what the rest of the article is about.
Why Does the Hard Drive Lock?
-
BIOS Security Settings:
- Certain BIOS settings (e.g., Secure Boot, Password Protection, or TPM) can restrict access to the boot drive.
- If improperly configured, the system might refuse to boot.
-
Corrupted Boot Loader:
- A failed or missing boot loader can render the drive inaccessible.
-
Disk Encryption or Protection:
- Drives protected with BitLocker or other encryption tools may lock if the decryption key is unavailable.
-
Boot Order or Mode Conflicts:
- Switching between Legacy (CSM) and UEFI modes without reconfiguring the drive might cause boot failures.
Steps to Resolve
1. Check BIOS Settings
- Reboot the system and enter BIOS/UEFI (usually by pressing
F2
,DEL
, orESC
during startup). - Verify the following settings:
- Boot Mode: Match your drive’s configuration (UEFI or Legacy).
- Secure Boot: Disable temporarily to troubleshoot.
- Boot Order: Ensure the drive is listed correctly.
2. Repair the Boot Loader
- Use a recovery tool:
- Boot into a Windows or Linux live USB.
- Use commands like
bootrec /fixmbr
,bootrec /fixboot
, orgrub-install
to restore the boot loader.
3. Check for Disk Encryption
- If the drive uses encryption (e.g., BitLocker), ensure you have the recovery key.
- Disable encryption or re-enter the credentials to unlock the drive.
4. Test the Drive
- Run diagnostic tools to check for hardware errors.
5. Reset BIOS Settings
- Reset to default values to eliminate misconfigured options.
Preventive Measures
- Regularly back up important data to avoid loss in case of boot failures.
- Document BIOS changes when experimenting with settings.
- Maintain a bootable recovery tool for emergencies.