3

After associating a disk image with the dev/loop0 device I can't mount the file system in /dev/loop0p1

root@reading2 Documents]# fdisk -l /dev/loop0

Disk /dev/loop0: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start         End      Blocks   Id  System
  /dev/loop0p1   *        8192    62333951    31162880    c  W95 FAT32 (LBA)
[root@reading2 Documents]# ls -l /mnt
total 0
[root@reading2 Documents]# mount -t vfat /dev/loop1 /mnt
mount: block device /dev/loop1 is write-protected, mounting read-only
mount: /dev/loop1: can't read superblock
[root@reading2 Documents]#

What am I doing wrong?

Thanks in advance

1 Answer 1

4

You have a typo in your mount command.

You mounted a disk image to a loopback device at /dev/loop0, and its partition then became /dev/loop0p1.

Therefore, to mount it, you would use something like:

mount -o ro -t vfat /dev/loop0p1 /mnt

However, you typed in /dev/loop1 in the mount command instead.

1
  • This is a disk image that was presented to the system with the following command: losetup /dev/loop0 cam.img Trying your suggestion I get the following: [root@reading2 Documents]# mount -o ro -t vfat /dev/loop0p1 /mnt mount: special device /dev/loop0p1 does not exist [root@reading2 Documents]#
    – dan
    Sep 22, 2012 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.