Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: jls on September 25, 2009, 01:35:31 AM

Title: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: jls on September 25, 2009, 01:35:31 AM
 :o
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 25, 2009, 06:27:41 AM
It is run with the 'p' flag (automatic repair, no questions asked)
Now you don't want that?
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: jls on September 25, 2009, 05:34:13 PM
on my ext2 formatted filesystems sometimes -p fails. Should I change to ext3?
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 25, 2009, 08:20:38 PM
In my opinion ext3 would be even more intense, as it wants to write a journal.
If my disk was failing, aparently, beyond repair I would look to replace it.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: jls on September 26, 2009, 03:09:45 AM
but e2fsck on my ext2 partion without any option passed, apart form the device of course, works.
So I'm suggesting to drop to the shell instead of auto reboot the machine in this case
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: curaga on September 26, 2009, 03:36:54 AM
I agree, if the file system check fails, the failure should at least be shown to the user. Perhaps wait for a keypress in a failure case. I'm not sure what can be done in a shell if a -p check fails though, so just showing the error might be enough.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: jls on September 26, 2009, 03:39:53 AM
the error is shown for a sec already.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: curaga on September 26, 2009, 03:41:47 AM
Yes, but if the user is not watching the screen, it could get missed.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: mikshaw on September 26, 2009, 05:12:06 AM
tc-config could be pretty simply made to reboot only on success of e2fsck, if that's a desired option. 

Code: [Select]
EXIT CODE
       The exit code returned by e2fsck is the sum of the following conditions:
            0    - No errors
            1    - File system errors corrected
            2    - File system errors corrected, system should
                   be rebooted
            4    - File system errors left uncorrected
            8    - Operational error
            16   - Usage or syntax error
            32   - E2fsck canceled by user request
            128  - Shared library error
Not sure if all of these apply in TC; this is from the man page.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 26, 2009, 05:45:59 AM
Alright already, I will add a pause upon non-zero result.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: mikshaw on September 26, 2009, 05:52:21 AM
Not to be an annoy, but 1 and 2 look like successful returns as well.  I don't really understand what they mean by "the sum of the following conditions", though.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: jls on September 26, 2009, 06:17:53 AM
Alright already, I will add a pause upon non-zero result.
pause means that when the user presses any button the system will be rebooted?
If yes then I don't agree, I think the system should drop into a shell to let the user redo the e2fck without the -p option
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 26, 2009, 06:30:16 AM
And a new user would know to do that with the cursor sitting at a shell prompt?
Perhaps I should re-run e2fsck without the p option? Then I will get a complaint that the user has to answer y hunderds of times.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 26, 2009, 06:34:28 AM
I will make a pause with option to go to shell. But it is a very limited shell.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: jpeters on September 26, 2009, 09:27:13 AM
I will make a pause with option to go to shell. But it is a very limited shell.
That might work; the last few times I ran as a boot option, it couldn't fix the inode problems (maybe it was some FS handle issue.)  Running e2fsck on the unmounted device fixed it without issue. (I don't know if that was because of the 'p' option).
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 26, 2009, 10:31:26 AM
On second thought, perhaps I will just drop this option all together.
It is really not needed as booting with base norestore provides a fully booted base system no drives mounted. You can then pick and choose whatever and which ever and run as many times e2fsck as desired. This option is a carry over from compressed knoppix image booting days and is really not required when the base system loads entirely into ram.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: Juanito on September 27, 2009, 12:34:44 AM
Now that you can load the *core* extensions and wm and "startx" with microcore after booting with "base norestore", it's as easy to run e2fsck as use the "checkfs" boot code.

Is there a way to invoke the boot routine to load all extensions in /tce after "base norestore" rather than "tce-load -i" one-by-one?
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 27, 2009, 12:42:36 AM
not at present. I usually type loop command at prompt to batch load.
Title: Re: checkfs boot option: if chech fails plz don't auto-shutdown
Post by: roberts on September 27, 2009, 12:47:46 PM
On second thought, time to implement it.