LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   help with FSCK (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-fsck-618787/)

laucian 02-05-2008 05:15 AM

help with FSCK
 
hi there,
i am having an usual newbie problem and just don`t understand the man page..i am trying to make a disk check, actually scandisk that we know on windows. i read fsck would do the same on linux..but i just can not get how to? as i said, i just don`t understand the man page

mount the drive? dev hda? which parameters?
i hope someone might help..thanks a lot

Zmyrgel 02-05-2008 05:50 AM

Do the following:
Code:

umount /dev/hda1
fsck -y /dev/hda1
mount /dev/hda1

This should check the first partition and automatically repair errors.
You might not be able to check all partitions on a running system but you can boot into a single-user mode and then check the partitions as shown above.

laucian 02-05-2008 07:20 AM

thanks for your reply,

for the sake of the forums, i am giving a feedback here
**
to check which partitions i have, i used the command

Code:

fdisk -l
just as you said, i have unmounted the drive,fsck'd it and again mounted the drive but it was only possible for hda3. for the other i switched to single-user mode. I am using Suse, the command was (is it linux standart?)

Code:

init 1
for the newbies who would wanna know, numbers are runlevels, if you want to go back to KDE type init 5, init 6 would restart. who -r gives the current running level.

Anyway on runlevel 1 i have repeatet the same above and it has fixed my problem..again thanks a lot.

onebuck 02-05-2008 08:54 AM

Hi,

For system maintenance with a check and repair for a Linux file system I like to always pass the single command on a re-boot. I have a stanza in my 'lilo.conf' for just that. You will be certain not to have any problems with repair in a single user mode.

A new user should 'man fsck' to understand the command.


All times are GMT -5. The time now is 11:51 AM.