Ubuntu Pastebin

Paste from jakkio at Mon, 14 Sep 2015 15:23:40 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
root@ubuntu-gnome:~# bash erase 
dm-crypt
dd: error writing ‘/dev/mapper/random_sda4’: No space left on device
2049+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 24.1911 s, 88.8 MB/s
device-mapper: remove ioctl on random_sda4 failed: Device or resource busy

real	0m24.940s
user	0m0.004s
sys	0m1.976s

openssl
error writing output file

real	0m23.926s
user	0m0.956s
sys	0m2.628s

shred
shred: /dev/sda4: pass 1/1 (random)...
shred: /dev/sda4: pass 1/1 (random)...382MiB/2.0GiB 18%
shred: /dev/sda4: pass 1/1 (random)...830MiB/2.0GiB 40%
shred: /dev/sda4: pass 1/1 (random)...1.2GiB/2.0GiB 62%
shred: /dev/sda4: pass 1/1 (random)...1.6GiB/2.0GiB 84%
shred: /dev/sda4: pass 1/1 (random)...2.0GiB/2.0GiB 100%

real	0m22.999s
user	0m3.576s
sys	0m1.072s
root@ubuntu-gnome:~# ^C
root@ubuntu-gnome:~# cat erase 
crypt_erase() {

cryptsetup create random_sda4 /dev/sda4 -d /dev/urandom
dd if=/dev/zero of=/dev/mapper/random_sda4 bs=1M
cryptsetup remove random_sda4

}

echo dm-crypt
time crypt_erase

echo
echo openssl
time openssl enc -aes-128-ctr -v -pass pass:"$(openssl rand -base64 128)" -nosalt < /dev/zero > /dev/sda4

echo
echo shred
time shred -v -n1 /dev/sda4


#root@ubuntu-gnome:~# time dd if=/dev/urandom of=/dev/sda4
#dd: writing to ‘/dev/sda4’: No space left on device
#4194305+0 records in
#4194304+0 records out
#2147483648 bytes (2.1 GB) copied, 401.988 s, 5.3 MB/s
#
#real	6m41.991s
#user	0m1.528s
#sys	5m35.732s
root@ubuntu-gnome:~# 
Download as text