LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to run system file checker on ubuntu 10.10 without damaging the system (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-run-system-file-checker-on-ubuntu-10-10-without-damaging-the-system-874033/)

mansour 04-09-2011 05:08 PM

How to run system file checker on ubuntu 10.10 without damaging the system
 
Hello:


I am getting occasional errors during the boot process.
One at the beginning and one or two when I switch to single user mode.I 'd like to run the system file checker to fix any possible errors.But when I run fsck in the terminal I get the message:

Code:


mansour@ubuntu-notebook:~$ fsck
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sda5 is mounted. 

WARNING!!!  The filesystem is mounted.  If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.

Do you really want to continue (y/n)?


mansour

AlucardZero 04-09-2011 05:17 PM

touch /forcefsck
reboot

serafean 04-09-2011 05:19 PM

Hi, there are three methods :
  • Create a file called forcefsck in the base of the root partition. "touch /forcefsck" should o the trick.
  • Pass the -F option to the shutdown program. "shutdown -rF"
  • Boot a livecd, an run fsck on the right partition from there (quite a hassle to do)
All commands are to be run from command line. Choose which suits you :)

As to the root of your problem : what errors?

Serafean

mansour 04-09-2011 05:46 PM

Quote:

Originally Posted by serafean (Post 4319457)
Hi, there are three methods :
  • Create a file called forcefsck in the base of the root partition. "touch /forcefsck" should o the trick.
  • Pass the -F option to the shutdown program. "shutdown -rF"
  • Boot a livecd, an run fsck on the right partition from there (quite a hassle to do)
All commands are to be run from command line. Choose which suits you :)

As to the root of your problem : what errors?

Serafean



Hello:



I ran the first option as mentioned by previous poster.
touch /forcefsck
reboot



but I am still getting an error at the beginning of my boot process.
It goes very fast and I can't write it down for that reason.


mansour

AlucardZero 04-09-2011 07:37 PM

Is it in the output of "dmesg" after you boot?

mansour 04-09-2011 07:59 PM

Quote:

Originally Posted by AlucardZero (Post 4319543)
Is it in the output of "dmesg" after you boot?

Hi:


I am not sure it is something like this:


XXXXXXX Asus notebook failing to call WCP..

It goes very fast I can't see what is it?


mansour

AlucardZero 04-09-2011 08:07 PM

Is the error message in the output of "dmesg" or the contents of /var/log/syslog after you boot?

markush 04-09-2011 08:14 PM

Depending on the time in the bootprocess when the message comes up, you may look into the /var/log/messages file if you can find it there.

try
Code:

grep -i wcp /var/log/messages
but if the message comes at the very beginning of the bootprocess you'll not find it in the logfile since the logging starts in the moment when the rootfilesystem is mounted.

Markus

mansour 04-09-2011 09:36 PM

Quote:

Originally Posted by AlucardZero (Post 4319563)
Is the error message in the output of "dmesg" or the contents of /var/log/syslog after you boot?


I am not sure, it is the second message at the boot process.


mansour

mansour 04-09-2011 09:38 PM

Quote:

Originally Posted by markush (Post 4319566)
Depending on the time in the bootprocess when the message comes up, you may look into the /var/log/messages file if you can find it there.

try
Code:

grep -i wcp /var/log/messages
but if the message comes at the very beginning of the bootprocess you'll not find it in the logfile since the logging starts in the moment when the rootfilesystem is mounted.

Markus


Code:


mansour@ubuntu-notebook:~$ grep -i wcp /var/log/messages
mansour@ubuntu-notebook:~$

The message comes at the very beginning of the bootprocess.


mansour

AlucardZero 04-10-2011 12:41 AM

Quote:

Originally Posted by mansour (Post 4319589)
I am not sure, it is the second message at the boot process.

Well did you look???

And on Ubuntu it's /var/log/syslog, like I've been saying. messages has a lot less than on RHEL-based distros.

We can't be much help without the exact error message.

markush 04-10-2011 03:58 AM

Quote:

Originally Posted by mansour (Post 4319593)
The message comes at the very beginning of the bootprocess.

mansour

well, then you will not find the message in the logs.

Markus

tommcd 04-10-2011 05:41 AM

Quote:

Originally Posted by mansour (Post 4319557)
I am getting occasional errors during the boot process. ...
I am not sure it is something like this:
XXXXXXX Asus notebook failing to call WCP..

Are you having any problems with the computer or the operating system?
Many errors that are displayed during boot are harmless. If it is not causing you any problems then it is likely safie to ignore these error messages.

mansour 04-10-2011 12:04 PM

Quote:

Originally Posted by AlucardZero (Post 4319655)
Well did you look???

And on Ubuntu it's /var/log/syslog, like I've been saying. messages has a lot less than on RHEL-based distros.

We can't be much help without the exact error message.

Hi AlucardZero:


When you say the output of "dmesg", where would I find that output exactly?
Or should I run dmesg in command line? It is the second message that I see at the beginning of boot process.


The /var/log/syslog is a huge amount of data, I am trying to see how I could post some of it here. But has to be relevant content to our discussion here, or just would be unacceptable to the forum to post all that here.



mansour

jmc1987 04-10-2011 12:07 PM

Quote:

Originally Posted by serafean (Post 4319457)
Hi, there are three methods :
  • Pass the -F option to the shutdown program. "shutdown
Serafean

The -F option don't work on Ubuntu for some reason. Devs didnt like it I guess lol. The best way IMO is to touch /forcecheck


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