LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-08-2005, 09:27 PM   #1
357mag
Member
 
Registered: Feb 2005
Posts: 95

Rep: Reputation: 15
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.
 
Old 03-08-2005, 09:50 PM   #2
w1z4rd
LQ Newbie
 
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
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.
 
Old 03-08-2005, 10:13 PM   #3
caladbolg
Member
 
Registered: Jul 2004
Distribution: Mandrake 10.x, Fedora Core 3, Archlinux 0.7, Ubuntu 5.04
Posts: 303

Rep: Reputation: 31
Linux LiveCD's work great too
 
Old 03-09-2005, 02:10 AM   #4
andrej666
LQ Newbie
 
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
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?
 
Old 03-09-2005, 02:47 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,799

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
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
 
Old 03-09-2005, 12:29 PM   #6
357mag
Member
 
Registered: Feb 2005
Posts: 95

Original Poster
Rep: Reputation: 15
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?
 
Old 03-09-2005, 12:44 PM   #7
mac57
Member
 
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253

Rep: Reputation: 30
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.
 
Old 03-09-2005, 12:58 PM   #8
357mag
Member
 
Registered: Feb 2005
Posts: 95

Original Poster
Rep: Reputation: 15
What about using fdisk? How would I access it? Just open up a console window and type fdisk at the prompt?
 
Old 03-09-2005, 01:23 PM   #9
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
fdisk /dev/hda

or whatever drive you are trying to use.
 
Old 03-10-2005, 01:58 PM   #10
xgm
Member
 
Registered: Feb 2005
Location: Sitges, Earth
Distribution: MDV2005LE, 2006 rc2
Posts: 58

Rep: Reputation: 15
Thumbs up

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.
 
Old 03-16-2005, 08:53 AM   #11
charlescpc
Member
 
Registered: Nov 2004
Location: knoxville tn
Distribution: Mandrake
Posts: 142

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with re-arranging hard disk partitions umichLinux Linux - General 4 04-10-2005 04:13 PM
Which sizes on hard-disk partitions? andersh3 Linux - Newbie 1 05-28-2004 10:22 AM
How do I access my other hard disk partitions?? Bilal Linux - Newbie 4 12-21-2003 06:17 AM
Hard Disk Partitions thenebula Linux - Newbie 8 10-24-2003 10:16 PM
Hard Disk Partitions bumsbunny Linux - Newbie 5 07-10-2001 08:10 PM


All times are GMT -5. The time now is 01:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration