LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dd usage - "Resetting Hard Drives" (https://www.linuxquestions.org/questions/linux-newbie-8/dd-usage-resetting-hard-drives-345043/)

Xyem 07-20-2005 11:41 AM

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.

Quote:

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

However I have come across the following command:
Quote:

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?

traene 07-20-2005 12:06 PM

I just had a really short internet serach for reintalling the MBR on a hard disk. You
may have a look here:
http://www.faqs.org/docs/win_bsd/trouble.htm

Anyways with the DOS utility

Code:

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.

Xyem 07-20-2005 12:15 PM

According to that site
Code:

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!


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