LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   /home dir. wont mount after system crash. I have to run fsck to mount it again. why? (https://www.linuxquestions.org/questions/linux-desktop-74/home-dir-wont-mount-after-system-crash-i-have-to-run-fsck-to-mount-it-again-why-823990/)

druonysus 08-03-2010 08:48 PM

/home dir. wont mount after system crash. I have to run fsck to mount it again. why?
 
I am using openSUSE 11.3 (upgraded from 11.2) and have upgraded KDE to KDE 4.5 "--from" SUSE's KDE Core & KDE Extras repo's. Recently I have run into an issue... I don't know if it has any thing to do with KDE but sometimes (randomly) while I am just doing average things on my computer, the system will freeze. Upon reboot, it says that my home directory does not exist and wont log into my account (i have separate "/", "/boot", and "/home" partitions). So I boot from a SUSE-LiveCD and try to mount my home partition. The system wont let me mount /dev/sda3 (my home partition) unless I run "fsck /dev/sda3" first. After running fsck it says that my file-system is clean. then when I reboot my system it will mount fine and work great until it all happens again. It could be hours or day... maybe someone can tell me why this is happening and how I can fix it. If not maybe someone can tell me where on my system I can edit a script to tell my system to just run fsck on /dev/sda3 before the system mounts it... as at least if my system freezes it will reboot without me having to manually go in and run fsck. PLEASE HELP! THANKS.

lartman 08-03-2010 09:31 PM

put this in /etc/rc.local
Code:

touch /forcefsck
and in one of the shutdown scripts put
Code:

rm /forcefsck
/forcefsck causes the system to do fsck as it boots. By touching this file at startup and removing it at orderly shutdown, the system will automatically fsck after a crash.

druonysus 08-04-2010 03:48 AM

Quote:

Originally Posted by lartman (Post 4054879)
put this in /etc/rc.local
Code:

touch /forcefsck
and in one of the shutdown scripts put
Code:

rm /forcefsck
/forcefsck causes the system to do fsck as it boots. By touching this file at startup and removing it at orderly shutdown, the system will automatically fsck after a crash.

well should I specify what partition? Such as "touch /forcefsck /dev/sda3"? Also I am leery about adding rm into a shutdown script.

lartman 08-04-2010 05:44 AM

No partition. /forcefsck is just an empty file which, if it exists at bootup, forces the system to run a fsck.

Bear in mind this is just a rough workaround. The fix is to sort out why the system is crashing.

puncroqr 08-04-2010 01:01 PM

after rebooting into your system after such a crash go dig for and post the last lines from /var/log/messages

druonysus 08-05-2010 08:06 PM

Quote:

Originally Posted by puncroqr (Post 4055795)
after rebooting into your system after such a crash go dig for and post the last lines from /var/log/messages

Well so far I have been unable to get my system to crash again. I really don't know why my system is crashing in the first place. As soon as it does it again I will post the the output of "cat /var/log/messages | tail"

syg00 08-05-2010 09:13 PM

Not much point deleting /forcefsck in any of the shutdown scripts. How's the restart going to find it ?.

If the machine is dying so hard that the journal isn't being run, you probably won't get any log messages either (btw, you'd need "tail", not "last").
I'd be thinking hardware problems - maybe run memtest86+ overnight. But it could be PSU, heat, ... who knows

lartman 08-06-2010 01:32 AM

Quote:

Originally Posted by syg00 (Post 4057439)
Not much point deleting /forcefsck in any of the shutdown scripts. How's the restart going to find it ?.

The point in deleting /forcefsck is that we only want to run fsck if the system crashes and doesn't do an orderly shutdown. But yeah, it's easy enough to remove it manually if you want to reboot.

syg00 08-06-2010 02:23 AM

Quote:

Originally Posted by lartman (Post 4057558)
The point in deleting /forcefsck is that we only want to run fsck if the system crashes and doesn't do an orderly shutdown.

Quite right - my mind must have been elsewhere.

druonysus 08-19-2010 05:27 AM

I have reinstalled openSUSE 11.3 (and I didn't update it to KDE 4.5) and so far I have not had my /home partition unmount after a crash. However, the computer still crashes when full-screening flash videos online (e.g. Hulu, and YouTube)... I am thinking it must be a driver issue... any idea's how to fix this?


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