maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Clean way to e2fsck /home? (https://talk.maemo.org/showthread.php?t=50428)

nightfire 2010-04-19 04:44

Clean way to e2fsck /home?
 
Hey everyone,

Has anyone figured out a clean way to e2fsck the /home filesystem? I noticed in my kernel log that it mounted with errors, but it never runs e2fsck on bootup.

For now I suspended maemo-launcher (kill -STOP) and killed all the subprocesses, as well as the thumbnailer daemon, and anything else that looked like it may write. However, if you kill anything dsme related, it seems to trigger a watchdog that immediately reboots.

I couldn't remount r/o at that point, but it seemed all I/O was quiescent. After a sync, I fsck'd with /home mounted r/w (yeah, yeah, I know .. that's why I'm asking the question! :)). Quick reboot -f, and everything seems fine now; filesystem is not in error.

There must be a cleaner way to do this.

dbrodie 2010-04-19 05:25

Re: Clean way to e2fsck /home?
 
I haven't tried it, but how about adding an init script to do it for you, and remove it when your done?

nightfire 2010-04-19 06:34

Re: Clean way to e2fsck /home?
 
I suppose it could be done, but I'm wary of inserting anything into the boot process; one mistake and it's time for a reflash. There's no way to see the console at the moment, which is quite annoying.

lma 2010-04-19 08:33

Re: Clean way to e2fsck /home?
 
Maybe remount it read-only, run e2fsck on it and reboot immediately?

nightfire 2010-04-19 14:48

Re: Clean way to e2fsck /home?
 
Yeah, but in order to do that you have to kill all processes that have files open in rw mode. One of these processes seem to be monitored by a watchdog that reboots the host.

stlpaul 2010-04-19 15:42

Re: Clean way to e2fsck /home?
 
In some linux you can create the file "forcefsck" in the root of your partition and it will force fsck on the next reboot. For example "sudo touch /home/forcefsck"

I haven't tried it on N900 so I don't know if it will work. Let us know :)

nightfire 2010-04-19 17:14

Re: Clean way to e2fsck /home?
 
Interesting .. didn't know that. :)

Well, I searched through /etc and /sbin for any mention of forcefsck and found nothing, so I'm guessing that's a no-go. Good idea, though.

titan 2010-04-19 18:36

Re: Clean way to e2fsck /home?
 
Quote:

Originally Posted by nightfire (Post 617769)
Yeah, but in order to do that you have to kill all processes that have files open in rw mode. One of these processes seem to be monitored by a watchdog that reboots the host.

at startup script for that is the way to go.
the first step could be move the script out of event.d/ so that it runs only once.

It would be nice to have such a script installed permanently
(fsck only runs when it is necessary) and let it change the LED while fscking so that you know what its doing.

an alternative is to temporarily disable mounting /home in event.d/rcS-late.
it creates a new /home in rootfs and you can fsck the home partition from there.
then rm -rf /home and reboot.

nightfire 2010-04-19 19:24

Re: Clean way to e2fsck /home?
 
Well when I get a chance I guess I'll write something that can execute on bootup and see if I can get it into the repository. Sure would be nice to have a real console instead of that silent boot. :/

qwerty12 2010-04-19 19:26

Re: Clean way to e2fsck /home?
 
What program, exactly, causes your N900 to reboot when you kill it? Try stopping it with "dsmetool -k".


All times are GMT. The time now is 17:20.

vBulletin® Version 3.8.8