Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-20-2005, 12:41 PM   #1
Registered: Apr 2005
Distribution: Fedora Core 4
Posts: 100

Rep: Reputation: 15
dd usage - "Resetting Hard Drives"

I have 2 hard drives and I intend of doing a completely fresh install of both Windows and Linux (Fedora Core 4) as I want the Linux install on the 160Gb (which will be the Primary Master) and Windows on the 120GB (Secondary Master).

Unfortunately, PartitionMagic v8 refuses to delete any partitions on the 120GB (which both Windows and Linux are installed) return a #510 error. According to a google search I have to disable dir_index on the hard drive (which Linux put on) but the command doesn't exist.

tunefs -O^dir_index /dev/hdb
Closest is 'tune2fs' but that returns an error.

However I have come across the following command:
dd if=/dev/zero of=/dev/hda bs=1024 count=10240
which it is said (on the site) to erase the Paritition Table and any information regarding the disk causing it to be "brand new".

A simple yes or no answer is welcome, will this achieve my goal of having "clean" (as far as it is concerned nothing exists) hard disks?
Old 07-20-2005, 01:06 PM   #2
Registered: Jan 2005
Distribution: Archlinux, Debian, Centos
Posts: 219

Rep: Reputation: 33
I just had a really short internet serach for reintalling the MBR on a hard disk. You
may have a look here:

Anyways with the DOS utility

fdisk /mbr
You can write a clean dos MBR to your hardisk. When this is done,
new partions can be created and you should have a good starting point.

However this dd command with writing zeros to the harddisk can cause some
problems i guess. Have a look at the link above.
Old 07-20-2005, 01:15 PM   #3
Registered: Apr 2005
Distribution: Fedora Core 4
Posts: 100

Original Poster
Rep: Reputation: 15
According to that site
dd if=/dev/zero of=/dev/hda
Wipes the hard disk completely, presumably bringing it back to a "factory" type state. This is more of what I am looking for.

I have used 'fdisk /mbr' before and it's never touched partition data.

EDIT: I just read the site a little further and it seems I can do the above and then use 'fdisk /mbr' to reset the MBR into a working order.

Thanks for the site, I would have shot myself in the foot pretty seriously there!

Last edited by Xyem; 07-20-2005 at 01:21 PM.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
new pci ide - now hard drives are re "labeled" Mailman42 Debian 2 09-04-2005 03:27 PM
Gaim idle time reporting: "x usage" option disappeared DiscoStoo Linux - Software 2 12-23-2004 03:32 PM
"No Hard Disk Drives detected" error when installing Woody as guest OS in VMware Thomas Anderson Debian 1 01-25-2004 05:41 AM
Module usage :Global symbol "$ref" requires explicit package name rajatgarg Programming 2 12-17-2003 02:55 AM
Mandrake 9.0 & 9.1 "detecting hard drives" installation hang Dr Tom Danger Mandriva 3 11-07-2003 04:34 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:02 PM.

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