LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Repaired FileSystem ? (https://www.linuxquestions.org/questions/linux-newbie-8/repaired-filesystem-609440/)

bartsimpson 12-27-2007 01:09 PM

Repaired FileSystem ?
 
Hi

computer shutdown improperly and when i start up, linux go through all the check and after the check there is an error occured:

i enter the password for maintence and after that i got this msg" Repaired Filesystem" #


which command should i enter?. i already try "y' bash command not found, and "yes" show all black screem"

Thanks

p.s. redhat linux

kilgoretrout 12-27-2007 01:35 PM

Which filesystem are you using, eg ext3, reiserfs, xfs, ect? You generally need to run some version of "fsck" depending on which filesystem you are using.

bartsimpson 12-27-2007 02:36 PM

Quote:

Originally Posted by kilgoretrout (Post 3003135)
Which filesystem are you using, eg ext3, reiserfs, xfs, ect? You generally need to run some version of "fsck" depending on which filesystem you are using.

I think its fsck

onebuck 12-27-2007 04:05 PM

Hi,

Quote:

Originally Posted by bartsimpson (Post 3003183)
I think its fsck

fsck is a utility command that is used to check & repair a filesystem;

Quote:

excerpt from 'man fsck'

FSCK(8) FSCK(8)

NAME
fsck - check and repair a Linux file system

SYNOPSIS
fsck [ -sAVRTNP ] [ -C [ fd ] ] [ -t fstype ] [filesys ... ] [--] [ fs-
specific-options ]

DESCRIPTION
fsck is used to check and optionally repair one or more Linux file sys-
tems. filesys can be a device name (e.g. /dev/hdc1, /dev/sdb2), a
mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier
(e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Nor-
mally, the fsck program will try to handle filesystems on different
physical disk drives in parallel to reduce the total amount of time
needed to check all of the filesystems.

If no filesystems are specified on the command line, and the -A option
is not specified, fsck will default to checking filesystems in
/etc/fstab serially. This is equivalent to the -As options.

You can aways 'man' a command to get the full understanding of the command. We are asking what filesystem you formated your system partition(s)? ext2/3, reiserfs, xfs or whatever.

The maintenance should be performed in single user mode.

bartsimpson 12-28-2007 09:41 AM

Thanks for replied

I am new to linux. is there anyway i can skip the check during start up? i have to go through the check because the computer shutdown not propery. Everytme when i start up the system is goes through all the check and there is a "FAIL" step at the end.

After its "fail" ask me to enter root password to mantaience check after i enter the password and there is msg"repaired filesystem" i enter "y" is said "bash command is not found" is there a command to repaired?

or can i skip this check?


Thanks advance

onebuck 12-28-2007 11:58 AM

Hi,

Quote:

Originally Posted by bartsimpson (Post 3003896)
Thanks for replied

I am new to linux. is there anyway i can skip the check during start up? i have to go through the check because the computer shutdown not propery. Everytme when i start up the system is goes through all the check and there is a "FAIL" step at the end.

After its "fail" ask me to enter root password to mantaience check after i enter the password and there is msg"repaired filesystem" i enter "y" is said "bash command is not found" is there a command to repaired?

or can i skip this check?


Thanks advance

You really need to get this repaired! You can pass the 'single' parameter to the kernel at the boot prompt. This way you will be able to repair the file system with 'fsck'.

YOU still haven't mentioned or posted what file system you are using. When you created or installed your distribution (?? which one) the file system (which one ??) was created.

bartsimpson 12-28-2007 12:52 PM

Hi

Sorry for my stupiq question :) How do i know which file system? i am new to linux and i am not the one who installed.

onebuck 12-28-2007 01:52 PM

Hi,

Quote:

Originally Posted by bartsimpson (Post 3004042)
Hi

Sorry for my stupiq question :) How do i know which file system? i am new to linux and i am not the one who installed.

No such thing as a stupid question!

You can see what file systems are on your system by looking at the '/etc/fstab' file;

Quote:

:~# cat /etc/fstab
/dev/hda2 swap swap defaults 0 0
/dev/hda3 / ext3 defaults 1 1
/dev/hda5 /home ext3 defaults 1 2
/dev/hda6 /usr ext3 defaults 1 2
/dev/hda7 /var ext3 defaults 1 2
/dev/hda8 /tmp ext3 defaults 1 2
/dev/hda9 /arc1 ext3 defaults 1 2
/dev/hda10 /arc2 ext3 defaults 1 2
/dev/hda11 /arc3 ext3 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

The above is an example of a '/etc/fstab'. The third column of the above shows the type.

Quote:

excerpt from 'man fstab'
FSTAB(5) Linux Programmer's Manual FSTAB(5)

NAME
fstab - static information about the filesystems

SYNOPSIS
#include <fstab.h>

DESCRIPTION
The file fstab contains descriptive information about the various file
systems. fstab is only read by programs, and not written; it is the
duty of the system administrator to properly create and maintain this
file. Each filesystem is described on a separate line; fields on each
line are separated by tabs or spaces. Lines starting with '#' are com-
ments. The order of records in fstab is important because fsck(8),
mount(8), and umount(8) sequentially iterate through fstab doing their
thing.

The first field, (fs_spec), describes the block special device or
remote filesystem to be mounted.

For ordinary mounts it will hold (a link to) a block special device
node (as created by mknod(8)) for the device to be mounted, like
`/dev/cdrom' or `/dev/sdb7'. For NFS mounts one will have one will have
<host>:<dir>, e.g., `knuth.aeb.nl:/'. For procfs, use `proc'.

Instead of giving the device explicitly, one may indicate the (ext2 or
xfs) filesystem that is to be mounted by its UUID or volume label (cf.
e2label(8) or xfs_admin(8)), writing LABEL=<label> or UUID=<uuid>,
e.g., `LABEL=Boot' or `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.
This will make the system more robust: adding or removing a SCSI disk
changes the disk device name but not the filesystem volume label.

The second field, (fs_file), describes the mount point for the filesys-
tem. For swap partitions, this field should be specified as `none'. If
the name of the mount point contains spaces these can be escaped as
`\040'.

The third field, (fs_vfstype), describes the type of the filesystem.
Linux supports lots of filesystem types, such as adfs, affs, autofs,
coda, coherent, cramfs, devpts, efs, ext2, ext3, hfs, hpfs, iso9660,
jfs, minix, msdos, ncpfs, nfs, ntfs, proc, qnx4, reiserfs, romfs,
smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix, xfs, and possibly
others. For more details, see mount(8). For the filesystems currently
supported by the running kernel, see /proc/filesystems. An entry swap
denotes a file or partition to be used for swapping, cf. swapon(8). An
entry ignore causes the line to be ignored. This is useful to show
You should 'man fstab' to get a full understanding of the use for the '/etc/fstab'. 'man' is your friend!

bartsimpson 12-28-2007 02:54 PM

How can i do that? i am not able login to the desktop "terminal" After the check asking me to repaired or control "d" which is reboot

onebuck 12-28-2007 08:14 PM

Hi,
Quote:

Originally Posted by bartsimpson (Post 3004135)
How can i do that? i am not able login to the desktop "terminal" After the check asking me to repaired or control "d" which is reboot

The easiest way would be to use the install cd to boot the system as if you were going to install.

After you get to the login then from the cli (command line);

Code:

~#mkdir /slacktemp                  #temporary mount point
~#mount /dev/your_device /slacktemp  #this is the device you installed to
~#cat /etc/fstab |most              #this will display fstab

BTW, you should start searching LQ or google for some of these type(s) of questions since they have been answered before.


All times are GMT -5. The time now is 11:58 PM.