WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: checkfs boot option: if chech fails plz don't auto-shutdown  (Read 3661 times)

Offline jls

  • Hero Member
  • *****
  • Posts: 2134
checkfs boot option: if chech fails plz don't auto-shutdown
« on: September 25, 2009, 01:35:31 AM »
 :o
dCore user

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #1 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?
10+ Years Contributing to Linux Open Source Projects.

Offline jls

  • Hero Member
  • *****
  • Posts: 2134
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #2 on: September 25, 2009, 05:34:13 PM »
on my ext2 formatted filesystems sometimes -p fails. Should I change to ext3?
dCore user

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #3 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.
10+ Years Contributing to Linux Open Source Projects.

Offline jls

  • Hero Member
  • *****
  • Posts: 2134
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #4 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
dCore user

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10206
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #5 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.
The only barriers that can stop you are the ones you create yourself.

Offline jls

  • Hero Member
  • *****
  • Posts: 2134
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #6 on: September 26, 2009, 03:39:53 AM »
the error is shown for a sec already.
dCore user

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10206
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #7 on: September 26, 2009, 03:41:47 AM »
Yes, but if the user is not watching the screen, it could get missed.
The only barriers that can stop you are the ones you create yourself.

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #8 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.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #9 on: September 26, 2009, 05:45:59 AM »
Alright already, I will add a pause upon non-zero result.
10+ Years Contributing to Linux Open Source Projects.

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #10 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.

Offline jls

  • Hero Member
  • *****
  • Posts: 2134
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #11 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
dCore user

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #12 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.
10+ Years Contributing to Linux Open Source Projects.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #13 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.
10+ Years Contributing to Linux Open Source Projects.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: checkfs boot option: if chech fails plz don't auto-shutdown
« Reply #14 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).
« Last Edit: September 26, 2009, 09:33:07 AM by jpeters »