Which of the following commands overwrites the bootloader located on /dev/sda without
overwriting the partition table or any data following it?
A.
dd if=/dev/zero of=/dev/sda bs=512
B.
dd if=/dev/zero of=/dev/sda bs=512 count=1
C.
dd if=/dev/zero of=/dev/sda bs=440 count=1
D.
dd if=/dev/zero of=/dev/sda bs=440
Explanation:
In my opinion is the B.
The reason is that MBR size is 521 bytes (https://en.wikipedia.org/wiki/Master_boot_record) and we write one time (count=1).
@TheBroker, it’s 512 universally… C is correct.
I am fairly new to this, but I believe that the partition table info is located after the primary bootstrap loader and before the MBR validation check. Answer B would overwrite the partition table info as well as the MBR validation check after it.
I believe that based on the question asked the correct answer is c, because preserving the petition table and data following it is what was asked. Executing the command in answer b would overwrite the MBR, petition table and date that followed.
C is correct. B is not.
If zeroed first 512 bytes, bootloader is overwrited and partition table as well.
If zeroed first 440 bytes, bootloader is overwrited and partition table is not overwritted.
http://www.linfo.org/mbr.html