Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had Ubuntu on my hard drive and tried to install Arch Linux. Things got messy and I now have an unstable, unbootable machine. I feel the installation failed because there were remains of Ubuntu. I'd like to wipe the hard drive and start over from scratch; without anything on there. How do I do this? I have several partitions made in a desperate attempt to make it all work. So I'd like to remove all partitions and any other information that's on the drive.

I can not start any OS, but I can boot with the Live USB of Arch Linux...

share|improve this question
The Arch installer's default settings would work, although destroy your other partitions. – frabjous Aug 8 '11 at 4:24
I tried that, and used the default settings to install it on one of the partitions, but the other partitions remained in place. – user852091 Aug 8 '11 at 4:27
I mean the default partitioning scheme -- this should use four partitions, not one. (Leaving no room for anything else.) If you really think the remnants are causing the problem, launch a gparted live CD and format the entire drive with it as ext4 or something. – frabjous Aug 8 '11 at 4:28
up vote 3 down vote accepted

Nuking the first few megabytes of the hard drive should work. Be certain to get the parameter for the of argument correct, as this will cause a severe amount of damage to the first filesystem on the drive, as well as destroy the MBR and partition table.

dd if=/dev/zero of=/dev/sdX bs=1M count=4
share|improve this answer
I did this for both partitions but the partitions themselves still remained intact. I want the hard drive to start from zero, with no partitions whatsoever. – user852091 Aug 8 '11 at 11:28

The paranoid user would write the entire drive with zeros.

This can be done in a few ways. If you can get to a command prompt from a live CD you can do this:

dd if=/dev/zero of=/dev/hda bs=1M

Assuming /dev/hda is the hard drive you want wiped. Everything will be wiped permanently. Partitions, MBR, etc.

This will take a few hours depending on the size of the disk.

I have had experiences where this does help with XP, but I can't think of any real technical reason why. Don't blame the HDD entirely; take the install step by step and make sure you don't have faulty RAM or something.

share|improve this answer
Rewriting the entire drive isn't necessary. – Mechanical snail Aug 8 '11 at 6:24
I tried the method mentioned before (rewriting part of the sdX), and now that I try doing this on the hda it mentions there is no space left after writing just 10M. Then it stops. And I am still stuck with my two partitions. How can I get rid of those partitions?? – user852091 Aug 8 '11 at 11:30
When you boot a liveCD the system will create a small RAM drive to store the system files so it avoids putting anything on a disk, its only about 200mb (depending on the system) but most importantly it will show up as a /dev/hda or /dev/sda. ensure you have the correct drive, 'fdisk -l | grep Disk' will help you work out if it is the correct drive. the command will output the size of all detected disks. – Silverfire Aug 9 '11 at 0:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .