|
|
#1 |
|
Prospect
Join Date: Nov 2007
Posts: 4
|
automatic fsck on next boot
Hi, I have a G4 running 10.4.11 that is headless - no keyboard/mouse or monitor, which I'm using as a DVR. I manage it with remote desktop/ssh
Occasionally the power goes out, or I have to hard boot it if it won't come out of sleep (wake for ethernet network administrator access) I want to run fsck on occasion but I can't boot into single user mode with no keyboard or monitor. Can I schedule an fsck -fy on the next reboot somehow? Kind of like chkdsk /f (schedule chkdsk on next boot y/n) in windows. Thanks |
|
|
|
|
|
#2 |
|
Prospect
Join Date: Nov 2007
Posts: 4
|
No ideas? Anyone?
|
|
|
|
|
|
#3 |
|
All Star
Join Date: Oct 2006
Location: Norwell, MA
Posts: 546
|
I think the problem is that by the time the OS boots far enough to run a script there are so many active, open files that fsck can only verify and not repair. How about a small UPS to protect against power problems? And unless the drive is about to completely fail, you shouldn't need to run fsck that often.
__________________
http://macintoshsolutions.com |
|
|
|
|
|
#4 |
|
Major Leaguer
Join Date: Jul 2003
Posts: 329
|
Try running the command as a cron task. The crontab is is the /etc/ folder.
@reboot root fsck -fy |
|
|
|
|
|
#5 |
|
League Commissioner
Join Date: Mar 2003
Location: Kansas City
Posts: 11,347
|
Well the boot strap goes like this
Power > POST > Firmware > launchd > loginwindow > GUI Posting a job in /etc will probably get parsed before the OS actually runs. I have never personally tried this. I would also research it since I think running fsck or a journaled HFS+ is not always recommended. You may need to run the fsck_hfs command instead. |
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Jul 2003
Posts: 329
|
I run the software update command as a cronjob from all our staff machines as root and @reboot and it works fine.
This is for 10.3 & 10.4 machines. For 10.5 I use launchd to call the command on a reboot. Last edited by kaptagat; 07-01-2008 at 03:04 AM. |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
IIRC, during the boot sequence there IS an fsck run automatically at boot, a quick and dirty one called a "preen"?
Happening during the spinning spoked wheel gray apple startup screen? Maybe this was pre-leopard, where /etc/rc actually existed. Last edited by yellow; 06-30-2008 at 11:12 AM. |
|
|
|
|
|
#8 |
|
League Commissioner
Join Date: Mar 2003
Location: Kansas City
Posts: 11,347
|
Yeah in 10.5 everything should technically be controlled by launchd
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|