LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Set Ubuntu to auto-fsck after crash? (https://www.linuxquestions.org/questions/linux-newbie-8/set-ubuntu-to-auto-fsck-after-crash-739205/)

ternarybit 07-10-2009 11:07 AM

Set Ubuntu to auto-fsck after crash?
 
I was tinkering with VMware server, looking up the docs, when I clicked a PDF link from the vmware site that caused my Ubuntu Jaunty x86_64 to totally lock up. After several seconds of no HDD activity and no response from various key combos (ctrl+alt+bksp, etc.), I hard-restarted my computer.

When GRUB started again, it said simply "Error 17" and proceeded no further. Thankfully I happened to have a Linux live rescue CD handy (Ubuntu Rescue Remix), so I booted and fsck'ed the Jaunty partition, which allowed a proper boot with no further issues.

Question: can I set Ubuntu to auto-fsck after such an error/lockup (similar to how Windows auto chkdsk's), as to prevent having to boot live media and fsck manually? Thank you for your help!!

serafean 07-10-2009 01:18 PM

Hi, Linux in general detects if a filesystem needs checking, and checks it if needed in addition to restoring the journal. In order to do that, it has to boot Linux first. Your partition containing the /boot directory had apparently been damaged during the hard lock, and GRUB couldn't see the kernel images. GRUB 17 :
Quote:

Error 17 claims that the partition that you're attempting to boot is of a format that GRUB does not recognize.
In this case, I think a LiveCD was your only option.

PS:anyone correct me if I'm wrong anywhere, just speaking from personal experience...

ternarybit 07-13-2009 12:56 PM

Quote:

Originally Posted by serafean (Post 3603602)
Hi, Linux in general detects if a filesystem needs checking, and checks it if needed in addition to restoring the journal. In order to do that, it has to boot Linux first. Your partition containing the /boot directory had apparently been damaged during the hard lock, and GRUB couldn't see the kernel images. GRUB 17 : In this case, I think a LiveCD was your only option.

PS:anyone correct me if I'm wrong anywhere, just speaking from personal experience...

That's pretty much what I thought: Linux will auto-fsck if possible. Also good to know that LiveCD is the only option. I assume this kind of hard lock and /boot dir corruption doesn't happen very often.

Thank you for your time and valuable information! Cheers!


All times are GMT -5. The time now is 03:17 AM.