Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ sudo fdisk -l /dev/sdb
- Disk /dev/sdb: 14.7 GiB, 15795748864 bytes, 30851072 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
- $ for i in {1..14}
- > do
- > dd if=/dev/urandom bs=1M count=1000 of=$i
- > done
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.6045 s, 14.9 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.467 s, 14.9 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.6904 s, 14.8 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 73.7669 s, 14.2 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.7134 s, 14.8 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 69.9391 s, 15.0 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 71.345 s, 14.7 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 70.3856 s, 14.9 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 71.5003 s, 14.7 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.5103 s, 15.3 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 67.9936 s, 15.4 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.5459 s, 15.3 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.746 s, 15.3 MB/s
- 1000+0 records in
- 1000+0 records out
- 1048576000 bytes (1.0 GB, 1000 MiB) copied, 68.9829 s, 15.2 MB/s
- $ sha256sum {1..14}
- 22842394bcfe90cb269215cf15e736cfdc1dd0baab496f81e8d6cdba4c39e44d 1
- 045b34116f5fa87216a0bb867420335b1781f56326eb104a227eb934c5099f8b 2
- b1988a2f8d5a5e8521238904e87b719c02ba0b7b2d953bfd25d82034db1914f4 3
- d6764231ff43655a7b9333de56c1c2dc87d8a25f40d8bc6dacb8656e83639006 4
- f28a6db4525bde136225b9aabc9868a88ccd30a3bde47cf28fb3ffe625f40481 5
- a7914ad94f2c0c1223fc9c614334ef9b6a83fe932358dcc699b9f63c00d6d119 6
- 862abb2e3ab46faa5a019fd9ac58366cfc655f9ff2046176241c742013708cad 7
- bff7cd97eb73aade6a7d1c42f3bfc55abf23ee3780f6e5615bec095e7c019b2c 8
- 6e5c648cc49c3d704fe08b7b4c634747449fa76d16fd62b1a1375d95fe15ef01 9
- d5aa6cbd1c23b00b42cada94cd69acc770c141f43ff75e8fed432226722b55a6 10
- 14228faa8eb1c421d4e02232a0d53050adea0741736f41aee2691700def12408 11
- 07e897482f78e04dbf4c82c857515ad8a9ab419bcbfdac7b5d63eda102d29529 12
- df17d4d42ad8522070e2b7bb6637fb761361a3f83517d1905375fa053d036654 13
- 1c19630ab6085176807c1c01c230287955874856fb6e0939ec8d713cb64fb6f2 14
- $ mkdir thumbDrive
- $ sudo mount /dev/sdc1 thumbDrive
- $ sudo chmod 777 thumbDrive
- $ cp {1..14} thumbDrive/^C
- $ sudo umount thumbDrive/
- ## 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.)
- ## Partition got auto-mounted, that's why its in a different location.
- ## Deleting partially written file.
- $ rm /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/8
- $ cp {8..14} /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/
- cp: error writing '/media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/14': No space left on device
- ## 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.
- $ sudo umount /dev/sdc1
- $ sudo tune2fs -m 0 /dev/sdc1
- tune2fs 1.42.13 (17-May-2015)
- Setting reserved blocks percentage to 0% (0 blocks)
- $ sudo mount /dev/sdc1 thumbDrive
- $ cp 14 thumbDrive
- ## 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.
- $ sudo umount /dev/sdc1
- $ sha256sum /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/*
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/1: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/10: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/11: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/12: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/13: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/14: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/2: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/3: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/4: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/5: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/6: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/7: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/8: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/9: Input/output error
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/lost+found: Permission denied
- ## Weird. Let's try again.
- $ sha256sum /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/*
- 7a0dd528a155561f264dde079a8f5cbbd2ed286a00c7a9a78d2c719f61f77229 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/1
- d5aa6cbd1c23b00b42cada94cd69acc770c141f43ff75e8fed432226722b55a6 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/10
- 14228faa8eb1c421d4e02232a0d53050adea0741736f41aee2691700def12408 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/11
- 07e897482f78e04dbf4c82c857515ad8a9ab419bcbfdac7b5d63eda102d29529 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/12
- df17d4d42ad8522070e2b7bb6637fb761361a3f83517d1905375fa053d036654 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/13
- 1c19630ab6085176807c1c01c230287955874856fb6e0939ec8d713cb64fb6f2 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/14
- 045b34116f5fa87216a0bb867420335b1781f56326eb104a227eb934c5099f8b /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/2
- b1988a2f8d5a5e8521238904e87b719c02ba0b7b2d953bfd25d82034db1914f4 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/3
- d6764231ff43655a7b9333de56c1c2dc87d8a25f40d8bc6dacb8656e83639006 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/4
- f28a6db4525bde136225b9aabc9868a88ccd30a3bde47cf28fb3ffe625f40481 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/5
- a7914ad94f2c0c1223fc9c614334ef9b6a83fe932358dcc699b9f63c00d6d119 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/6
- 862abb2e3ab46faa5a019fd9ac58366cfc655f9ff2046176241c742013708cad /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/7
- bff7cd97eb73aade6a7d1c42f3bfc55abf23ee3780f6e5615bec095e7c019b2c /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/8
- 6e5c648cc49c3d704fe08b7b4c634747449fa76d16fd62b1a1375d95fe15ef01 /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/9
- sha256sum: /media/christoph/e5751a98-025e-4817-b1b6-808902e67ea6/lost+found: Permission denied
- ------------------------------------------------------------------------
- So it failed for these files: 1
- And it succeeded for these: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
- It therefore is not a fake thumb drive which states to have more storage space than it actually has.
- Q.E.D.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement