Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I used to have a RAID 0 setup but I ditched it and restarted from scratch with a plain non raid single disk system. The second disk is just used for general storage.

Well today, I boot the machine and for whatever reason the BIOS booted from the secondary drive which still had the old RAID 0 boot record and OS and everything. Took me a few minutes to figure out what went wrong, I changed the boot order in my BIOS and my 'new' machine came back.

How do I blow away the bootability of the old secondary drive without destroying any of the partitions on it? The MBR has the partition table so I can't just blow it away, but I can't find any partition tool that will erase the MBR while keeping the partition table.

This is a ubuntu 10.10 setup.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The actual MBR boot loader is located on the first sector of the hard drive. This sector also contains the partition table for the drive, so care must be taken to remove the boot loader code without removing the partition table. The following command should do it:

dd if=/dev/null of= bs=446 count=1

Slightly more information is at this URL WARNING: Before making this modification, have good backups available.

share|improve this answer

Just use fdisk (or any other partitioning tool) to set the partition as "inactive".

share|improve this answer
    
This won't help if a bootloader was installed into the MBR directly (very common with various Linux bootloaders) — in this case the code in MBR won't even look at the active flag. (However, there are some BIOSes which parse the DOS partition table and refuse to boot from a disk without any active partitions — this sometimes causes an inverse problem with some Linux distros which forget to make sure there is an active partition after installing a bootloader into MBR.) –  Sergey Vlasov Dec 15 '10 at 21:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.