LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   How to erase your hard disk with Linux partitions on it (https://www.linuxquestions.org/questions/mandriva-30/how-to-erase-your-hard-disk-with-linux-partitions-on-it-299397/)

357mag 03-08-2005 09:27 PM

How to erase your hard disk with Linux partitions on it
 
This doesn't necessarily apply to just Mandrake but Linux in general. With Windows whenever I want to wipe the hard drive clean to prepare for a clean install of Win 2000 I've use a program called Wipeout. I downloaded it from the web and saved it on my Win 98 boot floppy. The program is really simple to use. You just insert it in your A: floppy drive and when you get to the A: prompt you just type "wipeout c: np/ nq" and then hit Enter and your hard drive is erased. Then I just simply reinstall Windows.

Now I realized that let's say I install a Linux distro to my hard drive and after working with it for awhile I find that I want to remove it and reinstall Win 2000 or perhaps another Linux distro. Is there a utiltiy that will allow me to wipe my hard drive clean of the Linux partitions? I don't think Wipeout would work with Linux partitions. So before I install Linux to my hard drive I need to know how I would erase the Linux partitions from the drive and start with a blank hard drive.

w1z4rd 03-08-2005 09:50 PM

I'm not sure about 2000 or 98 but if you were installing xp you are able to delete the entire HD and reformat to NTFS etc right from the install disk. I also find partition magic works excellent to delete and reformat hard drives. I don't see why the ap you mentioned wouldn't delete linux partitions but i'm probaly wrong. Every Distro I have installed comes with a partiton utility as well and makes it easy to wipe out existing instances of linux or windows and start over clean.

caladbolg 03-08-2005 10:13 PM

Linux LiveCD's work great too :)

andrej666 03-09-2005 02:10 AM

Hiren's Boot CD is very helpfull
 
I am using this boot CD with lot of helpfull utilities ( for you it is Partition Magic )

http://62.253.162.19/hiren.thanki/bootcd.html?

syg00 03-09-2005 02:47 AM

Quote:

Originally posted by caladbolg
Linux LiveCD's work great too :)
Indeed.
What's wrong with fdisk. And if you*REALLY* want to zero it try;
dd if=/dev/zero of=/dev/hda bs=4096

357mag 03-09-2005 12:29 PM

I don't see how you could erase your hard disk just by using a Live CD. After all, don't Live CD's just load their contents into your RAM? I wouldn't think that they would allow you to perform things like erasing disks, but maybe I'm wrong.

As far as fdisk is concerned how would I access it? Do I open a console window and just type "fdisk" and press Enter?

mac57 03-09-2005 12:44 PM

Live CDs are an excellent route for this. Yes, they just load themselves into memory, but you can then use them to manipulate your hard disk. I did this very thing to wipe clean an external hard disk that I wanted to use as a backup medium (it was a 40G firewire drive). I used the SuSE 9.2 live CD, and started its YaST partitioner. I then selected the hard drive I wanted to clear, and really simply, just erased and recreated the partition table. The entire disk and all partitions on it are reset. You can then create whatever new partitions you want. Now this approach does not physically erase the disk, just deletes all the logical structures that make the contents visible. The disk is effectively completely empty and ready for any use you want. The old data is still there, but simply because the media itself hasn't been overwritten with something else. Despite still being there, it is no longer accessible.

SuSE 9.2 live CD will do this. Knoppix 3.7 live CD, using QtParted will also do this.

357mag 03-09-2005 12:58 PM

What about using fdisk? How would I access it? Just open up a console window and type fdisk at the prompt?

opjose 03-09-2005 01:23 PM

fdisk /dev/hda

or whatever drive you are trying to use.

xgm 03-10-2005 01:58 PM

Get Killdisk, at www.killdisk.com .
The free version is quite enough to get your hda wiped out, regardless of the OS, file format, partitions...and so and so. You load a floppy with it, boot on floppy and follow the instructions. Works like a charm.

charlescpc 03-16-2005 08:53 AM

Hey 357,
If you are just wanting to clean up a linux installation I can tell you what works for me.

I boot with the mandrake install disks (disk 1). I start it just like I'm doing a new install of Mandrake.

When I get to the part to configure the Linux partitons. I do a custom partitions.

I delete all the Linux partitions.

Then you should have a lot of free space. I then resize the windows partions to take up the space.

Then I click on the next buttom so it's rights the changes to the partition table.

Then after that I reboot and remove the cd so it won't try and boot again from the cd.

At this point you still have either lilo or grub in the master boot record giving you options of how you want to boot (provided when you installed you had it go to the first hard disk(hda)). You can pick windows and still boot into windows.

Now, the final thing to do is clean up the Master Boot record so you can get a clean boot. There are two easy ways I know to do this.

1) Boot from a windows 98 setup disk. When you get a a: then do the fdisk /mbr. That will wipe out the altered boot record and give you a clean boot.

2) You can also take a winxp install cd. Boot it up from the cd. Take the repair option. There you should have an option to run fixmbr( I think that's the job to run). If you are not sure i think you can type help and it will give you options. Anyway, you'll get a message saying the boot record is altered(which it is). Go ahead and run that and it will give you a clean boot.

That's always works for me (even with the windows in ntfs). You can also use mandrake to resize and add partions like partition magic. It's not as good but it will work.

Hope this helps


All times are GMT -5. The time now is 12:26 AM.