LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2008, 04:14 AM   #1
ActionYakson
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
Need Help!!! Want to clear hdd and install linux


Hi, thanks for reading...
I want to clear my hard drive of everything and start fresh with a new version of linux.
I am currently running vista and ubuntu on dual boot. I dont really like it because there are now like 8 ubuntu choices when the dual boot menu comes up (from updates I guess).

Anyway, I will move everything important I need to an external hard drive beforehand.

I want to start from scratch, get rid of everything and install just ubuntu or opensuse with wine and virtualbox. (Can't wait to mess with virtualbox and try windows 7 beta and others!)

My question is:
How do I clear my hard drive of everything and just install linux. I don't want the partition or dualboot anymore!

I am guessing that I need to make a livecd which I can already do, but how do I clear the harddrive of both windows and ubuntu and get rid of the partition?

Any help or comments are greatly appreciated! Please try to make things easy on me, I'm new to linux.
 
Old 12-31-2008, 04:27 AM   #2
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
No offence, but I think you migth want to dual boot until you know how to get rid of those extra kernels.

Anyway, check if the ubuntu livecd comes with cfdisk, an easy to use partitioner. Do "sudo cfdisk /dev/sda" or whatever your disk shows up as in "sudo fdisk -l"
Remove partitions you don't want and create new ones.
Make at least a separate /home partition and a /swap.
The livecd can install ubuntu for you as well.
 
Old 12-31-2008, 04:30 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
When you go to install Ubuntu or Suse, just tell it to use the entire disk during the partitioning stage of the installation and use default partition scheme, or choose "custom partition" or "advanced" or similar to specify the sizes and types of partitions to create if you don't want it to take the whole drive or use defaults.
This will rewrite the MBR partition table which will delete existing partition information.

If you want to clean it as new, boot with your Ubuntu live CD and get to a terminal. Type: sudo fdisk -l to see which drive you want to clean up if you have more than one. Then use dd to write zeros across the drive wiping out the partitions, MBR and all residual data. If it's drive /dev/sda (make sure to get the right one), run this command: dd if=/dev/zero of=/dev/sda bs=4096, sit back and relax, if you have a 2.0GHz processor, it could take around 40 minutes or more per 10GB.
When it's done, you'll have a clean drive similar to what you get in a box at the electronics store, no residual data, no MBR, no partitions.
Then go ahead and boot up your installation CD and create partitions as you please during partitioning stage.

Last edited by Junior Hacker; 12-31-2008 at 04:32 AM.
 
Old 12-31-2008, 04:42 AM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
"dd if=/dev/zero of=/dev/sda bs=512 count=1" should be enough. No need to zero the whole drive.
 
Old 12-31-2008, 05:09 AM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Originally Posted by makuyl View Post
"dd if=/dev/zero of=/dev/sda bs=512 count=1" should be enough. No need to zero the whole drive.
Hmmmmmmm!
Quote:
If you want to clean it as new,...When it's done, you'll have a clean drive similar to what you get in a box at the electronics store
 
Old 12-31-2008, 05:34 AM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Believe it or not:
There are many users out there that want to get rid of all incriminating data just in case the e-forensics guys come and get the drive. Stuff like "child pornography", "web hacking evidence", and the likes.
Just removing the MBR and making new partitions and installing a new distro can still get them some court appearances.
 
Old 12-31-2008, 05:56 AM   #7
IndyGunFreak
Senior Member
 
Registered: Aug 2003
Location: Indpls
Distribution: Laptops: Linux Mint 18 XFCE, Debian Jessie XFCE, NAS: OpenMediaVault
Posts: 1,304

Rep: Reputation: 56
As others have said, Start the Ubuntu Live CD, start the install process, and when it comes to partitioning, there's an option there to "Take over" the entire drive. Choose that option, click next, and it will automatically set up a swap partition and a main / partition w/ an ext3 filesystem. Once you approve, click next again, and wait.

IGF
 
Old 12-31-2008, 07:19 AM   #8
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Quote:
Originally Posted by Junior Hacker View Post
Hmmmmmmm!
OT warning!
Hmm indeed. Zeroing won't get you a "clean" drive. If you really need to wipe data, use a combination of shred, wipe and a powerdrill.
 
Old 12-31-2008, 04:46 PM   #9
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,391

Rep: Reputation: 101Reputation: 101
You could always use something like Darik's Boot And Nuke http://www.dban.org/
 
Old 12-31-2008, 05:05 PM   #10
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,391

Rep: Reputation: 101Reputation: 101
Back to your original question... I am guessing that you wish to remove all partitions rather than worrying about scrubbing all old data from the disk. The install routine for Ubuntu (or most other distributions of Linux) will allow you to remove all old partitions and create new ones. I might offer the following advice on partitioning your drive for the new install as I do some of the things you describe.

1 - Create a small partition for / (8 - 10 GB is fine)- sda1
2 - Create a swap partition about the same size as the RAM installed on the PC - sda2
3 - Create a separate partition for /home (for a single user 5 - 10 GB is fine) - sda3
4 - Partition the rest of the drive as something like /data - sda4

This will allow you to backup the operating system and program files separately from other data. g4l (Ghost for Linux) works great. You simply backup the / partition (sda1) to /data (sda4) and then burn to DVD or copy to another PC for good measure.

User data, settings, email etc. are stored in /user (on sda3). This can also be conveniently backed up.

The rest of the disk is just for fun! I have directories such as:

/data/vmland (I store VMWare files here)
/data/shared (I share this with Samba so my Windows VMs can exchange data)

I also use the /data partition temporary storage of large downloaded files etc. which I either use and discard or burn to CD/DVD for permanent storage. I periodically copy VM files to another PC for backup but generally do not worry about the other stuff on /data.

Ken
 
Old 12-31-2008, 05:59 PM   #11
xc1024
Member
 
Registered: Dec 2008
Posts: 31

Rep: Reputation: 16
boot from any linux livecd, go to terminal and type in

Code:
sudo dd if=/dev/zero of=/dev/sda
this should wipe your disk completely by writing it all with 0's. type this in terminal. you can now go make some coffee, go on internet with livecd or watch TV. be patient, as someone mentioned it is about 40mins/10GB at 2 GHz CPU.

Last edited by xc1024; 12-31-2008 at 06:04 PM.
 
Old 01-01-2009, 05:25 AM   #12
ActionYakson
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you

Wow, thanks a lot guys, didn't expect to get such a helpful response!
Thats great, I actually figured out that the install cd could help me get rid of the other partitions but I did not know about wiping the drive completely clean.

Lots of great info!

I think that I'm going to download a bunch of live cds and run the os off of the livecd until I figure out which one is best for me and works well on my projector.

I'm going to burn live cds for: opensuse, fedora, kubuntu, and possibly mandriva

Thanks again for the helpful info for a noob!
Appreciate it
-Dan
 
Old 01-01-2009, 06:07 AM   #13
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Rep: Reputation: 32
Quote:
There are many users out there that want to get rid of all incriminating data just in case the e-forensics guys come and get the drive. Stuff like "child pornography", "web hacking evidence", and the likes.
I am very sorry, but if a criminal asks for our help in this forum, then I do not want to be a part of LQ anymore. Of course, I am not accusing anyone of that here, but I just want to mention it. Erasing all "evidence" from a hard drive is in my opinion the best way physically and psychologically to start from scratch. Lots of good stuff can be abused but when someone talks about "erasing incriminating data such as child pornography", then I think that's alarming, if that's the first thing that comes to mind. Again, I am not accusing, merely stating my opinion; if a question about formatting a hard drive leads to child pornography within a couple of replies, ...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install Linux from HDD nirjharoberoi Linux - Newbie 7 04-04-2008 11:11 AM
copied Debian install from dead hdd to new hdd.now system fails to boot :S deepclutch Debian 18 02-15-2008 08:17 AM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 11:03 AM
Help me to install a clear Linux kenel image ! blueinred.NET Linux - Newbie 2 03-22-2004 05:17 AM
New HDD For Linux Install fairyliquidizer Linux - Hardware 2 12-11-2003 06:54 PM


All times are GMT -5. The time now is 06:35 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration