1

Topic: Easy Way to Use GParted to Wipe Entire HDD Partition Table?

Hi,

Am a Real Beginner with Linux Command Line.

Recently checked my 40GB Maxtor HD with DBAN 1.0.6 and it shows 2 Drives (each Drive has 5 Partitions).

Then used Ubuntu 6.10 Live and gParted to check and found this whole HDD is NTFS (No Partitions).

Since am new to GParted did a forum search using key words  "how to Wipe Partition Table"

Checked post by gedakc  in "Re: formatting HDD for windows 7 install" http://gparted-forum.surf4.info/viewtopic.php?id=17321 explaining "To overwrite the initial part of the disk, use the following comand in a GNU/Linux terminal window:

sudo dd if=/dev/zero of=/path-to-disk-device count=63
Where /path-to-disk-device is something like /dev/sda

After zeroing the initial part of the disk, you can try re-installing Windows."

This was preceeded by "CAUTION:  This will wipe out the partition table and data on the disk.  Be sure to choose the correct drive path!"

Do not feel comfortable doing this.  Is there any easy way to use GParted to wipe the HDD Partition Table of "Old Info"

Thanks

Ken

2

Re: Easy Way to Use GParted to Wipe Entire HDD Partition Table?

If you have 2 or more hard drives installed in the computer, they take names like /dev/sda. /dev/sdb, /dev/sdc etc. You have to know the letter (a, b, c ... ) of the disk you want to erase. Be careful, this letter can vary according to the hardware found by the BIOS at the moment of each booting procedure. This means that if you connect an external unit, the letters may be different after the next reboot.

This wipe operation is mostly useful in case of problems in installing the operating system. This puts the first 63 sectors at zero, so that there is no remaining info that could cause problems to the new operating system. However it isn't mandatory. If you feel uncomfortable with the command line, you can try to just make a new partition table over the old one. The new partition table will overwrite crucial parts of the old one. This can be easily done within the GParted menu. Most of the times it works. In case of problem, you can look for the command line operation.


Of course, you have to be careful, to select the right drive (GParted displays all the drives connected to the computer). Note that after that, there is little chance to recover previous content. So, be sure to have backup copies of anything important stored on this drive.

You didn't mention if you want to install an operating system on the drive, or to use it just as data drive.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: Easy Way to Use GParted to Wipe Entire HDD Partition Table?

Hi class413,

Forgot to mention I have only 1 Real HDD (Maxtor 40GB) with this PC so No possible HDD confusion.

Somehow Windows XP when installed on this HDD did not wipe all the previous partition table information and it shows when start DBAN.  Had read about this happening when do a New Windows install over a Dual Boot HDD or even only a Linux only installation.

Since Windows is booting OK on this HDD am wondering if should wait to do anything until am ready to reinstall?  As a believer in Murphies Law will transfer anything want to keep to another HDD.

Question: What will happen if I try to install a Linux OS on this HDD?

Since 40GB is small I will not use it as a "data drive".

Thanks

Ken

4

Re: Easy Way to Use GParted to Wipe Entire HDD Partition Table?

GParted shows in addition the unit of the system that boots to run Linux/Gparted (a usb drive or a cd/dvd).

40 GB is quite small for a windows installation, unless it is a very old edition (even xp needed more space, because of the system updates that grow the system). It will be harder to add another system to the same drive. For Linux only, it is always possible, as there are distributions that fit in an even smaller disk space.

In any case, I would advice to backup any valuable data from this drive, because it is rather old ( I guess) and so in risk of failure. Furthermore, you can see what Linux understands by using the fdisk program (command line tool). You can run the following command from the command line in a terminal window, from the GParted livecd.

sudo fdisk -lu
(-l is the lowercase L)
It will display the partition table of any hard drive connected to the system.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5

Re: Easy Way to Use GParted to Wipe Entire HDD Partition Table?

"You can run the following command from the command line in a terminal window, from the GParted livecd.
sudo fdisk -lu
(-l is the lowercase L)
It will display the partition table of any hard drive connected to the system."

Thanks for the tip!  Will try.