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.
2 Answers
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.
-
@Verandaguy The Ubuntu Server install CD is also capable of wiping you existing Ubuntu system and replacing it with a completely new system. Jun 4, 2012 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.– SergeyJun 4, 2012 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.– SergeyJun 4, 2012 at 0:11
-
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.
-
1His problem is not being able to boot from CD, see comments to other answer.– ishJun 4, 2012 at 0:54