LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-10-2005, 06:41 PM   #1
TheOneAndOnlySM
Member
 
Registered: Jul 2003
Location: Dallas, TX
Distribution: Ubuntu 10.04 LTS
Posts: 987

Rep: Reputation: 30
erasing the MBR in linux


I have a harddrive with an MBR that refuses to allow me to install windows...

[Allow me to simply state that the sedistic reason for putting windows on this machine is simply because my friends want me to play gunbound with them... ]

I am without a floppy drive and have no spares to install, and have already formatted the factory-installed windows partition, so I cannot use the win98 bootdisk to issue fdisk /mbr . The windows installer also won't allow me to access a recovery mode without a bootdisk.

The windows pre-installer sees the sda device and copies its installer files to its correct partition, but when trying to run the installer from the harddisk, I either get garbled messages, errors about ntldr or a complete hang.

Is there any linux utility that will allow me to erase the mbr? I'm sure there's a way to directly edit the disk's raw data, but I'm not sure if that would damage the harddrive.

Thanks in advance!
 
Old 02-10-2005, 07:41 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,045

Rep: Reputation: 970Reputation: 970Reputation: 970Reputation: 970Reputation: 970Reputation: 970Reputation: 970Reputation: 970
dd if=/dev/zero of=/dev/sda bs=440 count=1
should do the job, and (hopefully) leave the partition table intact.

If I was to do such a thing I'd probably want to rebuild the part table anyway.

Standard disclaimers apply - I've not got myself into a situation where I have needed to do this.
Your disk, your decision.
 
Old 02-10-2005, 09:47 PM   #3
harrygraham
Member
 
Registered: Apr 2001
Location: Ottawa, Canada
Distribution: Ubuntu Gnome
Posts: 153

Rep: Reputation: 16
Exclamation try this

Have you tried booting your Windows CD? To do this you need to change the bios settings to boot the CD drive first. After the CD boots, try to escape all the gobbledegook wizardry and try to switch to the CD by typing "a:" (even though it's not really a floppy). If you get this far you can reinstall your Windows MBR with "fdisk /mbr". I think this is a lot safer than using Linux on your Windows MBR.


Harry
 
Old 02-14-2005, 09:15 PM   #4
TheOneAndOnlySM
Member
 
Registered: Jul 2003
Location: Dallas, TX
Distribution: Ubuntu 10.04 LTS
Posts: 987

Original Poster
Rep: Reputation: 30
Hmm, blanking the mbr with /dev/zero didn't make any notable difference; the installer can once again still the drive and copy files to it correctly, and although the partition is active, the installer won't boot it after copying the initial files.

As for trying to switch to "a:" from the cd, I can't seem to get this to work? Did you do this while setup is asking "press F6 to install 3rd party raid or scsi driver" "press F2 for automated system recovery"?

In any case, the problem now extends to the windows installer, beyond the scopes (and sanctity) of this forum :-D . I'll ask around at a windows forum.

Thanks!
 
Old 02-14-2005, 10:01 PM   #5
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
Never really got into a situation where I needed to do this but if you find the answer, post back here so we know how to do it as well . Thanks..

-twantrd
 
Old 02-15-2005, 07:48 AM   #6
JoannesX
Member
 
Registered: Dec 2004
Location: Brazil
Distribution: Slackware
Posts: 99

Rep: Reputation: 15
hello guys..
haven't you got a winXP cd? if no, get it.. it's easy!
so boot your machine with this cd in the drive.. (don't forget to adjust BIOS settings)
after a normal process of data, you should be taken to a screen asking you three things:
1 Install Win XP
2 Repair an installation
3 Exit

Ok choose "repair" and wait for the console...
in the prompt try FIXMBR

it should clean up your MBR...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Erasing an old MAC HD using Linux caps_phisto General 7 07-14-2005 04:55 PM
formating without erasing fedora and mbr a2ps Linux - General 4 08-17-2004 12:05 PM
Erasing history Menestrel Linux - Newbie 1 05-11-2004 02:23 PM
Help Erasing Linux DarthPip Linux - Software 7 03-21-2004 01:48 PM
HD erasing and installing sky78 Linux - Newbie 2 08-25-2003 03:04 PM


All times are GMT -5. The time now is 04:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration