Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.56 KB | None | 0 0
  1. $ sudo fdisk -l /dev/sdb
  2. Disk /dev/sdb: 14.7 GiB, 15795748864 bytes, 30851072 sectors
  3. Units: sectors of 1 * 512 = 512 bytes
  4. Sector size (logical/physical): 512 bytes / 512 bytes
  5. I/O size (minimum/optimal): 512 bytes / 512 bytes
  6.  
  7. $ for i in {1..14}
  8. > do
  9. > dd if=/dev/urandom bs=1M count=1000 of=$i
  10. > done
  11. 1000+0 records in
  12. 1000+0 records out
  13. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.6045 s, 14.9 MB/s
  14. 1000+0 records in
  15. 1000+0 records out
  16. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.467 s, 14.9 MB/s
  17. 1000+0 records in
  18. 1000+0 records out
  19. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.6904 s, 14.8 MB/s
  20. 1000+0 records in
  21. 1000+0 records out
  22. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 73.7669 s, 14.2 MB/s
  23. 1000+0 records in
  24. 1000+0 records out
  25. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.7134 s, 14.8 MB/s
  26. 1000+0 records in
  27. 1000+0 records out
  28. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 69.9391 s, 15.0 MB/s
  29. 1000+0 records in
  30. 1000+0 records out
  31. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 71.345 s, 14.7 MB/s
  32. 1000+0 records in
  33. 1000+0 records out
  34. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.3856 s, 14.9 MB/s
  35. 1000+0 records in
  36. 1000+0 records out
  37. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 71.5003 s, 14.7 MB/s
  38. 1000+0 records in
  39. 1000+0 records out
  40. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.5103 s, 15.3 MB/s
  41. 1000+0 records in
  42. 1000+0 records out
  43. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 67.9936 s, 15.4 MB/s
  44. 1000+0 records in
  45. 1000+0 records out
  46. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.5459 s, 15.3 MB/s
  47. 1000+0 records in
  48. 1000+0 records out
  49. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.746 s, 15.3 MB/s
  50. 1000+0 records in
  51. 1000+0 records out
  52. 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.9829 s, 15.2 MB/s
  53.  
  54. $ sha256sum {1..14}
  55. 22842394bcfe90cb269215cf15e736cfdc1dd0baab496f81e8d6cdba4c39e44d 1
  56. 045b34116f5fa87216a0bb867420335b1781f56326eb104a227eb934c5099f8b 2
  57. b1988a2f8d5a5e8521238904e87b719c02ba0b7b2d953bfd25d82034db1914f4 3
  58. d6764231ff43655a7b9333de56c1c2dc87d8a25f40d8bc6dacb8656e83639006 4
  59. f28a6db4525bde136225b9aabc9868a88ccd30a3bde47cf28fb3ffe625f40481 5
  60. a7914ad94f2c0c1223fc9c614334ef9b6a83fe932358dcc699b9f63c00d6d119 6
  61. 862abb2e3ab46faa5a019fd9ac58366cfc655f9ff2046176241c742013708cad 7
  62. bff7cd97eb73aade6a7d1c42f3bfc55abf23ee3780f6e5615bec095e7c019b2c 8
  63. 6e5c648cc49c3d704fe08b7b4c634747449fa76d16fd62b1a1375d95fe15ef01 9
  64. d5aa6cbd1c23b00b42cada94cd69acc770c141f43ff75e8fed432226722b55a6 10
  65. 14228faa8eb1c421d4e02232a0d53050adea0741736f41aee2691700def12408 11
  66. 07e897482f78e04dbf4c82c857515ad8a9ab419bcbfdac7b5d63eda102d29529 12
  67. df17d4d42ad8522070e2b7bb6637fb761361a3f83517d1905375fa053d036654 13
  68. 1c19630ab6085176807c1c01c230287955874856fb6e0939ec8d713cb64fb6f2 14
  69.  
  70. $ mkdir thumbDrive
  71.  
  72. $ sudo mount /dev/sdc1 thumbDrive
  73.  
  74. $ sudo chmod 777 thumbDrive
  75.  
  76. $ cp {1..14} thumbDrive/^C
  77.  
  78. $ sudo umount thumbDrive/
  79.  
  80. ## Had to unmount the partition, disconnect the thumb drive, pack up my laptop, and leave after the first 7 files were fully written (waited just til the 7th file was completed.)
  81.  
  82. ## Partition got auto-mounted, that's why its in a different location.
  83.  
  84. ## Deleting partially written file.
  85. $ rm /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/8
  86.  
  87. $ cp {8..14} /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/
  88. cp: error writing '/media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/14': No space left on device
  89.  
  90. ## Partition ran out of space due to 5% of the storage space being reserved for root, by default. Changing this, deleting partially written file, and copying the last file over.
  91.  
  92. $ sudo umount /dev/sdc1
  93.  
  94. $ sudo tune2fs -m 0 /dev/sdc1
  95. tune2fs 1.42.13 (17-May-2015)
  96. Setting reserved blocks percentage to 0% (0 blocks)
  97.  
  98. $ sudo mount /dev/sdc1 thumbDrive
  99.  
  100. $ cp 14 thumbDrive
  101.  
  102. ## Unmounting the partition, removing the thumb drive, and reconnecting it to make sure my OS doesn't have data which should be on the thumb drive cached. Remember that it gets auto-mounted due to being reconnected, so the path changes, again.
  103.  
  104. $ sudo umount /dev/sdc1
  105.  
  106. $ sha256sum /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/*
  107. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/1: Input/output error
  108. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/10: Input/output error
  109. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/11: Input/output error
  110. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/12: Input/output error
  111. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/13: Input/output error
  112. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/14: Input/output error
  113. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/2: Input/output error
  114. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/3: Input/output error
  115. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/4: Input/output error
  116. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/5: Input/output error
  117. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/6: Input/output error
  118. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/7: Input/output error
  119. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/8: Input/output error
  120. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/9: Input/output error
  121. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/lost+found: Permission denied
  122.  
  123. ## Weird. Let's try again.
  124.  
  125. $ sha256sum /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/*
  126. 7a0dd528a155561f264dde079a8f5cbbd2ed286a00c7a9a78d2c719f61f77229 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/1
  127. d5aa6cbd1c23b00b42cada94cd69acc770c141f43ff75e8fed432226722b55a6 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/10
  128. 14228faa8eb1c421d4e02232a0d53050adea0741736f41aee2691700def12408 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/11
  129. 07e897482f78e04dbf4c82c857515ad8a9ab419bcbfdac7b5d63eda102d29529 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/12
  130. df17d4d42ad8522070e2b7bb6637fb761361a3f83517d1905375fa053d036654 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/13
  131. 1c19630ab6085176807c1c01c230287955874856fb6e0939ec8d713cb64fb6f2 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/14
  132. 045b34116f5fa87216a0bb867420335b1781f56326eb104a227eb934c5099f8b /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/2
  133. b1988a2f8d5a5e8521238904e87b719c02ba0b7b2d953bfd25d82034db1914f4 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/3
  134. d6764231ff43655a7b9333de56c1c2dc87d8a25f40d8bc6dacb8656e83639006 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/4
  135. f28a6db4525bde136225b9aabc9868a88ccd30a3bde47cf28fb3ffe625f40481 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/5
  136. a7914ad94f2c0c1223fc9c614334ef9b6a83fe932358dcc699b9f63c00d6d119 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/6
  137. 862abb2e3ab46faa5a019fd9ac58366cfc655f9ff2046176241c742013708cad /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/7
  138. bff7cd97eb73aade6a7d1c42f3bfc55abf23ee3780f6e5615bec095e7c019b2c /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/8
  139. 6e5c648cc49c3d704fe08b7b4c634747449fa76d16fd62b1a1375d95fe15ef01 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/9
  140. sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/lost+found: Permission denied
  141.  
  142. ------------------------------------------------------------------------
  143.  
  144. So it failed for these files: 1
  145. And it succeeded for these: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
  146.  
  147. It therefore is not a fake thumb drive which states to have more storage space than it actually has.
  148.  
  149. Q.E.D.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement