On Wed, 02 Jun 2004 11:59:28 +1200
Douglas Royds <[EMAIL PROTECTED]> wrote:
> Nick Rout wrote:
>
> [snip]
>
> >sorry i just see people going off at awful tangents. I don't know why
> >anyone thought your file system was corrupt. How about just deleting the
> >offending file?
> >
> >
> No problem, Nick.
>
> [snip]
>
> >I guess it won't hurt to fsck anyway. what filesystem are you running?
> >
> >
> I'll do this anyway, as you suggest.
>
> When I ran the Mandrake rescue option, the splash screen suggested doing
> an lspart, which I did. It listed several partitions, an unknown 1G
> (which I think is some Windows trickery), the 11Gb NTFS, FAT32, the
> swap, and hda6 and hda8 (I think), both of which it declared to be ext2.
>
> I couldn't find an executable called simply "fsck". There was something
> called fsck.ext2. From the man page online, it looks like this is the
> same thing as e2fsck (perhaps it's just an alias, or a script). It
> wanted me to name a device, so I tried simply "fsck.ext2 hda6", but it
> didn't like it. I see now from the man page that I need to go e2fsck
> /dev/hda6, so I'll give this a crack next time I get a chance.
fsck is usually a wrapper - it works out what file system is on a drive
and than calls fsck.ext2, fsck.reiser, or whatever.
mount works in a similar way. it makes plugging new filesystems in a lot
easier.
so running fsck.ext2 should work
>
> BTW, when the man page says "e2fsck(8)", what does the (8) mean?
good question. the man pages are divided into "books". If you look in
/usr/share/man you will see a whole lot of directories man1 man2 man3
etc.
The book divisions are "well known" in that they are defined, but I
can't remember what the definitions are, it s subjects like "user
commands" "system commands" etc.
the 8 means its in book 8.
This can be importatnt because there might be more than one man page for
a command, there is a whole section on standatd c functions, which often
have the same names as a similar shell command
eg
[EMAIL PROTECTED] nick $ whereis mount
mount: /bin/mount /sbin/mount.smbfs /usr/man/man2/mount.2.gz /usr/man/man8/mount.8.gz
/usr/share/man/man2/mount.2.gz /usr/share/man/man8/mount.8.gz
this shows that there is a page for mount in book 8 and in book 2
man 2 mount ives you the c function viz;
MOUNT(2) Linux Programmer's Manual MOUNT(2)
NAME
mount, umount - mount and unmount filesystems
SYNOPSIS
#include <sys/mount.h>
int mount(const char *source, const char *target, const char *filesys-
temtype, unsigned long mountflags, const void *data);
int umount(const char *target);
int umount2(const char *target, int flags);
[snip]
man 8 mount gives you the shell command:
MOUNT(8) Linux Programmer's Manual MOUNT(8)
NAME
mount - mount a file system
SYNOPSIS
mount [-lhV]
mount -a [-fFnrsvw] [-t vfstype] [-O optlist]
mount [-fnrsvw] [-o options [,...]] device | dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir
DESCRIPTION
All files accessible in a Unix system are arranged in one big tree, the
file hierarchy, rooted at /. These files can be spread out over sev-
eral devices. The mount command serves to attach the file system found
on some device to the big file tree. Conversely, the umount(8) command
will detach it again.
[snip]
--
Nick Rout <[EMAIL PROTECTED]>