SRE的に実行したコマンドは必ず結果を確認したいやーつ
# 現在のMBRを表示
dd if=/dev/sda bs=512 count=1 | hexdump -C
# Erase MBR
dd if=/dev/zero of=/dev/sda bs=512 count=1
# 削除後のMBRを表示
dd if=/dev/sda bs=512 count=1 | hexdump -C
e.g.
# show MBR
[root@hostname:~]# dd if=/dev/sda bs=512 count=1 | hexdump -C
1+0 records in
1+0 records out
512 bytes (512 B) copied, 8.1932e-05 s, 6.2 MB/s
00000000 eb 63 90 00 00 00 00 00 00 00 00 00 00 00 00 00 |.c..............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
省略
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
# erase MBR
[root@hostname:~]# dd if=/dev/zero of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 7.9788e-05 s, 6.4 MB/s
# show MBR
[root@hostname:~]# dd if=/dev/sda bs=512 count=1 | hexdump -C
1+0 records in
1+0 records out
512 bytes (512 B) copied, 6.5033e-05 s, 7.9 MB/s
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200