Check with sudo fdisk -l (that is, lowercase L at the end) which disks are there.
Code:
wim@aa0:~$ sudo fdisk -l
Disk /dev/sda: 8069 MB, 8069677056 bytes
255 heads, 63 sectors/track, 981 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003255d
Device Boot Start End Blocks Id System
/dev/sda1 * 1 918 7367680 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 918 981 509953 5 Extended
Partition 2 does not end on cylinder boundary.
/dev/sda5 918 981 509952 82 Linux swap / Solaris
Disk /dev/sdb: 4127 MB, 4127195136 bytes
127 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7874 * 512 = 4031488 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000451df
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1023 4027520 b W95 FAT32
Partition 1 has different physical/logical endings:
phys=(1023, 126, 62) logical=(1022, 126, 62)
wim@aa0:~$
In the above, there are 2 disks, /dev/sda (my system disk) and /dev/sdb (an additional disk). You will get a few more (sdc, sdd etc, one for each disk inyour system)
Make sure the partitions on the non-system disks are not mounted.
Code:
wim@aa0:~$ mount
/dev/sda1 on / type ext4 (rw,noatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdb1 on /media/PENDRIVE type vfat (rw,nosuid,nodev,uhelper=hal,uid=1000,shortname=winnt)
wim@aa0:~$
In this case, partition 1 (/dev/sdb1) of disk2 (/dev/sdb) is mounted. You need to unmount all partitions of the non-system disks if they are mounted.
Code:
wim@aa0:~$ sudo umount /dev/sdb1
wim@aa0:~$
Next you can wipe the disk by overwriting it with zeros using the dd command
Code:
sudo dd if=/dev/zero of=/dev/sdb
Repeat for sdc, sdd etc. MAke sure that you don't overwrite you system disk which is probably /dev/sda.
You can force the commands to the background by adding an ampersand at the end
Code:
sudo dd if=/dev/zero of=/dev/sdb &
Personally I would rather open multiple consoles / terminals and run each 'dd' in its own terminal so you can more easily check when they are done.
Note that the process can take long. For a normal wipe this should be enough; normal users will not be able to get data back that is wiped that way. I'm not that paranoid that I will overwrite with /dev/random and do multiple wipes so I will use /dev/zero.
One link that I found:
http://how-to.wikia.com/wiki/How_to_...clean_in_Linux
Note:
commands in red bold
Bookmarks