nerdexam
Linux_Foundation

LFCS · Question #826

Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it?

The correct answer is C. dd if=/dev/zero of=/dev/sda bs=440 count=1. The dd command can overwrite the bootloader located in the Master Boot Record (MBR) on /dev/sda without affecting the partition table or subsequent data by precisely targeting the first 440 bytes.

Submitted by takeshi77· Apr 18, 2026Storage Management

Question

Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it?

Options

  • Add if=/dev/zero of=/dev/sda bs=512
  • Bdd if=/dev/zero of=/dev/sda bs=512 count=1
  • Cdd if=/dev/zero of=/dev/sda bs=440 count=1
  • Ddd if=/dev/zero of=/dev/sda bs=440

How the community answered

(28 responses)
  • A
    14% (4)
  • B
    7% (2)
  • C
    75% (21)
  • D
    4% (1)

Why each option

The `dd` command can overwrite the bootloader located in the Master Boot Record (MBR) on `/dev/sda` without affecting the partition table or subsequent data by precisely targeting the first 440 bytes.

Add if=/dev/zero of=/dev/sda bs=512

`dd if=/dev/zero of=/dev/sda bs=512` without a `count` will overwrite the entire `/dev/sda` with zeros, including the partition table and all data.

Bdd if=/dev/zero of=/dev/sda bs=512 count=1

`dd if=/dev/zero of=/dev/sda bs=512 count=1` overwrites the entire 512-byte MBR, including both the bootloader and the partition table, which is not desired.

Cdd if=/dev/zero of=/dev/sda bs=440 count=1Correct

The MBR contains the bootloader code (first 440 bytes) and the partition table (next 64 bytes). Using `dd if=/dev/zero of=/dev/sda bs=440 count=1` writes 440 bytes of zeros from `if=/dev/zero` to the beginning of `/dev/sda`, effectively wiping only the bootloader code while preserving the partition table and other data.

Ddd if=/dev/zero of=/dev/sda bs=440

`dd if=/dev/zero of=/dev/sda bs=440` without a `count` will continuously write 440-byte blocks of zeros until the input stream (`/dev/zero`) is exhausted or interrupted, effectively overwriting the entire disk.

Concept tested: MBR bootloader overwrite with dd

Source: https://man7.org/linux/man-pages/man1/dd.1.html

Topics

#dd command#bootloader#MBR structure#disk management

Community Discussion

No community discussion yet for this question.

Full LFCS Practice