* Re: [gentoo-user] Corrupt USB pen drive
@ 2007-05-18 9:24 99% ` Etaoin Shrdlu
0 siblings, 0 replies; 1+ results
From: Etaoin Shrdlu @ 2007-05-18 9:24 UTC (permalink / raw
To: gentoo-user
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
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2007-05-17 11:36 [gentoo-user] Corrupt USB pen drive Mick
2007-05-17 22:27 ` Etaoin Shrdlu
2007-05-18 8:29 ` Mick
2007-05-18 9:24 99% ` Etaoin Shrdlu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox