Link to home
Start Free TrialLog in
Avatar of chunkyshu
chunkyshuFlag for United States of America

asked on

Running FSCK in single-user mode

I have a FC3 system that is giving me disk errors. I'm new to linux and I know I need to run FSCK. I tried to do this by SSH'ing in, but then got the error that if I don't run FSCK in single-user mode I could corrupt the disk and/or files. So my question is, how do I start the system in runlevel1 ~ i.e. single-user mode.
I know that currently I'm using runlevel 5 (with the gui) how do I switch to single-user mode so I can run FSCK and repair any errors that there may be.
Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of wnross
wnross

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Might be easier to do it from the consol instead of via ssh as in run mode 1, (init 1), you may find that ssh will not run (or at least is a lot of hassle to get running!) Also, if you need to run fsck on the partition that contains the operating system, you need to unmount the partition before you can carry out the fsck process.

To that end, I will normally boot from CD1 and usse rescue mode, or you could run a 'live distro' such as Knoppix and type:

single

at the linux: prompt. This will boot the live distro in single mode from which you can run fsck on the unmounted discs that you need to check/repair.

HTH:)

Avatar of chunkyshu

ASKER

This worked perfectly... thanks for the help.

My disk showed now errors after running FSCK. Is there anything else I can try to check for "bad" things happening on the system?

Again, Thanks!
Avatar of wnross
wnross

fsck -f does a more thorough check than the boot fsck does, so you've got the filesystem checked

Check dmesg and /var/log/messages for
- IDE errors, DMA timeouts, etc.   (Check for bad cables)
- paging errors (bad ram)

check netstat -antp | more
start looking for ports open that you are not aware of, in particular if you see some ports without processes check pmap_dump and match up your extra ports with this list.

add to hosts.deny
sshd : all
add to hosts.allow
sshd: 192.168.100.2 [dont do this, use YOUR ip address]

check by using ssh before closing your connection or you won't get back in if you make a mistake

Cheers,
-Bill