Guest User

Untitled

a guest
Feb 13th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. dd if=/dev/zero of=/dev/disk/by-id/lousy-vendor-123 bs=128k
  2.  
  3. ddrescue --verbose --force --no-split /dev/zero /dev/disk/by-id/lousy-vendor-123
  4.  
  5. # badblocks -v -b 4096 -t random -o badblocks.txt -w /dev/destroyme
  6. Checking for bad blocks in read-write mode
  7. From block 0 to 2097151
  8. Testing with random pattern: done
  9. Reading and comparing: done
  10. Pass completed, 52105 bad blocks found. (0/52105/0 errors)
  11.  
  12. # head badblocks.txt
  13. 2097000
  14. 2097001
  15. 2097002
  16. 2097003
  17. 2097004
  18.  
  19. # hexdump -C /dev/destroyme
  20. 00000000 be e9 2e a5 87 1d 9e 61 e5 3c 98 7e b6 96 c6 ed |.......a.<.~....|
  21. 00000010 2c fe db 06 bf 10 d0 c3 52 52 b8 a1 55 62 6c 13 |,.......RR..Ubl.|
  22. 00000020 4b 9a b8 d3 b7 57 34 9c 93 cc 1a 49 62 e0 36 8e |K....W4....Ib.6.|
  23.  
  24. $ sudo hdparm -I /dev/sdX
  25. .
  26. # lots of other info here...
  27. .
  28. Security:
  29. Master password revision code = 65534
  30. supported
  31. not enabled
  32. not locked
  33. not frozen
  34. not expired: security count
  35. supported: enhanced erase
  36. 202min for SECURITY ERASE UNIT. 202min for ENHANCED SECURITY ERASE UNIT.
  37.  
  38. $sudo hdparm --user-master u --security-set-pass p /dev/sdX
  39. security_password="p"
  40.  
  41. $sudo hdparm --user-master u --security-erase p /dev/sdX
  42. security_password="p"
  43.  
  44. /dev/sdX:
  45. Issuing SECURITY_ERASE command, password="p", user=user
  46.  
  47. dd conv=notrunc
  48.  
  49. dd conv=noerror
  50.  
  51. dd iflag=fullblock oflag=direct conv=noerror,notrunc if=/dev/zero of=/dev/sda
  52.  
  53. dd iflag=fullblock oflag=direct conv=noerror,notrunc if=/dev/urandom of=/dev/sdX
  54.  
  55. ddrescue --verbose --force --nosplit /dev/urandom /dev/sdX
  56.  
  57. dd if=/dev/sdX of=/dev/null conv=noerror
  58.  
  59. dd if=/dev/zero of=/dev/sdX bs=128k
  60.  
  61. badblocks -v -s -w -t random /dev/sdX
  62. badblocks -v -s -w -t random /dev/sdX
Add Comment
Please, Sign In to add comment