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...

link|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
feedback

2 Answers

up vote 2 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
link|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
feedback

the paranoid user would write the entire drive with zero's

this can be done in a few ways, if you can get to a CMD 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 PERMINATLY. partitions, MBR ect..

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 cant think of any real technical reason why. dont blame the HDD entirely, take the install step by step and make sure you dont have faulty ram or something

link|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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.