Frequently my BIOS for some reason tries to boot to my old hard drive instead of my new SSD. This is starting to get very annoying have to switch hard drive priorities every time I restart my computer.

enter image description here

Disk 0 (Storage E:) is my old hard drive with has GRUB bootloader on it. I want to make that hard drive non-bootable without losing any data on it.

Is this possible?

  • Why dont you just move your data off of it then format it and put the data back on? Or do you need it to keep the Format Structure for some reason? Commented Feb 27, 2016 at 7:47
  • I have tons of stuff on there which I currently don't have a drive big enough to back up onto. Will be being a NAS soon so I plan to backup everything there. Commented Feb 27, 2016 at 19:23

4 Answers 4


Your Disk 0 partition 1 (Storage E:) is still has the Active flag enabled.. This is the cause of the problem. You have to remove the active flag from that partition as follows:

  1. Open up cmd as administrator.
  2. Type diskpart and hit enter
  3. Type list disk and enter
  4. Type select disk 0 and enter
  5. Type list partition and enter
  6. Type select partition 1 and enter
  7. Type inactive and enter
  8. Type exit
  • 2
    Thank you very much. This has been bothering me for years! Finally a solution to a long time problem Appreciate the clean and concise steps.
    – DevCompany
    Commented Dec 25, 2019 at 22:25

This will alter the hard drive to remove the "bootable" flag and empty the mbr. I cannot guarantee success but your bios should skip the hard drive if it doesn't find any boot flag on this hard-drive and no mbr. If used wrongly or under special circumstances this might kill only parts of your mbr or other data, like partition scheme, too, so make a backup before.

  1. Boot up a linux. (sorry, dear windows user, search the Web for removing boot flag and dd, dd basically writes zeros to the first 446 bytes which are AFAIK reserved for the Mbr.)
  2. Get the /dev/sdX number (probably lsblk or such, I will use /dev/sdh for now)
  3. Run fdisk /dev/sdh where sdh is is obviously your right disk.
  4. p your partition scheme, look for the partition number (first column, sdXY, ie. sdh6) and if the boot flag (second column) is checked with a *
  5. a and then the partition number. NOTE: fdisk doesn't want you to enter sdh6 or even /dev/sdh6, it just wants 6 in this case.
  6. p and check the results.
  7. w to write changes and exit.
  8. Additionally you should empty the mbr

Command to delete mbr only

The following command will erase mbr, but not your partitions:

dd if=/dev/zero of=/dev/sdc bs=446 count=1

Source: http://www.cyberciti.biz/faq/linux-clearing-out-master-boot-record-dd-command/ (not tested, but should work)

If that doesn't work and the old hard drive is still getting booted, you might try the hack to remove the /boot directory (or empty the partition, if so) on this hard drive. That is the place where the pc looks at boot time and where grub lies. Unfortunately you will loose your kernel (/boot/vmlinuz* mostly) and so but if you really mean to never boot up that device, you can try it. (if you only remove Mbr and bootable flag (or just grub), the boot repair tool can help you. If you delete your kernel and such, you have to reinstall Linux.

  • I happened to have this question on a Linux machine, so this was quick and easy. I only needed dd if=/dev/zero of=/dev/$DISK bs=446 count=1. If you do need to check/remove the bootable flag, I would suggest cfdisk which is more comfortable than fdisk.
    – mivk
    Commented Jul 4, 2019 at 13:22
  • A few notes: I think the code in the MBR searches for active partitions, so when clearing the MBR code, can't find active partitions, so clearing the active flags is not necessary then (see "System bootstrapping" in Wikipedia). However it should be sufficient to clear any active flag. Also removing the /bootdirectory makes little sense, as that will make a difference after booting from the device (well, GRUB when reconfigured next time might no longer find the OS, but GRUB will be still there to be booted).
    – U. Windl
    Commented Nov 22, 2022 at 19:19

You should be able to enter the BIOS at startup, by pressing one of the F-keys, often F11. Some BIOS systems tell you at boot time, which F-key it is. Find the BOOT section of the menu, and there you can set your SSD as the first option.

You may want to set Disk 0 as the second option, if you want to be able to enter the boot menu of your BIOS, and boot manually into your Linux system. I advise you to keep Disk 0 bootable, otherwise you won't be able to boot to your Linux OS.

The new boot order should stay the same at next startup, and only change if you enter the BIOS again and make new changes.

  • Hi, the thing is I used to use the grub booter to dual boot windows/mac osx. I no longer have either of the operating systems so that is why I want to remove the bootable option for that hard disk. I've set my SSD as top priority dozens of times but it keeps resetting, hence why I'd just rather make my SSD the only bootable device in my PC. Commented Feb 26, 2016 at 23:39
  • 2
    I figured you had tried changing the BIOS, just found it so unlikely that it reverts to the old settings. Just to be sure, did you save the changes before exiting the BIOS? I would make Disk 0 unbootable in GParted - just boot into a live Linux USB. There is a settings called Manage flags, you can uncheck where it says Boot. I've never done this myself, so I can't attest to if it works.
    – theodorn
    Commented Feb 27, 2016 at 1:22

i did this without making a backup, make sure you read the whole forum before doing, i now have no windows to boot on both my hdd and ssd, if you get to this problem, you have to install the windows setup on a usb drive, plug it into the usb connector, and download it on the ssd, but before you do that (not tested), open command prompt from the windows setup by doing shift+f-10 while in the setup. then putting the code in until you get to #7 Type inactive and enter, you should instead type Type active and enter. this should or should not fix the problem, I have not tried this yet due to be not having something to download the windows setup on a usb drive because I don't have something else to download it on yet. Hope this helped someone who had the same problem in the future.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .