91.1k views
2 votes
Which statement is used to see the contents of the MBR?

Option 1: dd if=/dev/hda bs=16065b | netcat targethost-IP 1234
Option 2: dd if=/dev/hda of= bs=512 count=1
Option 3: dd if=/dev/fd0 of=/home/sam/ conv=notrunc
Option 4: None of the above

User InfZero
by
8.1k points

1 Answer

1 vote

Final answer:

Option 2 is the correct command to see the contents of the MBR: 'dd if=/dev/hda of=mbr_backup bs=512 count=1'. This command reads the first 512 bytes from the specified device and outputs them to a specified file, which can then be viewed.

Step-by-step explanation:

The command used to see the contents of the Master Boot Record (MBR) should copy the first 512 bytes from the device representing the disk containing the MBR. The correct statement for this purpose is the following:

Option 2: dd if=/dev/hda of=mbr_backup bs=512 count=1

This dd command is used to duplicate a block of data, ('if' stands for input file, 'of' for output file, 'bs' for byte size, and 'count' for the number of blocks). To view the MBR, the command should output these bytes in a readable format, such as hexdump or simply redirect to a file as shown in Option 2. The other options provided either involve unnecessary network functionality (Option 1) or copying the contents of a floppy disk (Option 3).

User Themis Pyrgiotis
by
8.6k points