I installed Ubuntu on a USB disk, my installation is:
sudo fdisk -l /dev/sdb
Disk /dev/sdb: 7773 MB, 7773585408 bytes
240 heads, 62 sectors/track, 1020 cylinders, total 15182784 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006f051
Device Boot Start End Blocks Id System
/dev/sdb1 * 62 12289124 6144531+ 83 Linux
/dev/sdb2 12290048 15182783 1446368 82 Linux swap / Solaris
I then zeroed blocks reserved
sudo tune2fs -m 0 /dev/sdb1
I have overwritten empty space in /dev/sdb1
dd if=/dev/urandom of=random.file bs=1024
Then I tried with photorec to recover deleted files "from whole partition" sdb1. Photorec retrives a lot of files, I do not understand where they are saved.
I have noticed that there is unallocated space between partitions, can it be the problem?
Photorec
PhotoRec 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Disk /dev/sdb - 7773 MB / 7413 MiB (RO) - Sony Storage Media
Partition Start End Size in sectors
No partition 0 0 1 1020 83 38 15182784 [Whole disk]
> 1 * Linux 0 1 1 825 211 43 12289063
2 P Linux Swap 825 226 37 1020 83 38 2892736