View Full Version : fsck in GUI mode
05-02-2002, 09:29 AM
Is there a way that OS X can do a sort of fsck check and repair while its in it's regular GIU mode? I often get kernel panics during shut down (see 'Almost daily kernel panics - HELP!'). If there is, I could write a script to do the check at shut down. Such a script would not prevent the corruptions I experience from happening but at least I might be able to repair the corruptions before a kernel panic happens.
05-02-2002, 11:34 AM
Generally speaking, it's a bad idea to have fsck do repairs while in multi-user mode. There are many applications that have open files and such that may cause the disk layout to change during the fsck. The usualy method (as during startup) is to mount the disk read-only or not mount it at all, and fsck that way.
The fsck is done at startup everytime, as a sanity check. It should be equivalent to doing it before shutdown.
05-02-2002, 12:17 PM
Thanks for the info! Is there anything I can do to try to repair the disk in multi user mode right before shut down?
05-02-2002, 12:53 PM
the "/Applications/Utilities/Disk Utility" app actually runs fsck_hfs, but you can't run it on the boot partition. and you'll want to take your fingers out of any partition you do point it at.
or, you can shutdown to single user mode and fsck from there.
quit all aqua apps, then from the shell:
% sudo shutdown now
this will grind away and deposit you as root at a darwin screen. beware, all your partitions are still mounted read/write.
but from here you can fsck and reboot.
05-02-2002, 02:31 PM
Question: Why do you want to fsck before shutdown?
It always checks if any of the filesystems were uncleanly mounted, and if so, does the fsck at boot time.
If you are experiencing file corruption even when shutting down cleanly, you should file a bug report with Apple. That's a serious issue. (Though I've noticed that sometimes there is corruption even after a clean shutdown. I suspect that the filesystem driver has too much legacy code that has never been properly debugged. Fsck at boot always caught it, though.)
If you're really paranoid, I suspect that changing the boot script to always fsck is easier than doing it at shutdown, since there is already code to conditionally check it... just remove the conditional code.
05-02-2002, 02:44 PM
The following is what I posted in an other section of this forum. Alas, no one has come up with a solution. my own semi-solution is to try some kind of disk repair before shut down as since that's when I get kernel panics...
ALMOST DAILY KERNEL PANICS - HELP!
I have two hard drives - one with OS 9 and the other with OS X. Would any one know why (and/or how to solve) a problem I have when moving or manipulating files between drives? For example, I have a carbon version of Eudora on the OS 9 drive, but when I use it while in OS X the Eudora settings get corrupted. Also, when I copy large folders from one drive to an other, custom icons get corrupted and mountcheck errors occur (mostly on my OS X drive but sometomes both). Also, I often get kernel panics due to unresolved kernel traps (whatever that means). The kernel panics always occur at shut down.
Both drives appear to behave well on their own but do not work well together. Although the problems are easy to fix, they should not happen as often as they do (sometimes as much as twice a day). They are both Western Digital drives (although the problem still happened when one was a Seagate - which I replaced when I thought the new drive was the problem) and once repaired, my drive utilities (Norton, DFA) say they're just fine.
Lastly, the problem seemed to improve a bit when I installed OS 9 on my new drive (the one that I use OS X on) and pointed the classic emulator to it. What's more strange is that I don't use classic! Just the fact that OS X knows that if classic were to be used, that's where t would start it up from, seems to make things run a bit more smoothly - but only a bit.
My Mac is a 450mHZ G4 with 512 mb of RAM. Please help!
05-02-2002, 03:06 PM
Again, I don't see what doing the fsck before the KP would get you, if it's just going to run on the reboot anyway. It's not likely that the KP is doing the damage, or at least not likely that it's making it too much worse.
As an aside, posting the whole screen dump that accompanies a KP would be helpful in determining what is at fault.
05-02-2002, 03:13 PM
I'll post a screen shot of a report for you later this afternoon.
05-02-2002, 07:37 PM
Here's a link to a picture of my kernel panic report. I hope some one can come up with a way to fix this!
05-02-2002, 09:02 PM
laram, i see USB modules in the backtrace.
can you enumerate all your hardware, especially your USB devices and how they are config'd and plugged in? you don't happen to be using a KVM switch, do you?
be sure to send that off to apple, the feedback link, i guess.
and tell us your rev of the OS.
05-02-2002, 09:16 PM
Merv, I don't mean to interrupt, but are you referring to the com.apple.iokit.IOUSBUser*** lines in the pic?
Just want to learn from someone else's pain.
05-02-2002, 09:18 PM
I have a Keyspan usb hub. Its connected to my Epson Printer, my SanDisk card reader and my Wacom tablet. My keyboard and Agfa scanner are nonnected directly to the CPU. My keyboard has two usb ports. My Keyspan usb hub uses one and my Apple hocky-puck style mouse uses the other. FYI, I have a Que firewire CD burner too.
05-02-2002, 09:40 PM
Originally posted by AKcrab
...are you referring to the com.apple.iokit.IOUSBUser*** lines in the pic?
yep. i see iokit and driver and then they all mention USB, so there's prolly something hinky in the USB chain.
i had a KVM in my hardware matrix and it would KP every day and those backtrace lines look familiar.
laram, i would experimentally test reducing your USB load to see how it stabalizes the rig.
05-02-2002, 09:45 PM
Thanks for the tip! I'll give it a try. Please keep an eye on this post - I'll be letting you know how it turns up.
05-02-2002, 10:36 PM
Just my 2 cents-I think you're on the right track now by troubleshooting what's causing your issue. If you're getting daily kernel panics, trying to run fsck before shutting down might help with the symptom, but won't fix the problem. It's like taking aspirin for a headache caused by a brain tumor. Just a little more unsolicited advice--I'd start looking at external hardware first too, since it's easiest to test by simply unplugging it. Good luck and please let us know if there's anything we can do to help.
05-02-2002, 11:24 PM
You might want to try plugging your hub directly into your computer, and your keyboard into it, rather than the other way around. That setup gave me all sorts of trouble back in the 10.0 days (so long ago... :)).
Just a thought.
05-03-2002, 09:26 AM
Your suggestion seems to be right on the target! I've unplugged all my usb devices (except the keyboard and mouse, of course) and tried a few things that usually caused a kernel panic and my machine shut down just fine. At this point, however, it's still too soon to know for sure. Today is May 3rd and I'll put up another post by next week to let you know if anything 'hinky' happens. Whether this works or not, thank you (and all the other kindly advice givers) for your input.
05-10-2002, 08:49 AM
Merv, et al,
The problem seems to have been a a faulty driver for my usb Wacom tablet. I noticed my computer never crashed when the tablet was disconnected. I noticed an other hint whenever I started my machine in single user mode. There were parts of some of the lines which said "Com.Wacom.iokit.TabletDriver has an invalid version", "load_kmod() failed for kmod'Com.Wacom.iokit.TabletDriver'" and "Com.Wacom.iokit.TabletDriver cannot be loaded". I've seen these before but in my ignorance I reasoned that the driver should not load in single user mode anyway since I can only do key-stroke commands. Anyway, to make a long story short, I updated the driver to the latest version, started up in single user mode and the warnings were no longer there. While in multi user mode I've tried as hard as I could to get a kp and I'm glad to say I've failed.
Thanks to you all!
05-10-2002, 11:32 AM
laram, congratulations! I know how frustrating these situations can be and am glad you were able to figure out and resolve the problem. Good going merv!
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.