LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-03-2002, 01:43 PM   #1
Sixsixsix
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Rep: Reputation: 0
Mbr


Is there a way to clear the mbr in linux rh 8? I need to clear it so i can do a fresh install of linux and windows. Thanks I really need this help soon too.
 
Old 11-03-2002, 02:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just do it with a dos boot disk "fdisk /mbr" about 93 times. i don't really see why you need to clear is necessarily though for a new linux install. always install windows first though.
 
Old 11-03-2002, 02:32 PM   #3
Sixsixsix
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
Anyway to do it in linux I have no floppies and xp doesn't do boot disks anymore.
 
Old 11-03-2002, 02:39 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well not really, as a "clear" MBR in your definition would (well.. i'm assuming) mean a microsoft MBR. A genuinely clear MBR is useless. you should be able to replace the backup that lilo might have kept (normally /boot/boot.0300 or similar afaik. see the lilo manpage for uninstallation information
 
Old 11-03-2002, 02:48 PM   #5
Sixsixsix
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
I forgot to mention I'm running grub boot loader.
 
Old 11-03-2002, 02:53 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well i take it you've just gone away and read the grub manpage?
 
Old 11-03-2002, 03:09 PM   #7
Sixsixsix
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
The man pages don't tell me how to uninstall them. Please Help me.
 
Old 11-04-2002, 05:27 PM   #8
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
You want to erase you MBR to reinstall windoze, is that right?

Put your Windoze cd in and perform the installation. It will clean the old MBR and replace it with a new one.
If you want to keep Linux (or don't want to reinstall Windoze), I highly suggest you to correctly configurate your actual boot loader (grub?) to be able to boot Win or Nux trought it.

Also, if you have windoze NT (Nt4, 2000, Xp) you can do a "repair" to fix the mbr. Put your cd in, boot, choose repair, get a recovery console, and type : fixmbr (or mbrfix? don't remember, use "help"). This will crush your actual nux boot loader, of course.
 
Old 11-04-2002, 11:45 PM   #9
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
Well, I kinda agree that there are many ways and few reasons to do this, but if you are really really sure you want to do that, first backup the MBR to a floppy (not the harddisk! ! ! )

dd if=/dev/hda of=/mnt/floppy/mbr.dat bs=1 count=512

then

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

That clears the MBR except for the last 64+2 bytes. That should leave the partition table alone. If you overwrite that, you won't have any partitions left on the disk (that's why you want a backup)

(the backup is dd if=/mnt/floppy/mbr.dat of=/dev/hda )

-- mlp
 
Old 11-05-2002, 10:28 AM   #10
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
If you are doing a clean install, you don't need to "clear" anything out of the MBR. Both Windoze and Linux will set up what is needed, or wanted, in the MBR.

If you clean install Windoze, it will layout default code in the MBR to find its boot sector. If you then come behind that with Linux, it will (when asked) put it's boot loader code on the MBR. Either way, it's O.K., you end up replacing boot code on the MBR.
 
  


Reply



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
MBR zeroed. Can I verify backup MBR? TomF Linux - General 7 06-20-2005 05:28 PM
by tring to fix the MBR i damage the MBR that was help... AKAKAK Fedora 4 03-21-2005 08:18 AM
GRUB MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 04:25 PM
why won't my mbr fdisk /mbr? jamessp007 Mandriva 13 01-03-2004 01:41 AM
mbr had over write so lilo is gone how to rewrite lilo to mbr mch Linux - Software 4 10-25-2002 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:39 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration