WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Want to clean out hard drive before installing Ubuntu - again.  (Read 2910 times)

Offline george3095

  • Newbie
  • *
  • Posts: 2
First off, I am not knowledgeable - at all - but I think my next (for the third time) installation of Ubuntu 9.10 would go better if everything on the hard drive were deleted - FIRST. I think I could install TinycoreLinux on a flash drive, but what do I have to do to delete every directory/file on the hard drive? At the moment, Ubuntu 9.10 is running from the DVD but I am not permitted to delete files or directories on the hard drive.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #1 on: March 20, 2010, 10:01:50 AM »
you don't need to delete anything; if you have ubuntu installed on your hard drive, just extract the bzImage and tinycore.gz files from the tinycore iso image:

sudo mount -o loop /emplacementoftinycore.iso /media/usb (where /media/usb is a mountpoint in ubuntu; it is just an example, it can be another mountpoint)

place the bzImage and the kernel into the boot directory of ubuntu:

sudo cp /media/usb/boot/bzImage /boot
sudo cp /media/usb/boot/tinycore.gz /boot

edit menu.lst in order to write an entry for tinycore:

sudo gedit /boot/grub/menu.lst

at boot, you will see tinycore and ubuntu in the grub menu, and you can select tinycore if you want to run it.

now if you really want to delete all the file on your drive, just reformate your drive either with tinycore or with ubuntu:

sudo mkfs.ext3 /dev/yourharddrivewithpartitionnumber (as f.ex. /dev/sda1 if your harddrive is sda1)

Offline george3095

  • Newbie
  • *
  • Posts: 2
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #2 on: March 20, 2010, 02:25:36 PM »
Thanks, alu, for replying, but when I tried the command you suggested, the message returned was "Command not found." Thanks again, but I think I'll try one more time, just as before, without attempting to wipe the hard drive.

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #3 on: March 20, 2010, 02:44:04 PM »
If you're talking aobut mkfs.ext3, it should be available in either distro.  You may have to specify the full path/set PATH (check /sbin).

To really start again with an empty drive, you could need to zero out the mbr, or partition by ignoring the current one (i.e. `cfdisk -z`).

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #4 on: March 21, 2010, 03:03:02 AM »
...but what do I have to do to delete every directory/file on the hard drive?
It might be worth looking at the small distro Parted Magic http://partedmagic.com/.  One of its primary goals is GUI based management of disks/partitions/files.  It can be booted from either CD or USB flash drive.
   

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14546
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #5 on: March 21, 2010, 03:12:44 AM »
..or you could install tc on a usb stick and use the gparted extension to reformat the hd

Offline jano

  • Newbie
  • *
  • Posts: 37
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #6 on: March 21, 2010, 03:31:41 AM »
If I am not mistaken, when you install Ubuntu from a live CD/DVD, one of the steps involved invokes gparted (to select the partition(s) you want to install to) and there you have the options to format

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #7 on: March 21, 2010, 03:34:53 AM »
Parted Magic also has a tool for completely wiping the hard drive if you want to use it.

DBAN can also be used, but does not have the other tools on Parted Magic.

I have used this type of thing when a hard drive had a virus, particularly when it affected the mbr and could not be made to work using other methods.

In most situations you won't need to wipe the hard drive.

Another situation is if you are selling a computer, and don't want anyone to recover anything previously on the hard drive. Without doing this, recovery tools can be used to recover things you have deleted. This may be useful if you work for a department with highly sensitive information. Most home users don't have anything of concern on their computers.

Parted Magic can then be used to set up partitions how you want them. You can create a number of partitions and install a number of operating systems. Include one swap partition.

Parted Magic is very useful. I think everyone working with computers should have a copy.
Many people see what is. Some people see what can be, and make a difference.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #8 on: March 21, 2010, 03:41:28 AM »
Parted Magic also has a tool for completely wiping the hard drive if you want to use it.
You beat me to the post.  I was about to make exactly the same point. 

In Parted Magic the wiping tools can be started from the GUI but provide little in the way of progress feedback; they just continue until the wiping has finished.  Doing the same using DBAN is not quite as user friendly in terms of the GUI, but does provide a progress indicator.

Both are dependable tools.
   

Offline pema

  • Newbie
  • *
  • Posts: 48
Re: Want to clean out hard drive before installing Ubuntu - again.
« Reply #9 on: March 22, 2010, 04:02:27 AM »
As you allreday have ubuntu you can use gparted included in all ubutnus for editing hardrives, run as sudo.