Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 09:33 AM.
Reason: Additional Question
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.
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`.
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.
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.
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).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.