Make Disk non-bootable

D

Don

I have a 320gig disk drive that I used to run Linux Mint on it. I did a
comprehensive Windows 7 NTFS format thinking it world rewrite the MBR
because I want to use it as a Windows data diak. But the MBR still
contains elements of the GRUB2 boot loader. How can I fix this so the
disk is non-bootable? Is there windows software out there to make this
task easier?

Thanks for any suggestions
 
C

charlie

I have a 320gig disk drive that I used to run Linux Mint on it. I did a
comprehensive Windows 7 NTFS format thinking it world rewrite the MBR
because I want to use it as a Windows data diak. But the MBR still
contains elements of the GRUB2 boot loader. How can I fix this so the
disk is non-bootable? Is there windows software out there to make this
task easier?

Thanks for any suggestions
Use one of the disk wipe utilities?
 
J

John Williamson

Don said:
I have a 320gig disk drive that I used to run Linux Mint on it. I did a
comprehensive Windows 7 NTFS format thinking it world rewrite the MBR
because I want to use it as a Windows data diak. But the MBR still
contains elements of the GRUB2 boot loader. How can I fix this so the
disk is non-bootable? Is there windows software out there to make this
task easier?

Thanks for any suggestions
Fixmbr. Boot from the Windows install medium, then select repair as the
boot option. This needs a matching, working Windows installation on the
machine you're working on, as far a I remember.

There are also options in Disk Management if you can boot that far.

Alternatively, download a disc image for GParted Live from here:-

http://gparted.sourceforge.net/livecd.php

It will let you set the partition flags the way you want them, as well
as doing a lot of other HD maintenance tasks.
 
D

Don

Fixmbr. Boot from the Windows install medium, then select repair as the
boot option. This needs a matching, working Windows installation on the
machine you're working on, as far a I remember.

There are also options in Disk Management if you can boot that far.

Alternatively, download a disc image for GParted Live from here:-

http://gparted.sourceforge.net/livecd.php

It will let you set the partition flags the way you want them, as well
as doing a lot of other HD maintenance tasks.
Gparted sounds like a good plan. Thanks.
 
J

jason

Fixmbr. Boot from the Windows install medium, then select repair as the
boot option. This needs a matching, working Windows installation on the
machine you're working on, as far a I remember.
I've used that many times and I don't think the match is necessary. I've
used Win 7 Home to repair a Pro system and vice versa. I also have used
an XP CD to repair a Vista MBR.
 
M

Mike S.

I have a 320gig disk drive that I used to run Linux Mint on it. I did a
comprehensive Windows 7 NTFS format thinking it world rewrite the MBR
because I want to use it as a Windows data diak. But the MBR still
contains elements of the GRUB2 boot loader. How can I fix this so the
disk is non-bootable? Is there windows software out there to make this
task easier?

Thanks for any suggestions
BootICE would allow you to write the MBR of your choice.

http://bootice.narod.ru
 
P

Paul

Don said:
I have a 320gig disk drive that I used to run Linux Mint on it. I did a
comprehensive Windows 7 NTFS format thinking it world rewrite the MBR
because I want to use it as a Windows data diak. But the MBR still
contains elements of the GRUB2 boot loader. How can I fix this so the
disk is non-bootable? Is there windows software out there to make this
task easier?

Thanks for any suggestions
Get the port of "dd". This runs in Windows.

http://www.chrysocome.net/dd

I tried the 0.6beta3 but use 0.5 most of the time. Either will
work for this job.

http://www.chrysocome.net/downloads/dd-0.6beta3.zip

The tool is "dd.exe".

*******

The following recipe attempts to do this, without upsetting
the partitions on the target disk. If the disk is completely
empty anyway, all this care is not important.

First, run this in a command prompt. On a Windows 7 computer,
you should "Run as Administrator" on cmd.exe, as you must be
"elevated" to write to the disks.

The first command, is to survey the disks.

dd --list

Each "raw disk" has a syntax like this

\\?\Device\harddisk2\Partition0

That would be the third disk in my system. I look at the
capacity listed, to verify I have the correct disk. It's
not always possible to determine what is what that way,
but it is reassuring if the size of the disk is unique.
If I have three 500GB disks installed, I look at the
partition pattern on each disk, to figure it out.

Otherwise, the ordering of the disks, is the same as the
ordering in Disk Management. *Do Not* use dd, if you
cannot positively identify which disk is which. You need
the evidence, before moving forward.

Make a backup copy of the MBR first.

dd if=\\?\Device\harddisk2\Partition0 of=C:\dangerman.dd bs=512 count=1

Now, try out your MBR clearing command.

dd if=/dev/zero of=\\?\Device\harddisk2\Partition0 bs=446 count=1

They use bs=446 here.

http://www.linuxquestions.org/quest...ng-linuxs-fdisk-to-erase-or-fix-a-mbr-300256/

And this article shows, clearing the first 446 bytes is what is needed.
That leaves the partition table and signature AA55 bytes alone.

http://en.wikipedia.org/wiki/Master_boot_record

Now, this is important (at least, if you expected the partitions
of data on the disk to still be there). Immediately verify with PTEDIT32,
that the partition table info is still there. Do not reboot, until
you verified the partition table is still evident.

(Run as Administrator in Windows 7... If not elevated, it gives error 5.
This freebie, used to be part of PowerQuest Partition Magic but is free now.)

ftp://ftp.symantec.com/public/english_us_canada/tools/pq/utilities/PTEDIT32.zip

If numbers appear, which match the partition sizes on the disk, you're done.
If PTEDIT32 can no longer read that disk, you screwed up.

If you fouled up the process, then you can undo the damage like this.
This restores the backup copy of the MBR you made, if you screw up.
So if PTEDIT32 isn't returning sane data for the target disk, this
will use your backup copy to undo the attempt.

dd if=C:\dangerman.dd of=\\?\Device\harddisk2\Partition0 bs=512 count=1

If you erased more of the disk than you were supposed to, then whatever
you erased is gone. That's why "dd" is very dangerous.

Note - the location I picked for the MBR backup file, wasn't a good choice.
You can't write underneath C:. Put your 512 byte MBR file in a different
location, like C:\users\username\dangerman.dd or the like. Pick a
writable location for it, so you can find it.

*******

If the disk had no partitions you wanted to keep, you can erase the
*entire* disk with dd. This erases every visible sector. I picked a
typical block size I might use, without writing a long explanation
of how to pick the optimal value. Naturally, if you do this and
select harddisk2, when you meant to do harddisk1, you just lost an
entire disk full of data! Use with care. If you're doing SSDs or USB
flash drives, the bs= value should be a lot higher and be a power_of_two.
For example, on my newest USB flash, bs=2097152 or so. (That's a guess at
the flash block size. A large size helps reduce wear by avoiding overlapping
writes.) On a hard drive, the optimal value gives higher write speed.

dd if=/dev/zero of=\\?\Device\harddisk2\Partition0 bs=8192

*******

fixmbr or bootrec /fixmbr is certainly another way to do it...
As long as it's easy to get to the command. When I need to
do fixmbr on my WinXP system, it means digging up the
installer CD and running from the recovery console. It would
be much nicer if commands like that were available anywhere and
at any time. Sometimes, you have to dig for them when you need
them. fixmbr will also overwrite the first 446 bytes, with
something.

HTH,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top