Page 1 of 1

Auto-fscking when improperly shutdown

Posted: Tue Jul 26, 2005 4:05 am
by Krazy
Firstly apologies to Shallax, with whom I have already annoyed with an email about this! ;)
However, I thought it was a good enough suggestion to warrant a post here allowing others to comment, and potentially so it doesn't get forgotten.

What I would like is for there to be an automatic (ie forced) fsck done when GentooX boots, fixing up any errors found. The fsck is only needed if the xbox is shutdown improperly (eg by accidentally pressing the power button). So shutting down via halt/reboot scripts etc would not cause auto-fsck to be invoked.

How would it work? The following is a wild guess:

I thought that Gentoox loader (bios?) could check for the presence of a flag/file when starting, and if so do a pass over the filesystem fixing things up, before rebooting into Gentoox proper. The loader would then set the flag for the next time. The normal reboot/halt scripts would reset this flag removing the need for a forced fsck during the next boot.

It would probably be desirable to allow this feature to be enabled or disabled during initial setup, and subsequently too.

Obviously this is not a do-in-half-an-hour feature.... so feel free to come up with better ways.

Thoughts?

Posted: Wed Jul 27, 2005 12:18 pm
by cheesyboofs
I think you'll find there are issues with running fsck under Gentoox as it doesn't suport FatX, it my be an option in a fully native environment, but Shallax isn't really interested in native installs.

Posted: Sun Jul 31, 2005 10:21 am
by orochi
im no linux guru but i dont think you can fcsk anything thats mounted, being journalized should prevent this anyway. Also, if the power button accidentaly was pressed, you would know to run sparkle anyway... right :P

Posted: Wed Aug 10, 2005 8:11 am
by Krazy
cheesyboofs said
but Shallax isn't really interested in native installs.
As to native versions, I'm not running native (perhaps in the future, but would need a bigger HD). Just a stock 'E' install. So thats not an issue for me.

orochi said
i dont think you can fcsk anything thats mounted
As to fscking mounted fileystems, they need to be read-only (under other *nixes anyway). Journalling maybe a complication, but Sparkle handles this. I've seen it replay the journal before starting...

I guess I'm suggesting that it should be sparkle doing the work automatically, by arranging to change the "default" linux to boot with from GentooX to Sparkle for just one boot.

As to the history...Why suggest the feature?

For my own selfish reasons as I run my GentooX installs headless (& controller-less)*, using ssh & sometimes VNC.
Nothing like mistakenly taking down your networking when its the only way to safely access and 'halt' your box.
The small nasty power button looms large... ;-)

*Using Sparkle manually is not really an option under these circumstances... sigh.