nerdexam
CompTIA

LX0-103 · Question #30

What command is used to mount a floppy disk image under /mnt/floppy?

The correct answer is C. mount -o loop root.img /mnt/floppy. Mounting a disk image file requires the -o loop option to associate the image with a loop device, allowing the kernel to treat the file as a block device.

Devices, Linux Filesystems, Filesystem Hierarchy Standard

Question

What command is used to mount a floppy disk image under /mnt/floppy?

Options

  • Amount -loop root.img /mnt/floppy
  • Bmount root.img /mnt/floppy
  • Cmount -o loop root.img /mnt/floppy
  • Dmount root.img
  • Emount -l root.img /mnt/floppy

How the community answered

(19 responses)
  • A
    5% (1)
  • C
    89% (17)
  • D
    5% (1)

Why each option

Mounting a disk image file requires the -o loop option to associate the image with a loop device, allowing the kernel to treat the file as a block device.

Amount -loop root.img /mnt/floppy

-loop is not a valid mount flag; the correct syntax requires -o loop to pass loop as a mount option.

Bmount root.img /mnt/floppy

Omitting the loop option causes mount to fail because it cannot attach a plain file as a block device without the loop device mechanism.

Cmount -o loop root.img /mnt/floppyCorrect

The -o loop option instructs mount to use a loop device, which maps a regular file (such as root.img) to a virtual block device so the filesystem inside it can be mounted at /mnt/floppy. Without this option, mount cannot interpret a flat image file as a mountable block device.

Dmount root.img

This command omits the mount point entirely, which is required syntax; mount cannot determine where to attach the filesystem.

Emount -l root.img /mnt/floppy

-l is a flag used to list currently mounted filesystems with their labels, not to enable loop device mounting.

Concept tested: Mounting disk image files with loop device

Source: https://man7.org/linux/man-pages/man8/mount.8.html

Topics

#mount command#loop device#disk image#mount options

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice