how can I avoid the "can't read superblock" error when mounting a FAT32 FS?

dan asked:

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

My answer:


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.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.