LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Rewriting MBR to 0's? (https://www.linuxquestions.org/questions/linux-general-1/rewriting-mbr-to-0s-54479/)

Dren 04-10-2003 06:45 PM

Rewriting MBR to 0's?
 
Hello, I need some help rewriting my MBR back to 0's. I have done it once before a while back using dd... But I can't seem to remember exactly how I did so... Please help, thanks.

Proud 04-10-2003 06:50 PM

Try man dd, and I think your source file of 0s is /dev/null or something like that :)

Dren 04-10-2003 07:22 PM

I tried:
dd of=/mbr if=/dev/null

That didn't work. I looked at the dd man page, didn't find anything that helped me.

glock27linux 04-10-2003 08:02 PM

for zero's you might be better suited with /dev/zero

Your dd command might be failing because it might not know what /mbr is. Is there a /mbr on your system? If MBR means Master Boot Record, I don't think a /mbr exists by default. MBR's are found at the beginning of a hard disk. I don't know how you would access a MBR specifically.

Proud 04-10-2003 08:04 PM

Oh, since I have used my win98 startup floppy with fdisk /mbr to restore the win boot loader, maybe the linux version of fdisk can help :)

Dren 04-10-2003 08:46 PM

You were right, glock27linux, I got it to work using:

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

Thanks.

glock27linux 04-10-2003 09:05 PM

Cool! i knew MBR's were at the beginning of the disk, but i didn't know how many bytes they were for sure. Didn't want to reccommend the wrong specifics. Glad you got it figured out!


All times are GMT -5. The time now is 08:12 PM.