LinuxQuestions.org
Register a domain and help support LQ
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 02-17-2013, 10:27 AM   #1
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux
Posts: 224

Rep: Reputation: 15
Wipe Hard Disk


I want to erase a HD currently installed with Etch and Squeeze before installing Wheezy (testing). AFAIK either of 2 commands (below) issued by a Knoppix live CD should suffice. But I want to be sure.
From /dev I see:
Code:
<SNIP>
brw-rw----   1 root disk      8,   0 Feb 17 06:59 sda
brw-rw----   1 root disk      8,   1 Feb 17 06:59 sda1
brw-rw----   1 root disk      8,   2 Feb 17 06:59 sda2
brw-rw----   1 root disk      8,   3 Feb 17 06:59 sda3
brw-rw----   1 root disk      8,   4 Feb 17 06:59 sda4
brw-rw----   1 root disk      8,   5 Feb 17 06:59 sda5 
<SNIP>

Code:
badblocks -b 4096 -c 3276 -w -s /dev/sda
Or:
Code:
dd if=/dev/zero of=/dev/sda bs=1M
If that succeeds, do I have to format the drive before I install Wheezy? Or does formatting and partitioning take care of themselves during the install?

rooster

Last edited by r00ster; 02-17-2013 at 10:33 AM. Reason: Additional Question
 
Old 02-17-2013, 10:35 AM   #2
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian Sid. Arch. In the process of converting to and learning FreeBSD
Posts: 1,023
Blog Entries: 6

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by r00ster View Post
If that succeeds, do I have to format the drive before I install Wheezy? Or does formatting and partitioning take care of themselves during the install?
The installer will allow you to partition and format each partition before installing to those partitions. In fact, it will require you to do so.
 
1 members found this post helpful.
Old 02-17-2013, 10:39 AM   #3
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux
Posts: 224

Original Poster
Rep: Reputation: 15
Thanks goumba.

rooster
 
Old 02-17-2013, 10:40 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
You don't need to wipe out the surface of HDD in order to install new distro. You need either to remove partitions or delete all files from partition which you're planning to install new distro on. As goumba said, you can repartition whole HDD during the installation of Wheezy. Steps you described in your question are more suitable for preparation of HDD for selling and better to be done with `shred`.
 
Old 02-17-2013, 11:20 AM   #5
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux
Posts: 224

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Mr. Alex View Post
You don't need to wipe out the surface of HDD in order to install new distro. You need either to remove partitions or delete all files from partition which you're planning to install new distro on. As goumba said, you can repartition whole HDD during the installation of Wheezy. Steps you described in your question are more suitable for preparation of HDD for selling and better to be done with `shred`.
Thanks Alex;
Seems there are several different opinions on the best procedure for a clean install. Perhaps its just perchance, but the threads I've read seem to favour wiping partitions before installing a new distro. Also, the partition I'm setting up for Wheezy is going to be larger than either of those currently installed. I didn't know just how the installer would handle this. Hence, I thought to erase both and start over. I'm only using 80GB total for both Etch and Squeeze on a 160GB Drive. I don't need either anymore for a variety of reasons. Assuming more iterations of Deb are forthcoming, I'm thinking I might as well start fresh with Wheezy and put its descendants in tandem as they get rolled out.

Rephrasing my question: is there anything wrong with either of the 2 options I mentioned in my OP? I don't need to wipe the entire 160GB disk; just the first 80GB containing Etch and Squeeze.

rooster
 
Old 02-17-2013, 11:25 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Member Response

Hi,

No need to wipe the drive with 'dd'. Just format the partitions with the desired filesystem. Unless you wish to create new partitions with different allocation for each then just create a new filesystem on each existing partition.
 
Old 02-17-2013, 11:58 AM   #7
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian Sid. Arch. In the process of converting to and learning FreeBSD
Posts: 1,023
Blog Entries: 6

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by r00ster View Post
Rephrasing my question: is there anything wrong with either of the 2 options I mentioned in my OP? I don't need to wipe the entire 160GB disk; just the first 80GB containing Etch and Squeeze.
As the others said, you don't need to wipe it. I assumed you had some reason for doing so - but you know what happens when one does so .

Just repartition the drive, deleting, creating or resizing partitions as necessary in the installer, and make sure any partitions that you do not change, you still tell the installer to format those partitions (Debian Installer will keep data and not format an existing parition unless you tell it otherwise, IIRC).
 
Old 02-17-2013, 12:01 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
There is a difference between wiping partitions and wiping the entire disk. The latter is unnecessary for just installing a new OS and stresses the disk without any benefit. If you want to wipe the partitions (aka zeroing out the partition table) you only need to write zeroes to the first logical block, which contains the partition table:
Code:
dd if=/dev/zero of=/dev/sda bs=512 count=1
After that the installer will do the partitioning automatically, if you wish so.
 
1 members found this post helpful.
Old 02-18-2013, 04:02 AM   #9
r00ster
Member
 
Registered: May 2007
Location: boundary beach, bc
Distribution: 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux
Posts: 224

Original Poster
Rep: Reputation: 15
TobiSGD:

Thanks. That is just the answer I was looking for.

Ich bin Ihnen sehr dankbar:

rooster
 
  


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
military grade disk wipe Red Squirrel Linux - Security 46 05-16-2014 09:13 AM
dd command for disk wipe fiosu Linux - Newbie 1 12-27-2012 03:35 AM
How do you wipe a disk? arunkumarev Linux - Newbie 3 04-20-2011 06:20 AM
Hard disk wipe software suggestions airman99 Linux - Software 14 11-19-2007 10:47 AM
MacOS 8.6 -- disk detect problem after a disk wipe BinJajer Other *NIX 2 02-05-2006 04:24 AM


All times are GMT -5. The time now is 04:53 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