Linux reformat hard disk


I have a PC with Suse Linux 9.3 installed on it.  I want to reformat the hard drive so I can install windows ( I don't want a dual boot).  What is the best way of going about this.

Many thanks

Who is Participating?
If the drive is to be wiped for a clean install of windows, the easiest  and fastest method is to use "zap". It used to be available on the IBM hard disk web site. It fits easily on a DOS bootable floppy and flushes the partition table in about 0.1 sec and then you're good to go with whatever O/S you choose on a "new" hard drive. Unless I totally misunderstand the question, I find it a bit unnecessary to identify the partitions etc. Clean out the HD. Windows setup can handle an empty drive.
Get the ultimate boot CD ( ) and use one utility to wipe the HD. Then install windows in the normal fashion. The UBCD is a good thing to have handy anyway.
If you just want to install windows with nothing else on the machine you can do that from the XP install process by erasing all the partitions on the hard drive when promted for a drive to install XP onto. Alternatively you can just do this in Suse:

fdisk /dev/[name of drive to erase] ie. hda, hdb etc for IDE, sda, sdb etc for scsi or sata
press d to delete each partition
w to write changes
put XP boot CD in drive and reboot

or even dd if=/dev/null of=/dev/hda ???
put in cd and reboot
kenabbottAuthor Commented:
With the fdisk option, how do I know which of the drive name options to use?
with 'mount' you can find out what partitions are currently used. Forget the last digit (for example take /dev/hda instead of /dev/hda1) to get to the right drive.

Btw: the namingconvention is pretty easy:
/dev/hda = IDE primary master
/dev/hdb = IDE primary slave
/dev/hdc = IDE secondary master
/dev/hdd = IDE secondary slave
/dev/hde = (extra) IDE master (on first channel)
and so on. If you are using SCSI or hardwareraid, the devices are /dev/sd? where ? is the number of the device.

One last thing, the most common pitfall is that people leave some primary partitions on the disk instead of removing them all. Windows Setup will not always recognise this correctly and does not mark the newly created NTFS partition as active. As a result, Windows is unable to boot properly. So the best way to go is to ensure that the partition-table is completely empty.

If you want to keep certain partitions, ensure that none of them are active and keep an bootdisk with FDISK (MS-DOS, Win9x or Linux) ready. If Windows fails to start, boot from the bootdisk and mark the NON-DOS or NTFS partition active.

The Rescue-mode of XP setup is not of much use as I found that FIXMBR and FIXBOOT are also not aware of an incorrectly marked partition.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.