0

Experiments were done, before re-purposing a disk:
re-purposing = delete all data
re-purposing = delete all partitions
re-purposing = fill disk with all zeros
re-purposing = confirm all zeros, confirm no non-zero data
re-purposing = make a raw disk, unallocated disk, like disk is all zeros from store

from the net we have:
mbr (master boot record) is the first 446 bytes
thus everything BUT the partition table

experiment1 = a command to show data, 1024 bytes:

sudo dd if=/dev/sd_ bs=512 count=1 skip=0 |hexdump -ve '1/1 "%.2x"'  #show_first_1024_bytes_of_disk  

sd_ = sda or sdb ... etc...

result was 1024 bytes

copy 1024 bytes from terminal and paste between quotes " " in command:

echo "" |fold -sw 80 > file80.txt   #Break_Long_String_into_80_character_lines   

result from a previous wipe:

00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000

experiment2 = a command from the net to destroy data:

sudo dd if=/dev/urandom of=/dev/sd_ bs=446 count=1   #Wipe_Master_boot_record_(MBR)_892characters  

sd_ = sda or sdb ... etc...

bs=BYTES read and write up to BYTES bytes at a time
(default: 512); overrides ibs and obs

446 bytes is the expected data destroyed / deleted / wiped

sudo dd if=/dev/sd_ bs=512 count=1 skip=0 |hexdump -ve '1/1 "%.2x"'  #show_first_1024_bytes_of_disk  
echo "" |fold -sw 80 > file80.txt   #Break_Long_String_into_80_character_lines  

result from above:

cda9a2d8b76dc5302b92be7698c5f74f75d1aea528b5be465b69c55096709376e7e2c774157853f2
7034074de3d7aff78a4d76af059856ba48d71456521baf8e46fa4278145a0ddb96d7e560338e15ef
fd2c27d7c774d0faebca3c2f5ad829db26db25d15dc65bfca8f5db448fe7cbc880b9b085f1a018b4
5ade8881840d77b6aa5f3bde7787d313c6bd5865b1e48f3e76650b75470a06d55dd21e3edc1e2e99
40d23beac497ed76a4025f405b86e81bd989a039550d5cf270ae7ce8f16c199f10181f1e4215ca4e
280959c3e7e30117860a695c60b1af52032c4774606a82b5b952ec4a9340828f0238cf9fa99a07c4
4fd15b48074b2e9f4a1c6f0e6346dd6301146e90399b483d93d0ea86d4d074584788bafc61a2921c
0e45d96a8de4ecea691abdb97559aa1ea63df8a51d94a3012696726f0aa2e706500c0296b8dc6e2f
7d883d7a7666ebd99f0525d5cba900a513045f91c7173d24c1435644763ef294e46e6f1edc730166
efa5a7eecaccbf7dbcac13fe4103c4d8e318d2261a9868d3f2e569f59e7ffd1680269eba6f5ae140
3e331884b720c77408655ef5946dfc832f31d55e5b059377db01033e2ef03c3835533a795ac7725c
f0c965cdeffd00000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000

446 bytes is the expected data wiped (urandom)
892 bytes is the actual data wiped (urandom)

How to measure above 892 bytes?
Copy and Paste above non-zeros into
LibreOffice / Tools / WordCount /

Question:
How come 892 bytes were changed? not 446 bytes

because the dd command said 446 bytes

sudo dd if=/dev/urandom of=/dev/sd_ bs=446 count=1   #Wipe_Master_boot_record_(MBR)_892characters  

.
.

Side note, from net, 2 commnads to zero drive:

time sudo dd if=/dev/zero of=/dev/sd_ bs=1M status=progress  #Pass1zeros    
time sudo shred -n 1 -z -v   /dev/sd_                        #Pass1random_Pass2zeros  

Side note, from net, 7 commnads to confirm zero filled drive

time sudo dd     if=/dev/sd_ bs=1M status=progress | od | head  #verify_disk_zero_filled_statusProgress  
time sudo badblocks -sv -t 0x00 /dev/sd_                        #verify_disk_zero_filled  
time sudo dd     if=/dev/sd_ conv=noerror,sync | od | head      #verify_disk_zero_filled   
time sudo cmp       /dev/sd_ /dev/zero                          #verify_disk_zero_filled  
time sudo od        /dev/sd_ | head                             #verify_disk_zero_filled  
time sudo pv        /dev/sd_ | od | head                        #verify_disk_zero_filled  
time sudo pv -tpreb /dev/sd_ | od | head                        #verify_disk_zero_filled  

.
.

using:
neofetch --stdout |grep 'OS:'

OS: Kubuntu 22.04.3 LTS x86_64

.
.

Questions:
How come 892 bytes were changed? _ not 446 bytes

How come dd was given bs=446 count=1
but the result was double 446 bytes ? = 892 bytes

sudo dd if=/dev/urandom of=/dev/sd_ bs=446 count=1   #Wipe_Master_boot_record_(MBR)_892characters  

.

--

joseph22
  • 509

0 Answers0