Linux reformat hard disk

Posted on 2006-04-18
Last Modified: 2012-06-21

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

Question by:kenabbott
    LVL 31

    Expert Comment

    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.

    Expert Comment

    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

    Author Comment

    With the fdisk option, how do I know which of the drive name options to use?
    LVL 3

    Expert Comment

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

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now