Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've completely screwed up my Ubuntu install, and want to start over (I want to try a different edition anyway, so downloading a new package using apt-get won't be necessary). Is there any way to completely wipe the boot disk using UNIX commands? As it happens, in screwing up my Ubuntu, I've gotten rid of the GUI, and it freezes when I try to boot into GUI-less mode; recovery mode is my only option.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

There's no need to erase the old install prior to installing the new one. Just boot from the LiveCD of the new Ubuntu, choose manual partitioning and make sure you choose to format the root partition.

If you have your home directory on a separate partition, you may keep it, which will preserve your documents - but, as usual, making a backup of all your data is essential before re-installing.

share|improve this answer
    
@Verandaguy The Ubuntu Server install CD is also capable of wiping you existing Ubuntu system and replacing it with a completely new system. –  Eliah Kagan Jun 4 '12 at 0:07
    
I'm not sure if Server has a real "live CD", i.e. the one which can be used as a real OS with applications and stuff, but surely you can boot from Ubuntu Server's CD and install Ubuntu from there. –  Sergey Jun 4 '12 at 0:08
    
@Verandaguy: If you can't boot from the CD it means either the CD is not right (not bootable) or the BIOS settings not right. –  Sergey Jun 4 '12 at 0:11
    
What is your motherboard (or computer) model number/manufacturer? –  izx Jun 4 '12 at 0:54
add comment

Here's a way to completely and thoroughly wipe your disk or partition. But take the usual warnings to heart. Backup anything important and make sure you put the right info in the output file field. Also note most OS installs prompts will let you overwrite previous installs or re-partition as part of the installation process. This method is destructive and extremely hard to recover and data from(if even possible).

With just about any linux live CD you could boot into a live environment and run the following command in a terminal. This will completely erase the data, bit by bit, overwriting it with zeros.

sudo dd if=/dev/zero of=/dev/sdax

Replace "sdax" with the proper disk and partition to be formatted. Sit back, and relax. Be careful you erase the right thing. Do this at your own risk.

share|improve this answer
1  
His problem is not being able to boot from CD, see comments to other answer. –  izx Jun 4 '12 at 0:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.