Make my Old Hard Drive Not Bootable
Frequently my bios for some reason tries to boot to my old HDD instead of my new SSD. This is starting to get very annoying have to switch HDD priorities every time I restart my computer.
Disk 0 (Storage E:) is my old harddrive with has grub bootloader on it. I want to make that hard drive NOT bootable WITHOUT losing any data on it. Is this possible? Please help!
Solution 1:
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:
- Open up
cmd
as administrator. - Type
diskpart
and hit enter - Type
list disk
and enter - Type
select disk 0
and enter - Type
list partition
and enter - Type
select partition 1
and enter - Type
inactive
and enter - Type
exit
Solution 2:
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.
- 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.)
- Get the
/dev/sdX
number (probablylsblk
or such, I will use/dev/sdh
for now) - Run
fdisk /dev/sdh
where sdh is is obviously your right disk. -
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*
-
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. -
p
and check the results. -
w
to write changes and exit. - 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.