Moot Mount query

Place to discuss Slackware
Post Reply
User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Moot Mount query

Post by Calum » Tue Apr 08, 2003 10:01 am

i have been having a problem with mounting floppies and zips, basically, they mount as type msdos, meaning the filenames get truncated to 8.3 format irritatingly. i fixed this by specifying 'vfat' instead of 'auto' in my fstab. this annoys me because i have ext2 and hfs disks too which i will need to manually edit the fstab to mount, or which i will need to su to root to mount properly (by actually typing the entire command!!!!!11one). well i was going to come on here and say does anybody know what to do, when i had a whim to try the online man pages available from the front page here, well guess what?
-t vfstype
The argument following the -t is used to indicate the file sys-
tem type. The file system types which are currently supported
are: adfs, affs, autofs, coda, coherent, cramfs, devpts, efs,
ext, ext2, ext3, hfs, hpfs, iso9660, jfs, minix, msdos, ncpfs,
nfs, ntfs, proc, qnx4, reiserfs, romfs, smbfs, sysv, tmpfs, udf,
ufs, umsdos, vfat, xenix, xfs, xiafs. Note that coherent, sysv
and xenix are equivalent and that xenix and coherent will be
removed at some point in the future -- use sysv instead. Since
kernel version 2.1.21 the types ext and xiafs do not exist any-
more.

For most types all the mount program has to do is issue a simple
mount(2) system call, and no detailed knowledge of the filesys-
tem type is required. For a few types however (like nfs, smbfs,
ncpfs) ad hoc code is necessary. The nfs ad hoc code is built
in, but smbfs and ncpfs have a separate mount program. In order
to make it possible to treat all types in a uniform way, mount
will execute the program /sbin/mount.TYPE (if that exists) when
called with type TYPE. Since various versions of the smbmount
program have different calling conventions, /sbin/mount.smb may
have to be a shell script that sets up the desired call.

The type iso9660 is the default. If no -t option is given, or
if the auto type is specified, the superblock is probed for the
filesystem type (adfs, bfs, cramfs, ext, ext2, ext3, hfs, hpfs,
iso9660, jfs, minix, ntfs, qnx4, reiserfs, romfs, udf, ufs,
vxfs, xfs, xiafs are supported). If this probe fails, mount
will try to read the file /etc/filesystems, or, if that does not
exist, /proc/filesystems. All of the filesystem types listed
there will be tried, except for those that are labeled "nodev"
(e.g., devpts, proc and nfs). If /etc/filesystems ends in a
line with a single * only, mount will read /proc/filesystems
afterwards.

The auto type may be useful for user-mounted floppies. Creating
a file /etc/filesystems can be useful to change the probe order
(e.g., to try vfat before msdos) or if you use a kernel module
autoloader. Warning: the probing uses a heuristic (the presence
of appropriate `magic'), and could recognize the wrong filesys-
tem type, possibly with catastrophic consequences. If your data
is valuable, don't ask mount to guess.

More than one type may be specified in a comma separated list.
The list of file system types can be prefixed with no to specify
the file system types on which no action should be taken. (This
can be meaningful with the -a option.)

For example, the command:
mount -a -t nomsdos,ext
mounts all file systems except those of type msdos and ext.
so all i need to do is edit /etc/filesystems to get it to check for vfat before checking for msdos. now i just need to get round to setting that autofs thing up and i'm laughing...

as an aside, void main, does that phpman thing interact with the actual man command on the host machine, or is it static man pages in files that get called up as required, or what is it?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Apr 08, 2003 10:55 am

Shhhhh, don't give away my secret and let people know there are man pages. :) It's actually quite amazing how much information is available on every Linux system and people don't realize that quite often they can get far better information and much faster just by looking at the documentation included on their system. The problem usually for newer people is figuring out exactly what they want information on. But you can search for key words etc that give you a general list of things, eventually you get to where you know specifically what you want information on.

Yes, phpMan just uses the tools that you use on the command line. It get's it's documentation from the man pages that are installed on the system. Which means that it's somewhat limited because I don't have a lot of stuff installed on that web server so there would be a lot of man pages missing. You can actually view the source code by clicking the link at the bottom of the page. If you look at the source you can just read the comments of which here is a snippet:
/**
* phpMan is a web interface of Unix command 'man', 'perldoc', 'info' and 'apropos'.
* This script makes it easier to read man pages which is lengthy and require you
* to use 'more' or 'pg' filters. Just try it if you feel hard to remember the command
* for page back or need to dump man page into text/html format.
* Tested on Linux and FreeBSD under php 4.x above.
If you like viewing your man pages as web pages rather than using command line tools you can grab a copy of phpMan.php off the net. It's a tiny little script as you can see by viewing the source on my site. I would suggest not using the copy on my machine though because I made a few slight hacks to it. I actually prefer looking up the information right from a shell prompt personally. I put the web version up for others to use.

Back to the subject, I don't even have "msdos" in my /etc/filesystems:

Code: Select all

ext3
ext2
nodev proc
nodev devpts
iso9660
vfat
hfs
And it makes sense because vfat can handle both FAT16 and FAT32 file systems. That's a default Red Hat 9 /etc/filesystems BTW (by default I mean I haven't messed with it).

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Tue Apr 08, 2003 4:51 pm

well, thanks for that! i think i will probably get phpman then, can't remember if i installed php on here actually, i will find out. i like the idea of hyperlinks in man pages.

i found that in slack 9 there is no /etc/filesystems by default, but there's a /proc/filesystems so i opened that and resaved it as /etc/filesystems, and then i had to move msdos and umsdos to lines after vfat because all the filesystem types were in alphabetical order! (doh!) but then i never thought that the vfat type would cover msdos as well (doubledoh!) ah well. all sorted now.

also, now i think about it, phpman would be a really good thing for "newbie" distros to include as standard on a little toolbar button next to the "control center" buttons you invariably see (and which are quite happy living secreted in the start menu if you ask me) so they can see hyperlinked man pages. it makes them much easier to read if, as you say, you don't know what you're actually looking for. plus, it gives you a better showing of what you can read about.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Apr 08, 2003 5:01 pm

There are sooo many ways to view your documentation, most of which I don't even know. A neat way to view man pages in KDE is either at the run box (ALT+F2) or in the Konqueror URL box type "#manpage". For instance "#mount" brings up the mount man pages. In fact in Konqueror on my system it first comes up and says there are two different man pages for mount and lets you select which one you want, and it's hyperlinked as well, and it's actually much prettier than phpMan. In Gnome you can run "gman" from a run box (also ALT+F2) or at a shell prompt. But I still usually just do a "man mount" from a bash shell. :)

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Wed Apr 09, 2003 3:49 am

i never knew either of those, thanks. i knew about 'xman' which seems to be a non-desktop-specific manpage viewer but i don't like it, and prefer using the bash prompt.

Post Reply