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.
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)- A5% (1)
- C89% (17)
- D5% (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.
-loop is not a valid mount flag; the correct syntax requires -o loop to pass loop as a mount option.
Omitting the loop option causes mount to fail because it cannot attach a plain file as a block device without the loop device mechanism.
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.
This command omits the mount point entirely, which is required syntax; mount cannot determine where to attach the filesystem.
-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
Community Discussion
No community discussion yet for this question.