在重新利用磁盘之前,进行了实验:
重新利用 = 删除所有数据
重新利用 = 删除所有分区
重新利用 = 用全零填充磁盘
重新利用 = 确认全零,确认没有非零数据
重新利用 = 制作原始磁盘,未分配的磁盘,就像磁盘从存储中全是零一样
从网上我们得知:
mbr(主引导记录)是前 446 个字节,
因此是除分区表之外的所有内容
experiment1 = 显示数据的命令,1024字节:
sudo dd if=/dev/sd_ bs=512 count=1 skip=0 |hexdump -ve '1/1 "%.2x"' #show_first_1024_bytes_of_disk
sd_ = sda 或 sdb ...等等...
结果是 1024 字节
从终端复制 1024 个字节并粘贴在命令中的引号“ ”之间:
echo "" |fold -sw 80 > file80.txt #Break_Long_String_into_80_character_lines
先前擦除的结果:
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
实验2 = 来自网络的销毁数据的命令:
sudo dd if=/dev/urandom of=/dev/sd_ bs=446 count=1 #Wipe_Master_boot_record_(MBR)_892characters
sd_ = sda 或 sdb ...等等...
bs
=BYTES 每次读取和写入最多 BYTES 字节
(默认值:512);覆盖 ibs 和 obs
446
字节是预期被销毁/删除/擦除的数据
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
上面的结果:
cda9a2d8b76dc5302b92be7698c5f74f75d1aea528b5be465b69c55096709376e7e2c774157853f2
7034074de3d7aff78a4d76af059856ba48d71456521baf8e46fa4278145a0ddb96d7e560338e15ef
fd2c27d7c774d0faebca3c2f5ad829db26db25d15dc65bfca8f5db448fe7cbc880b9b085f1a018b4
5ade8881840d77b6aa5f3bde7787d313c6bd5865b1e48f3e76650b75470a06d55dd21e3edc1e2e99
40d23beac497ed76a4025f405b86e81bd989a039550d5cf270ae7ce8f16c199f10181f1e4215ca4e
280959c3e7e30117860a695c60b1af52032c4774606a82b5b952ec4a9340828f0238cf9fa99a07c4
4fd15b48074b2e9f4a1c6f0e6346dd6301146e90399b483d93d0ea86d4d074584788bafc61a2921c
0e45d96a8de4ecea691abdb97559aa1ea63df8a51d94a3012696726f0aa2e706500c0296b8dc6e2f
7d883d7a7666ebd99f0525d5cba900a513045f91c7173d24c1435644763ef294e46e6f1edc730166
efa5a7eecaccbf7dbcac13fe4103c4d8e318d2261a9868d3f2e569f59e7ffd1680269eba6f5ae140
3e331884b720c77408655ef5946dfc832f31d55e5b059377db01033e2ef03c3835533a795ac7725c
f0c965cdeffd00000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
446
字节是预期擦除的数据(urandom)
892
字节是实际擦除的数据(urandom)
如何测量 892 字节以上?
将非零值复制并粘贴到
LibreOffice / 工具 / WordCount /
问题:字节
怎么892
会改变?不是446
字节
因为 dd 命令表示446
字节
sudo dd if=/dev/urandom of=/dev/sd_ bs=446 count=1 #Wipe_Master_boot_record_(MBR)_892characters
。
。
附注:从网络到零驱动器的 2 个命令:
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
附注:来自网络,有 7 条命令用于确认零填充驱动器
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
。
。
使用:
neofetch --stdout |grep 'OS:'
操作系统:Kubuntu 22.04.3 LTS x86_64
。
。
问题:字节
怎么892
会改变?_ 不是446
字节
为什么给出了 ddbs=446 count=1
但结果却是双字节446
?=892
字节
sudo dd if=/dev/urandom of=/dev/sd_ bs=446 count=1 #Wipe_Master_boot_record_(MBR)_892characters
。
--