On Friday 18 May 2007 10:29, Mick wrote:

> On Thursday 17 May 2007 23:27, Etaoin Shrdlu wrote:
> > IIRC, that is not the right syntax for mounting a loopback
> > filesystem. If /tmp/r1 is the file containing the filesystem, try
> >
> > mount -o loop /tmp/r1 /mnt/somewhere
> >
> > and make sure you have support for loopback devices in your kernel.
>
> Thanks for all the suggestions.  I tried the correct mount loopback
> command on /dev/loop2 and I'm getting this error that mentions
> /dev/loop0 (how does this work?):
> ======================================
> # mount -t vfat -o loop /dev/loop2 /tmp/r1
> mount: wrong fs type, bad option, bad superblock on /dev/loop0,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
> ======================================

You still seem to be missing the correct syntax. (note: this might not 
solve your problem, and even issuing the right command might be of no 
help, but since you asked for it, here it is).

With every mount command, you have to specify at least two things: *what* 
to mount, and *where* to mount it, in this order. *Where* is usually a 
path to some (preferably empty) directory. *what* can be various things, 
depending on what you're trying to mount. For regular disk partitions, 
it's usually a device file (eg, /dev/sda1). For NFS, it's a string of 
the form remote_host:/remote/path. For loopback filesystems (ie, 
filesystems contained in a single file), it's the name of the container 
file, like your /tmp/r1. When mounting loopback filesystems, the "-o 
loop" option must be given. The "-o loop" option accepts some optional 
parameters. One of these is the specification of the loopback device 
that should be used.
To explicitly specify a loopback device, use "-o loop=/dev/loopX". If no 
loopback device is specificed, then mount will automatically pick an 
unused loopback device (probably /dev/loop0). Your command 

# mount -t vfat -o loop /dev/loop2 /tmp/r1

uses an incorrect syntax for the specification of the loopback device 
(which is optional anyway), and does not tell where to mount the 
filesystem. So, what you probably want is

# mount -t vfat -o loop=/dev/loop2 /tmp/r1 /mnt/somewhere

or just simply

# mount -t vfat -o loop /tmp/r1 /mnt/somewhere
-- 
[EMAIL PROTECTED] mailing list

Reply via email to