Jump to content

Stupid MBR question


AA
 Share

Recommended Posts

How the %*@# do I erase the Master Boot Record from Linux.....?

 

I have been reading many many mans trying to find a way to do this but I still have not found anything.

 

# fdisk /MBR : and almost all variations of that dont seem to work...

 

Can someone help me pleez.

 

thanx

 

AA

 

edited by Ixthusdan

Link to comment
Share on other sites

I have heard fdisk is evil.

Note: The following advice will completely wipe your Master Boot Record (MBR), which contains all your partition information. DO NOT DO THIS unless you know that this is exactly the result you want - it will leave your hard drive in an unbootable state, in effect bringing it back to "factory-fresh", i.e., empty of data and requiring partitioning and formatting.

 

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

 

This fills up the MBR with zeros.

Link to comment
Share on other sites

I have heard fdisk is evil.

Note: The following advice will completely wipe your Master Boot Record (MBR), which contains all your partition information. DO NOT DO THIS unless you know that this is exactly the result you want - it will leave your hard drive in an unbootable state, in effect bringing it back to "factory-fresh", i.e., empty of data and requiring partitioning and formatting.

 

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

 

This fills up the MBR with zeros.

 

This worked for me when College Linux hosed my MBR from being able to install anything else. I couldn't put any other Linux distro or windows on tell I found this command. I think it might be a cospiracy by CL. 8)

Link to comment
Share on other sites

This worked for me when College Linux hosed my MBR from being able to install anything else. I couldn't put any other Linux distro or windows on tell I found this command. I think it might be a cospiracy by CL.

It's worked for me at least a hundred times. Mostly for mswin.

Link to comment
Share on other sites

Just to be anal :)

 

The MBR does not contain all the partition information. The MBR contains the boot information. The partition table (different sector) contains your partitioning layout and other data regarding each partition.

 

The easy way to reset your MBR from linux is to do a

 

lilo -U

 

or

 

lilo -U /dev/hda

 

assuming you are using lilo. If you want to fix a lilo issue, then you fix the /etc/lilol.conf file and then type lilo to rewrite the MBR. If you can't boot into your linux to do this, you can boot off of CD1 and hit F1, type rescue. Then select mount your partitions, go to console, and type

 

chroot /mnt

 

Then you can type the lilo command..

 

All this info is in man lilo and other places.

 

Using MS fdisk with the /mbr flag shouldn't cause you any trouble. It merely writes a standard dos boot mbr into the mbr sector only. Using fdisk to modify your partition table when you have linux extended partitions on your hard drive is what you have to watch out for.

 

Hope that helps..

Link to comment
Share on other sites

Well in the end

 

#lilo -M /dev/hda

 

Wiped my MBR so much so that I couldn't even install anything after that. There was some really weird shit going on, I'm not exactly sure what. Once I had wiped it Mandrake install froze when it got to the part where it detected the partitions. Red Hat did something funny too, can't remember what exactly. In the end I booted off my Win XP CD, got into the comand prompt and used "FIXMBR" which rewrote the MBR sothat just windows was available. Then I installed gentoo and this time round when I ran "lilo" it actually did something....

 

Can ones MBR get full...?

Link to comment
Share on other sites

Guest GorGor

2 suggestion on mbr

(1) if you want to get rid of linux to put ms back on, you a dos floppy emergency boot disk to type

fdisk /mbr

 

where fdisk is a ms program not linux.

 

(2) create a toms boot disk, nearly everone has heard of this, and after booting into toms, type fdisk /dev/hda

and then follow the prompt hints to create a new table, option o if my brain cells can remember.

 

Bonus (3) use Partimage to create images and they all save the mbr to each image, then you can become adventuous

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...